Qays bin Muslim narrates that Sayyiduna Tariq bin Shihab (may Allah be pleased with him) says: Some people of the Ansar set out from Kufah towards Madinah. They came to a clan of Banu Asad. They had run out of provisions, so they asked them to sell them something, and (the clan) had fine wealth. They refused to sell. They asked for hospitality, and they said: We cannot host you either. Then fighting broke out between them, and the Bedouins abandoned their houses along with what was in them, and they took one sheep for every ten of them. The narrator says: They came and told Sayyiduna Umar (may Allah be pleased with him), and he praised and glorified Allah and said: Had I given instructions on this beforehand, I would have done such and such. Then he wrote to the cities and to the dhimmis that they should provide a night's hospitality to a guest.
(b) Abd al-Rahman bin Abi Layla narrates from his father (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) divided sheep among his Companions, giving one sheep to every ten of them. This is a sunnah. The narrator says: On the occasion of Khaybar, he (peace and blessings be upon him) ordered the cooking pots to be overturned.
(c) Ibn Abi Layla says that Sayyiduna Umar (may Allah be pleased with him) prescribed a night's hospitality among the Muslims and the mu'ahadin (people under treaty). Ibn Abi Layla says: The people used to receive us with a night's hospitality, which in Persian they call "sham", that is, supper.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجزية / 18696