ICMP (Internet Control Message Protocol)

ICMP is used to send out control messages to routers. It is an Internet layer protocol, working together with IP protocol. It can be used in several situations that may be necessary for one router to instruct another router about something – usually when one router gets a datagram that it can’t deliver, it reply back to the router that send the datagram with an ICMP message explaining why it couldn’t deliver the datagram.

Some of the control messages that can be sent using ICMP are:

  • Echo: Used to test if the path between the receiver and the transmitter is fine. The most well known use of this message is through the command Ping. If you give the command Ping, for example, our server will reply to these echo messages, and Ping will tell you whether it could reach our server or not and the time taken for the echo message send by our server to arrive back at your computer, usually in the millisecond (ms) range.

  • Host unreachable: Inside this message the router can tell exactly what went wrong, like unreachable network, unreachable computer, unreachable protocol, unreachable port, unknown target network, unknown target computer, the network administrator has blocked targeted network or computer, routing problems, etc.

  • Speed reduction: This message is sent if the router is overloaded – i.e., it is receiving more datagrams it is capable of processing – in order to make the router that is sending the datagrams to reduce the rate of datagrams sent to the overloaded router.

  • Redirection requested: This message is usually used when a router finds out that there is a better route to reach the destination, updating the transmitting router. This feature only works on local area networks, not working on large networks that have interconnected networks, like the Internet.

  • Time-to-live (TTL) has been reached: All IP datagrams have a time-to-live (TTL) field, which tells how many hops (i.e., routers) the datagram can pass from the transmitting computer to the receiving one. If a datagram is set with a TTL of 20, this means that if it doesn’t arrive at destination within 20 hops, the datagram should be discarded. This is done in order to prevent datagrams from being eternally circulating on your network or on the Internet if the network isn’t configured correctly and the datagram is walking around without any path to reach its destination.

  • Time: Routers (and computers) can ask the time another router or computer has right now on its real time clock. One of the uses of this message is to synch the clocks of two computers, even though this synchronization isn’t perfect, as there is a small delay introduced by the network (in the order of milliseconds, though). This message can also be used to measure the network delay time between two computers, if their clocks are synchronized.

Gabriel Torres is a Brazilian best-selling ICT expert, with 24 books published. He started his online career in 1996, when he launched Clube do Hardware, which is one of the oldest and largest websites about technology in Brazil. He created Hardware Secrets in 1999 to expand his knowledge outside his home country.