Abu Hurairah narrated that the Messenger of Allah (peace be upon him) said: “Learn enough about your lineage to facilitate keeping your ties of kinship. For indeed keeping the ties of kinship encourages affection among the relatives, increases the wealth, and increases the lifespan.”
Jami` at-Tirmidhi, Vol. 4, Book 27, Hadith 85