Open In App

Types of ICMP (Internet Control Message Protocol) Messages

Last Updated : 27 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-Requisite: Internet Control Message Protocol (ICMP) 

Internet Control Message Protocol is a protocol used for error handling and debugging in the network layer. It is mainly used in network devices such as routers for sending errors and operations. The main work of the Internet Control Message Protocol is of reporting errors, between any two devices which are connected through the Internet. Internet Control Message Protocol (ICMP) also has the work to assess network performance. In this article, we will see the types of IMCP Messages.

Types of ICMP Messages

Type Code      Description
0 – Echo Reply 0 Echo reply
3 – Destination Unreachable 0 Destination network unreachable
1 Destination host unreachable
2 Destination protocol unreachable
3 Destination port unreachable
4 Fragmentation needed and DF flag set
5 Source route failed
5 – Redirect Message 0 Redirect datagram for the Network
1 Redirect datagram for the host
2 Redirect datagram for the Type of Service and Network
3 Redirect datagram for the Service and Host
8 – Echo Message 0 Echo Request
9 – Router Advertisement 0 Use to discover the addresses of operational routers
10 – Router Solicitation 0
11 – Time Exceeded 0 Time to live exceeded in transit
1 Fragment reassembly time exceeded
12 – Parameter Problem 0 Pointer indicates error
1 Missing required option
2 Bad length
13 – Timestamp 0 Used for time synchronization
14 – Timestamp Reply 0 Reply to Timestamp message

Echo-Request and Reply Message

Network managers use it to check the operations of the IP and the host’s reachability. The host/router sends the echo request message, while the echo reply message is sent by the host/router that receives an echo request message. 
For example, host A wants to check whether it can communicate with another host B so it will send an echo request to B and if there is a link between A and B and B is active then it will send an echo reply to A on receiving the request.

Destination Unreachable Message

The host/router sends this message if it is not able to route the IP packet to its destination.
For example, if sender A wants to send the datagram to receiver B but it is not received by B then the intermediate router will discard the datagram and send the destination unreachable message to A.

Destination Unreachable Message

Destination Unreachable Message

Redirection Message

The host/router sends this message to update the routing table of the host.
For example, sender A wants to send the message to receiver B and there is a router between them. Then, A sends the data to the router and the router sends the message to B and redirection message to A so that A can update its routing table.

Redirection Message

Redirection Message

Router Solicitation and Advertisement Message

It is used to confirm the presence of a router on the local area network. It is done by broadcasting a router solicitation message and the router that receives the message broadcasts the routing information using a router advertisement message. 
For example, if host A wants to get the information of routers present on the network. It will broadcast a router solicitation message to request routers to advertise their presence and in response router on the network will announce its IP address available for routing through an advertisement message.

Time Exceeded Message

The host/router sends this message if it decrements the time-to-live value of the datagram to zero or if the destination address does not receive all the packets in the specified time interval.
For example, a packet is sent from a layer having 1000 units to a layer having 200 units, then the packet is divided into five fragments. If all the fragments don’t reach the destination in a set time, all fragments are discarded and the time-exceeded message is sent to the source.

Time Exceeded Message

Time Exceeded Message

Parameter Problem Message

The host/router sends this message if some parameter is not set correctly in the datagram. It is used to indicate errors in the header field of the datagram.

Parameter Problem Message

Parameter Problem Message

Timestamp Request and Reply Message

It is used to determine the round trip time taken by each IP datagram to travel from one host to another host. It can also synchronize the clocks between hosts if transit time is known.
For example, if host A wants to synchronize its clock with B then it will ask time on B’s clock by sending a timestamp request and B will reply with the timestamp to A. Then A will add the time and propagation delay to synchronize the time on its system.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads