Ping Troubleshooting on Cisco IOS

Hi Sameer,

The RFC has a detailed explanation for these error codes. Sometimes these are hard to find but here’s a good example:

0 = Network Unreachable - generated by a router if a forwarding path (route) to the destination network is not available;

1 = Host Unreachable - generated by a router if a forwarding path (route) to the destination host on a directly connected network is not available (does not respond to ARP);

6 = Destination Network Unknown - This code SHOULD NOT be generated since it would imply on the part of the router that the destination network does not exist (net unreachable code 0 SHOULD be used in place of code 6);

7 = Destination Host Unknown - generated only when a router can determine (from link layer advice) that the destination host does not exist;

I did some testing and on Cisco IOS, I only see Type 3 Code 1…nothing else. For example, you can test this with a simple setup. Something like this:

H1 - R1

On H1, configure R1 as a default gateway.

  • If you ping a destination that R1 doesn’t have a route for, I would expect a type 3 code 0 but in reality, I get a type 3 code 1 in return.
  • If you ping a destination that R1 has a directly connected network for but it doesn’t get an ARP reply, the RFC says that the router should return type 3 code 1 but in reality, it doesn’t return anything.

Even though these codes exist, it doesn’t mean that they are always implemented and implemented in the same way on all different vendor devices :slight_smile:

Hope this helps!

Rene

1 Like