Types of ICMP (Internet Control Message Protocol) Messages
Last Updated : 27 Apr, 2023
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 MessageRedirection 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 MessageRouter 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 MessageParameter 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 MessageTimestamp 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.
Similar Reads
Internet Control Message Protocol (ICMP) Internet Control Message Protocol is known as ICMP. The protocol is at the network layer. It is mostly utilized on network equipment like routers and is utilized for error handling at the network layer. Since there are various kinds of network layer faults, ICMP can be utilized to report and trouble
11 min read
Internet Message Access Protocol (IMAP) The Internet Message Access Protocol (IMAP) is an important part of how email works today. It lets people check and manage their emails from different devices, like phones, tablets, and computers, without losing any updates.Unlike the older Post Office Protocol (POP), which only downloads messages t
6 min read
What is IGMP(Internet Group Management Protocol)? IGMP is an acronym for Internet Group Management Protocol. IGMP is a communication protocol used by hosts and adjacent routers for multicasting communication with IP networks and uses the resources efficiently to transmit the message/data packets. Multicast communication can have single or multiple
9 min read
Types of Internet Protocols Internet protocols are a set of rules that allow computers and other devices to communicate over the Internet. These protocols ensure that data is sent, received, and understood correctly between different systems. There are many types of internet protocols, each serving a specific purpose, such as
12 min read
Network Control Protocol (NCP) ARPANET included several protocols on the internet and NCP was one of them. NCP was a unidirectional or simplex protocol between two computers or devices. It provided user access and flow control to use computers and devices at remote locations and to transmit files between them. The NCP also allows
3 min read