The site "My Planet" published an article by N.Yu. Feaktistova, d. N., scientific secretary of the A. N. Severtsov Institute of Ecology and Evolution RAS, about what animals know and remember their parents.
Animals not only do not know their ancestors, but can also mate with them. Nevertheless, there are behavioral models where babies come into contact with the elderly and may even be cared for by them.
For example, bear familial units often have cubs from an earlier litter that help take care of the younger ones, showing them the ropes. But it rather resembles the relationship between older and younger siblings.
Orcas live in large families, led by the females. Daughters do not leave their mothers, even when they produce their own offspring. The males prefer to stay in the family as well. Moreover, among killer whales the mothers and grandmothers are trying in every possible way to take care of their sons and grandchildren: they help them hunt, they support them during conflicts with other individuals. After all, the longer the male lives, the more offspring he will leave! Scientists suggest that it is due to the need to take care of the younger generation that killer whales have a long post-reproductive life span. Although in most mammals it is limited by the period of fertility.
But to compare these relationships with the attitude of grandmothers and grandchildren would not be correct. In nature, a different principle applies: the elders take care of the younger ones. And it is not necessary for them to be relatives. For example, when an older female chimpanzee sees that a younger individual cannot take care of the cubs, it may as well pick them up to nurture them herself.