Ping Troubleshooting on Cisco IOS

This topic is to discuss the following lesson:

Hello Rene ,

I have below doubt regarding ICMP error codes as below for type 3:

  • 0 - Destination network unreachable
  • 1 - Destination host unreachable
  • 6 - Destination network unknown
  • 7 - Destination host unknown

These all seem to be same. Can you please differentiate all code values and for which scenario each one is generated?

Thank You!!

Regards,
Sameer

Hi Sameer,

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

https://tools.ietf.org/html/rfc1812#page-81

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

Hi Rene ,

Thank you!! , I tested to get these codes but only seen “Type 3 Code 1” ,may be these are not implemented thank you for details hints .

Regards,
Sameer.

1 Like

can someone please explain detailed working of Ping and Traceroute

Hello Raunak

Take a look at these two lessons that describe these utilities in depth:


If you have any further questions, let us know!

Laz