Ishaq bin Sa'id (may Allah have mercy on him) says that his father related: I was with Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) when a man came to him. He asked him: "Who are you?" The man claimed a distant kinship with him, so he spoke gently to him and said that the Messenger of Allah (peace and blessings be upon him) said: "Know your lineages and join your ties of kinship. For when kinship is severed, it does not remain close however near it may be, and there is no distance in it when it is joined, even if it be a distant tie." He commanded knowing lineages, because this becomes known only through reports, since in most cases their origin cannot be known (directly).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20582