966. Occasions for Which to Make an Eiruv Techumin
Eiruvin 6:5
If a person places his eiruv within the city where he will be spending Shabbos, he has performed a meaningless act and his Shabbos boundary is not measured from the eiruv. Rather, he is like every other resident of the city, who may travel 2,000 cubits in every direction beyond the city. If one places his eiruv in the outskirts of a city that are included within the city limits, the calculation of the Shabbos boundary begins beyond the outskirts, so it is the same as if he had placed his eiruv within the city itself. If one places his eiruv beyond the city's Shabbos boundary, it is not valid.
Eiruvin 6:6
An eiruv techumin should only be made for purposes of a mitzvah, such as one who wishes to go on Shabbos to console a mourner, to attend a wedding meal, to greet his teacher or a returning colleague, or for similar purposes. One may likewise make an eiruv techumin because of fear, such as if he fears enemy forces, brigands, etc. If one does make an eiruv for other reasons, it is still valid.