• Main Menu
  • ICMP (Internet Control Message Protocol)


    ICMP is the Internet Control Message Protocol.

    ICMP is a complementary protocol to IP (Internet Protocol). Like IP, ICMP resides on the Network Layer of the OSI Model.

    ICMP is designed for sending control and test messages across IP networks.

    Unlike the Transport Layer protocols TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) which operate on top of IP, ICMP exists alongside IP.

    The ability to understand ICMP is a requirement for any IP-compatible network device. However, many security devices such as firewalls block or disable all or part of ICMP functionality for security purposes.

    ICMP Message Types

    ICMP operates by sending and receiving a limited number of messages types. The ICMP message types are defined in IANA ICMP Type Numbers.

    The most common ICMP message types are:

    Type Name
    0 Echo Reply
    3 Destination Unreachable
    4 Source Quench
    5 Redirect
    6 Alternate Host Address
    8 Echo
    9 Router Advertisement
    10 Router Solicitation
    11 Time Exceeded
    12 Parameter Problem
    13 Timestamp
    14 Timestamp Reply
    15 Information Request
    16 Information Reply
    17 Address Mask Request
    18 Address Mask Reply
    30 Traceroute

    ICMP Echo Request and Echo Reply

    The two most important ICMP messages are Echo Request (8) and Echo Reply (0).

    Echo Request and Echo Reply are utilized by the `ping` command to test network connectivity.

    Here we use the `ping` command to send three 64-byte ICMP Echo Request messages to www.freebsd.org and receive three Echo Reply messages in response:

    bash-2.05a$ ping -c 3 www.freebsd.org
    PING www.freebsd.org (216.136.204.117): 56 data bytes
    64 bytes from 216.136.204.117: icmp_seq=0 ttl=55 time=63.708 ms
    64 bytes from 216.136.204.117: icmp_seq=1 ttl=55 time=62.725 ms
    64 bytes from 216.136.204.117: icmp_seq=2 ttl=55 time=62.618 ms

    — www.freebsd.org ping statistics —
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 62.618/63.017/63.708/0.491 ms

    This output tells us that network connectivity to www.freebsd.org is working. It also tells us the time each packet took to return.

    `ping` is an extremely useful tool for network troubleshooting.

    Additional Reading on ICMP

    ICMP is defined in RFC 792: Internet Control Message Protocol.

    Got Something To Say:

    Your email address will not be published. Required fields are marked *

    3 comments
    1. Nonkululeko Mthembu

      18 September, 2013 at 11:02 am

      I didn’t get my answer

      Reply
      • WillSpencer

        18 September, 2013 at 12:04 pm

        What answer are you looking for?

        Reply
        • umesh2063

          26 February, 2016 at 11:46 am

          When I check ping status, ICMP_Seq becomes above 3,500 over the time and internet runs slow. IS there any way to get rid of this high value of ICMP_Seq?
          below is the detail:
          64 bytes from 202.56.215.55: icmp_seq=3932 ttl=253 time=45.199 ms
          64 bytes from 202.56.215.55: icmp_seq=3832 ttl=253 time=43.199 ms

          Reply
    Network Layer
    181 queries in 0.670 seconds.