debug ip icmp

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:

  • 0—Echo reply
  • 3—Destination unreachable
  • 4—Source quench
  • 5—Redirect
  • 8—Echo
  • 9—Router Discovery Protocol advertisement
  • 10—Router Discovery Protocol solicitations
  • 11—Time exceeded
  • 12—Parameter problem
  • 13—Time stamp
  • 14—Time stamp reply
  • 15—Information request
  • 16—Information reply
  • 17—Mask request
  • 18—Mask reply

code 1

This field is a code; the meaning of the code depends upon the type-field value:

  • Echo and echo reply—The code field is always zero.

  • Destination unreachable—The code field can have the following values:

    • 0—Network unreachable
    • 1—Host unreachable
    • 2—Protocol unreachable
    • 3—Port unreachable
    • 4—Fragmentation needed and DF bit set
    • 5—Source route failed

  • Source quench—The code field is always 0.

  • Redirect—The code field can have the following values:

    • 0—Redirect datagrams for the network
    • 1—Redirect datagrams for the host
    • 2—Redirect datagrams for the command mode of service and network
    • 3—Redirect datagrams for the command mode of service and host

  • Router Discovery Protocol advertisements and solicitations—The code field is always zero

code 1 (continued)

  • Time exceeded—The code field can have the following values:

    • 0—Time To Live exceeded in transit
    • 1—Fragment reassembly time exceeded

  • Parameter problem—The code field can have the following values:

    • 0—General problem
    • 1—Option is missing
    • 2—Option missing, no room to add

  • Time stamp and time-stamp reply—The code field is always zero

  • Information request and information reply—The code field is always zero

  • Mask request and mask reply—The 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 Ethernet0

The 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.32
  

The 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.23

The 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.28

The 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.31

The 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.32

Depending 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
prohibited
  

The 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