 Hello and welcome to a lecture on internet control message protocol learning outcome. By the end of this session student will be able to illustrate internet control message protocol. Here you may pause the video and recall the internet protocol header format. This is a IP header format. In this IP header format, we have one 8 bit field called time to live field. This 8 bit field contains a value between 1 to 255. Whenever the IP datagram reaches any of the router, that router decrements this field by 1. As soon as this field becomes 0, the router discard the IP datagram. ICMP protocol is used for error handling in the network layer as different types of error can exist in the network layer. So ICMP protocol is used to report these errors and to debug these errors. The internet protocol does not have any error reporting or any error correcting mechanisms as internet protocol is a connectionless protocol. So internet protocol uses ICMP messages to convey the information. The ICMP protocol is primarily used on the network devices. In this figure, you can see the location of ICMP message. It is located at the network layer itself, but it is used in combination with internet protocol, the ICMP message types. The ICMP messages are categorized into two categories. The first category is error reporting message, the other is query message. Under the first category, we have five different types of messages and under query messages, we have two types of messages. The error reporting messages report the error if a router or the destination host encounters a problem when it process an IP datagram. The query messages help the host to get the specific information of the another host. The ICMP message format. The first four fields are common for all the message type. The first field is a 8-bit type field. This type field defines the message type whether it is an error reporting message or a query message. 0 to 127 values are defined for ICMP version 6 and 128 to 255, these values are used for informational messages. The second field is a 8-bit code field. This field specifies the reason for the particular message. The next field is checksum field which is a 16-bit field. This checksum field is calculated on whole ICMP header as well as the data section. Rest of the header field is common for error messages, it contains all zeros in it. This data section field contains the IP header and the first 8 bytes of the data from the IP datagram for whom the ICMP message is being generated. The ICMP protocol always report the error messages to the original source. The ICMP message is not directly passed on to the lower layer, it is encapsulated in IP datagram and then it is passed on to the lower layer. The types of error reporting messages. The first type of error reporting message is destination unreachable. The destination unreachable message or error occurs when the packet does not reach the destination. Consider the sender sends the messages but the messages does not reach the destination. Then the intermediate router reports to the sender that the destination is unreachable. For destination unreachable message the type field of the ICMP header contains value 3 and the code is 0 to 15. The next type of error reporting message is the source quench message. As we know there is no flow control or congestion control mechanisms in the internet protocol. The sender is only concerned with the sending the packets to the destination. In this case the ICMP protocol provides the feedback to the source to decrease or increase the sending rate. For each datagram which is discarded due to congestion in the network the source quench message is sent out. The type field in the ICMP header contains value 4 and the code field contains value 0. The next type of message is time exceed message. The time exceed message is generated in the two cases. The first case is when the time to leave field of the IP header becomes 0. As soon as the time to leave field becomes 0 the packet is discarded and the router which discards the packet generate the time exceeded ICMP error reporting message which has to be delivered to the original source. In second case if one of the fragments which make up the whole datagram does not reach the destination in a set time interval. In that case all the fragments are discarded and time exceeded error reporting message is generated which has to be delivered to the original source. For time exceeded message the type field of the ICMP header contains value 11 and the code is either 0 or 1. When time to exceed message is generated due to time to leave field of the IP header that time the code field of the ICMP message contains value 0 and when one of the fragment does not reach the destination in set time interval and the time exceeded message is generated that time the code field of the ICMP message contains value 1. The next type of error reporting message is parameter problem. If router or the destination host discover that any ambiguity or missing value in any of the field of the IP header then it discards that datagram and sends a parameter problem message back to the original source. For parameter problem type of ICMP message the type field in the ICMP header contains value 12 and the code field may contain the value either 0 or 1. When there is an ambiguity or error in any of the field of the datagram the code field contains value 0 and when value in any of the field of IP datagram is missing that time this code field of the ICMP protocol contains value 1. The next type of error reporting message is a redirection message. When the packet is sent out and that packet is forwarded by the any router then the routing tables of the intermediate router has to be updated. The redirection message are used to update the routing tables. Here we have a source machine A and a destination machine B and there are two routers in between R1 and R2. Then whenever computer A want to send the message to computer B then it will send the packet to R1 that packet will be forwarded by R1 to router R2 and in turn it will send a redirection message to the A so that the routing table of A is augmented and updated. So the packet is forwarded towards the destination and a redirection message is sent out to the source. For all these five error reporting messages the rest of the header field contains all the values as 0 and the data section of the ICMP header contains the IP header for who these error reporting messages are being generated as well as the first 8 bytes of the IP datagram. The second category of ICMP messages are ICMP query messages. There are two types of messages under query messages. The first is echo the other type of query message is a timestamp message. The echo request and the echo reply messages. For echo request message the type field in the ICMP header contains value 8 and for echo reply messages the type field in the ICMP header format contains value 0. A router or a host may send an echo request messages to test the reachability of a host. It is used to ping a message to another host whether it is reachable or not. If the host is alive then as a response to the echo request message it sends out the echo reply message. The other type of query message is a timestamp request and timestamp reply message. The type field in the ICMP header format contains value 13 for timestamp request messages and the same type field in the ICMP header format contains value 14 for timestamp reply messages. These timestamp messages are used to determine the round trip time needed for IP datagram to travel between any two machines even if their clocks are not synchronized. With simple mathematical formulas the round trip time can be calculated. These timestamp messages can also be used to synchronize the clocks in the two machines. These are the references. Thank you.