Steps to deal with link directly connected ping failure
You can check the following aspects:
1. Whether the light is on and the line is good
2. Whether the interface is up or not
3. Whether the duplex and speed are the same
4. Do you have ARP or MAC information?
5. Do you have neighbor information (cdp,lldp,ospf,bgp)
6. Whether the interface has ACL
7. STP status