I have researched about Ethernet keepalive for quite a long time and I think it is time to check whether what I know is correct because I found no certainty in this topic.
Ethernet keepalive is:
to test L2 functionality. The frame has same source MAC and destination MAC (ethertype 0×9000). The other end of Ethernet interface will TX back this type of frame. If the interface does not receive its own frame, then L1 & L2 have problem.
to detect network loop. On same switch, if the Ethernet keepalive frame of fa0/0 is received by other port, then it means there is network loop.
My question is how come ethernet (FE, GE) ports status of router and switch for L2 (protocol) are up when the port is connected to hub? Hub does not analyze frame thus it will not know the frame type and thus forward back the frame on the port it receives the frame.