“What do they use dogs for?” Then he permitted them to keep farming dogs and dogs of ‘Ein. Bundar said: “The ‘Ein refers to the walls of Al-Madinah.”
Sunan Ibn Majah Book 28, Hadith 2