Use the debug ip icmp command to display information on ICMP transactions. This command helps you determine whether the router is sending or receiving ICMP messages. Use it, for example, when you are troubleshooting an end-to-end connection problem.
Note: For more information about the fields in debug ip icmp output, see RFC-792, "Internet Control Message Protocol"; Appendix I of RFC-950, "Internet Standard Subnetting Procedure;" and RFC-1256, "ICMP Router Discovery Messages."
Sample Debug IP ICMP Output
Router# debug ip icmp ICMP: rcvd type 3, code 1, from 10.95.192.4 ICMP: src 10.56.0.202, dst 172.16.16.1, echo reply ICMP: dst (10.120.1.0) port unreachable rcv from 10.120.1.15 ICMP: src 172.16.12.35, dst 172.16.20.7, echo reply ICMP: dst (255.255.255.255) protocol unreachable rcv from 10.31.7.21 ICMP: dst (10.120.1.0) port unreachable rcv from 10.120.1.15 ICMP: dst (255.255.255.255) protocol unreachable rcv from 10.31.7.21 ICMP: dst (10.120.1.0) port unreachable rcv from 10.120.1.15 ICMP: src 10.56.0.202, dst 172.16.16.1, echo reply ICMP: dst (10.120.1.0) port unreachable rcv from 10.120.1.15 ICMP: dst (255.255.255.255) protocol unreachable rcv from 10.31.7.21 ICMP: dst (10.120.1.0) port unreachable rcv from 10.120.1.15
Debug IP ICMP Field Descriptions Field Description ICMP: Indication that this message describes an ICMP packet rcvd type 3 The type field can be one of the following:
- 0Echo reply
- 3Destination unreachable
- 4Source quench
- 5Redirect
- 8Echo
- 9Router Discovery Protocol advertisement
- 10Router Discovery Protocol solicitations
- 11Time exceeded
- 12Parameter problem
- 13Time stamp
- 14Time stamp reply
- 15Information request
- 16Information reply
- 17Mask request
- 18Mask reply
code 1
This field is a code; the meaning of the code depends upon the type-field value:
- Echo and echo replyThe code field is always zero.
- Destination unreachableThe code field can have the following values:
- 0Network unreachable
- 1Host unreachable
- 2Protocol unreachable
- 3Port unreachable
- 4Fragmentation needed and DF bit set
- 5Source route failed
- Source quenchThe code field is always 0.
- RedirectThe code field can have the following values:
- 0Redirect datagrams for the network
- 1Redirect datagrams for the host
- 2Redirect datagrams for the command mode of service and network
- 3Redirect datagrams for the command mode of service and host
- Router Discovery Protocol advertisements and solicitationsThe code field is always zero
code 1 (continued)
- Time exceededThe code field can have the following values:
- 0Time To Live exceeded in transit
- 1Fragment reassembly time exceeded
- Parameter problemThe code field can have the following values:
- 0General problem
- 1Option is missing
- 2Option missing, no room to add
- Time stamp and time-stamp replyThe code field is always zero
- Information request and information replyThe code field is always zero
- Mask request and mask replyThe code field is always zero
from 10.95.192.4
Source address of the ICMP packet
The following table describes significant fields in the second line of debug ip icmp output:
Field Description ICMP: Indication that this message describes an ICMP packet src 10.5610.120.0.202 The address of the sender of the echo dst 172.16.16.1 The address of the receiving router echo reply Indication that the router received an echo reply Other messages that the debug ip icmp command can generate follow.
When an IP router or host sends out an ICMP mask request, the following message is generated when the router sends a mask reply:
ICMP: sending mask reply (255.255.255.0) to 172.21.80.23 via Ethernet0The following two lines are examples of the two forms of this message. The first form is generated when a mask reply comes in after the router sends out a mask request. The second form occurs when the router receives a mask reply with a nonmatching sequence and ID. See Appendix I of RFC 950, "Internet Standard Subnetting Procedures," for details.
ICMP: mask reply 255.255.255.0 from 172.21.80.31 ICMP: unexpected mask reply 255.255.255.0 from 172.21.80.32The following output indicates that the router sent a redirect packet to the host at address 172.21.80.31, instructing that host to use the gateway at address 172.21.80.23 in order to reach the host at destination address 172.16.1.111:
ICMP: redirect sent to 172.21.80.31 for dest 172.16.1.111 use gw 172.21.80.23The following message indicates that the router received a redirect packet from the host at address 172.21.80.23, instructing the router to use the gateway at address 172.21.80.28 in order to reach the host at destination address 172.21.81.34:
ICMP: redirect rcvd from 172.21.80.23 -- for 172.21.81.34 use gw 172.21.80.28The following message is displayed when the router sends an ICMP packet to the source address (172.21.94.31 in this case), indicating that the destination address (172.16.13.33 in this case) is unreachable:
ICMP: dst (172.16.13.33) host unreachable sent to 172.21.94.31The following message is displayed when the router receives an ICMP packet from an intermediate address (172.21.98.32 in this case), indicating that the destination address (172.16.13.33 in this case) is unreachable:
ICMP: dst (172.16.13.33) host unreachable rcv from 172.21.98.32Depending on the code received, any of the unreachable messages can have any of the following "strings" instead of the "host" string in the message:
net protocol port frag. needed and DF set source route failed prohibitedThe following message is displayed when the TTL in the IP header reaches zero and a time exceed ICMP message is sent. The fields are self-explanatory.
ICMP: time exceeded (time to live) send to 10.95.1.4 (dest was 172.16.1.111)The following message is generated when parameters in the IP header are corrupted in some way and the parameter problem ICMP message is sent. The fields are self-explanatory.
ICMP: parameter problem sent to 128.121.1.50 (dest was 172.16.1.111)Based on the preceding information, the remaining output can be easily understood.
ICMP: parameter problem rcvd 172.21.80.32 ICMP: source quench rcvd 172.21.80.32 ICMP: source quench sent to 128.121.1.50 (dest was 172.16.1.111) ICMP: sending time stamp reply to 172.21.80.45 ICMP: sending info reply to 172.21.80.12 ICMP: rdp advert rcvd type 9, code 0, from 172.21.80.23 ICMP: rdp solicit rcvd type 10, code 0, from 172.21.80.43