Eruvin, Chapter 3, Mishnah 3. Our mishnah discusses where the eruv may be placed: in which places the placement is effective and in which places the eruv is invalid, beginning with placing the eruv in a tree.
Placing the eruv in a tree:
The case before us: a person designated his place of Shabbos rest - the point from which his two thousand amos in every direction are measured - on the ground beside a tree, and that ground is a public domain, while he placed the eruv in the tree itself. If he placed it higher than ten tefachim and the tree is four tefachim wide, the eruv is not valid. The reason: a person must be able to reach his eruv techumin from his place of rest. Here he is standing in a public domain, and the place of the eruv - above ten tefachim and four tefachim wide - has the status of a private domain, and one may not carry from a private domain to a public domain on Shabbos, and not even at twilight, which is the time when the eruv takes effect. Since he cannot reach the eruv at the moment it takes effect, it is not a valid eruv.
If, however, he placed the eruv in the tree at a spot lower than ten tefachim, which does not have the status of a private domain, the eruv is valid. And even though a spot lower than ten tefachim that is four tefachim wide has the status of a karmelis, and the Rabbis forbade carrying from a karmelis to a public domain, and in addition it is rabbinically forbidden to make use of a tree on Shabbos - so that we have two rabbinic prohibitions here - our mishnah follows the view of Rabbi, who holds that at twilight, for the sake of a mitzvah, one may transgress a rabbinic restriction. And since all the prohibitions here are only rabbinic, and the eruv takes effect at twilight, the eruv is valid.
Placing the eruv in a pit:
The mishnah continues: he placed the eruv inside a pit, wishing to designate his place of rest next to the pit, and that spot beside the pit is a karmelis, as the Gemara explains. Even if the pit was a hundred amos deep, so that it certainly has the status of a private domain, and even though the person wishes to rest in a karmelis while the eruv lies in a private domain - the eruv is valid, for the very reason mentioned: carrying from a private domain to a karmelis is only a rabbinic restriction, and at twilight, for the sake of a mitzvah, one may carry from a private domain to a karmelis.
He placed it atop a reed or atop a stick:
He placed the eruv atop a tall reed or atop a stick, "bizman shehu talush venatzua" - when it was uprooted from the ground and stuck back into it, so that it is not growing there on its own: even if it is a hundred amos high, since its top is not four tefachim by four tefachim but narrower than that, it does not have the status of a private domain, and "harei zeh eruv" - this is a valid eruv. And even though the person is standing beside it in a public domain and wishes his place of rest to be there, since the top of the reed does not have the status of a private domain, the eruv is valid.
The mishnah is precise that this depends on its being uprooted and stuck back in, for if it were growing in the ground on its own, it would not be permitted to make use of it on Shabbos: there is a decree lest he snap off a piece of a reed or a stick that is growing from the ground, thereby transgressing the prohibition of detaching on Shabbos. And since this decree stems from a Torah prohibition, it is not set aside even at twilight.
He placed it in a cupboard and the key was lost:
"Nesano bemigdal ve'avad hamafteach" - he placed the eruv in a cupboard and its key was lost, so that access to the eruv is blocked to him at the time it takes effect at twilight. When the cupboard is fastened with ropes that can be cut with a knife, this involves only a rabbinic prohibition, since he is merely destroying, and therefore "harei zeh eruv" - this is a valid eruv, for he needed to transgress only a rabbinic prohibition on his way to the eruv.
The view of Rabbi Eliezer:
Rabbi Eliezer disagrees and says: "im eino yodea shehamafteach bimkomo - eino eruv" - if he does not know that the key is in its place, it is not a valid eruv. Whenever a person does not know that the key of the lock is lying in its proper place, so that he could open it without cutting the ropes, it is not a valid eruv. His reasoning is that Rabbi Eliezer holds that a utensil may be used only for its usual purpose: a knife is meant for cutting food on Shabbos, and cutting ropes is not its proper use. Therefore, in his view, according to the laws of muktzeh, one may not use a knife to cut ropes on Shabbos, and he will have no way to reach the eruv unless he knows where the key is.
Even though here too only two rabbinic prohibitions are involved - cutting the ropes, which is rabbinically forbidden, and handling the knife on Shabbos according to Rabbi Eliezer - precisely because the two combine, they are not set aside even at twilight, and therefore he is unable to reach the eruv.
In summary: in this mishnah we learned the principle that a person must be able to reach his eruv at twilight, at the time the eruv takes effect, and that for the sake of a mitzvah one may transgress a rabbinic restriction in order to do so. Hence: an eruv placed in a tree above ten tefachim where it is four tefachim wide is invalid, since that spot has the status of a private domain; below ten tefachim it is valid; in a deep pit it is valid, even though the pit is a private domain and the person rests in a karmelis; atop a reed that was uprooted and stuck back in, whose top is not four tefachim, it is valid, while on a reed growing on its own it is invalid because of the decree of detaching; and in a cupboard whose key was lost it is valid according to the first opinion, since cutting the ropes is destructive and only rabbinically forbidden, while according to Rabbi Eliezer it is invalid, because the knife is not fit for this use.