Sunday, November 7, 2021

Types of ICMP (Internet Control Message Protocol) Messages

ICMP is a protocol used for error handling and debugging in the network layer. It is mainly used in network devices such as routers.

ICMP messages are mainly divided into two types:

Type 1 :Error reporting messages

Type 2:Query messages

 

 

 

1. Error Reporting Messages :
Error Reporting Messages are used to report problems encountered by the router/host while processing the IP packets. These messages are always sent to the source because the datagram only contains the source and destination IP address.

Following are the types of error reporting messages :

  • Destination Unreachable Message –
    The host/router send this message if it is not able to route the IP packet to its destination.
    For example, 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.
     
  • Source Quench Message –
    Host/router send this message if there is congestion in the network or the source is sending packets at a higher rate which the router can’t handle.
    For example, if sender A is sending the data packets at a high data rate which the router is unable to handle then it will discard the packet and send a source quench message to A to tell it to send the packets at a lower rate. Now, after receiving the message A will either stop or slow down sending of the packets.
     
  • Time Exceeded Message –
    The host/router sends this message if it decrements the time to live value of the datagram to zero or 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 the 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 original source.
     
  • Parameter Problem Message –
    The host/router sends this message if some parameter is not properly set in the datagram. It is used to indicate errors in the header field of the datagram.
     
  • 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.

 

2. Query Messages :
Query Messages are used for error handling and debugging network problems. These messages help the host to get specific information about another host or router.

Following are the types of query messages :

  • Echo-Request and Reply Message –
    It is used by the network managers to check the operations of the IP protocol and 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 echo-reply to A on receiving the request.
     
  • 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, host A wants to synchronize its clock with B then it will ask time on B’s clock by sending 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.
     
  • Address Mask Request and Reply Message –
    It is used to determine the subnet mask used in the local network.
    For example, host A wants to know the mask of the corresponding router then it will send an address mask request to the router if the address of the router is known else it will broadcast the request. The router that receives the request responds with an address mask reply and provides the mask to A.
     
  • 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 advertisement message
    .

 

No comments:

Post a Comment

How Does Traceroute Work and Example's of using traceroute command

  If you are working as a network administrator, system administrator, or in any system operations team, then you might have already ...