0% found this document useful (0 votes)
27 views5 pages

ICMP Notes

Internet Control Message Protocol notes

Uploaded by

sthapana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
27 views5 pages

ICMP Notes

Internet Control Message Protocol notes

Uploaded by

sthapana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
(G-2092) Fi 7 2 Fon f (6-2092) Fig. 1.10.7 : Fo, mat of tim, 'estam, 11. ICMPy4 (Inte: i Protocol) : P Option net Contro} Message The IP provides unreliable and con, delivery, and makes an efficie resources. Nectionless datagram nt use of network IP is a best-effort delivery (which does not Provide any guarantee) service that takes a datagram from its original source to its final destination. However, IP has two drawbacks : 1. __ It does not have any error control mechanism. 2. It does not have any assistance mechanism. The Internet Control Message Protocol (ICMP) is used to overcome these drawbacks. It is used alongwith IP. It reports presence of errors ahd sends the control messages on behalf of IP. ICMP does not attempt to make IP a reliable protocol. It simply attempts to report errors and provide feedback on specific conditions. ICMP messages are carried as IP packets and are therefore unreliable. ICMP is a network layer protocol. IP also lacks a mechanism for host and management queries. A host sometimes wants to know if a router or another host is operating or dead. And sometimes a network manager needs information from another computer on the network (such as host or router). Fig. 1.11.1 shows the position of ICMP with respect to the IP and other protocols in the network layer. Network layer (G-2102) Fig. 1.11.1 : Position of ICMP © Scanned with OKEN Scanner col namely Tere rw of CP pot ena aa cman th ong em potrg to alee IEMA 4.14.1 ICMP Enoapsulation : JEM cpeemes inthe retort Iyer but i meeeages ae Anew paaeendt clreethy to the dintn fink Inver Instead, the reseages are fist mncagelnted Inside IP datagrams ‘4 then sem tthe owe ay = TWein es shown in Fig 112.2 {©-210% Fig, 2.11.2 :JOMP encapsulation ~ The ping command uses ICMP as a probe to test ‘whether 2 station ts reachable, Ping packages an ICMP ‘echo request message in a datagram and sends it to a selected destination, The user chooses the destination Sy specifying its IP address or name on the command line in a form such as: ing 10050.25.1 When the destination receives the echo request iessage. (responds by sending an ICMP echo reply message. Ifa reply is not returned within a set time, [Bing resends the echo request several more times. If no ‘reply arrives, ping indicates that the destination ig unreachable. ~ Another utility that uses ICMP is trace route, which Provides a list of all the routers along the path to a specified destination, 1.11.2 ICMP Messages : ~ _JEMP messages are of two types: 1. Error reporting messages 2. Query messages, ~ Ha host or a router encounters & problem after Processing an IP problem, then it uses the error reporting messages for reporting the problem, ‘or a network manager can Use A host sme specific information messages 10 get $0 per host. router or anoth 444.3 Mo 1.11. shows the general format of IcMp fig jen te obit he (0.2105 Fig. 1.11.3 : General format of ICMP messages {As shown in Fig. 1.11.3, the header of an ICMP is 8:byte long and the data section is ofa variable gt The general header format for each ICMP massane, diferent. But the first four bytes are common to al message types. 1. Type: This B-bit field is used for defining the types ¢ message. is B-bit field is used for specifying the reason the particular message type. ~ The last common field is the checksum field whid is 16 bit (2 byte) long, We will discuss i later in th chapter. The information to find the original packet tha had error is included in the data section of the error messages. Whereas the data section in the query messages Contains extra information depending on the type of query. 1.12 Error Reporting Messages SOICMP was designed to assist IP. But ICMP does comect the errors. It simply reports them and leaves the HOF cotrection job to the higher level Protocols. © scanned with OKEN Scanner WW ACN (Comp. /Sem. 5/MSBTEY ICMP always sends the error reporting messages back to the original source, ICMP has five types of error. reporting messages, Fig. 1121 shows different types of error reporting messages. [— 1. Destination unroachabio [+ 2. Source quench Enror porting —}_+ 3. Time exceeded [+ 4. Parameter problems L_.. 5. Redirection {G-2104 Fig. 1.12.1 : Error reporting messages ICMP makes use of the source IP address for sending the error message back to original source of erroneous datagram. some of the important points about ICMP error messages are as follows : Ifa datagram containing and ICMP error message received, then no ICMP error message will be generated in response to it. L ‘An ICMP error message will not be generated for a fragmented datagram that is not the first fragment. Any ICMP error message will not be generated for a datagram which has multicast address. An ICMP error message will not be generated for a datagram which has a special address such as 127.0.0.0 or 0.0.0.0 It is important to note that the data section of every error message, contains the IP address of the original datagram in addition to the 8 bytes of data in that datagram. The header of the original datagram is included in the error message, to ensure that the error message will reach the original source. Juded because in TCP The additional 8 byte dats and UDP, the first 8 bytes of information contains information about the port numbers for TCP and UDP ‘and sequence number for TCP. The source can use this information and convey to TCP ‘and UDP protocols that an error has occurred. 4:33 Network Layer & Protocol Then the error packet, formed by ICMP, is encapsulated in an TP datagram as shown in Fig: 1.22. Flecelved datagram (G-2106) Fig. 1.12.2 : Data field contents for the error message Now let us discuss the ICMP error messages one by one. 1.12.1 Destination Unreachable : When it is not possible for a router to route the datagram or when a host is unable to deliver a datagram, then the datagram is discarded and the destination unreachable error message is sent back by the respective host or router to the source host which originated the datagram. The format of the destination unreachable error message is as shown in Fig. 1.123. [+ 8 bis —>}e— 8 bits +} 16 bits ———1 ‘Unused (All 0's) 7, Dala section : Contains a part of recelved IP | [daiagram including IP header +8 byte datagram data] (G-2107 Fig, 1.12.3 : Destination unreachable format The code field for the destination unreachable error message has 16 different values (0 to 15) and each one specifies a reason for discarding a datagram. 1. Code 0 : This code specifies the reason for discarding the datagram as : network is not reachable, possibly due to hardware failure. 2. Code 1: The host is not reachable, possibly due to hardware failure. 3. Code 2: It is not possible to reach the Protocol. This code is used when a higher level protocol such as TCP. UDP, OSPF is not running at the destination host, ‘ i . Code 3 : It is not possible to reach the used when the appieaen Port. This code ig oe ener © Scanned with OKEN Scanner tion host can create Code 2 ang nat duced es. szage wit code 418 PNT messed spf ter codes CO COG 2 ang error mi e a ane rragmentation reat spine | 3. Themes py the out the flog sua op) felé . be created only se gt nica done but the do not he dtagr ve of ce een set bythe sender of He SIRT she none ction oe datagram has should not be do 4 emeraiee te entation " Which says that i i ne the routing of the does cee fr the cote 19 dene cna ro 5. Fes met Pe pnevet the packet delivery. ee ish the source problems that Pt . x i it Message : 6 Code 5 : It is not possible to accom; . =f Evor ; is not possible for the datagram 10 vis! 4.42.2 Source Quen me ench messages in orgy routing, ‘one or more routers that are specified in the rout options. ‘Code 6 : The destination network is not known, (we are ‘not saying itis unreachable). Here the router does not hhave any information about the destination network, 2 8 Code 7 : The destination host is not known, (again we are not saying that the destination host is unreachable {5 is the case for code 1), For code 7, the router does Not have any information about the destination host. 9. Code 8 : The source host has been isolated. 410. Code 9 : The communication with the destination ‘network has been prohibited by the administration. 11. Code 10 : The communication with destination host is Prohibited by the administrator, 12, Code 11 : It is not possible to reach the network for a Particular type of service. Here it is not possible for the router to route the datagram because the source is ‘asking for an unspecified type service. 13. Code 12 : It is not possible to reach the host for a articular type of service, 14, Code 13 : It is not possible to reach the host because a filter has been installed by the administrator, 15. Code 14 : The host is not reachable because the host precedence has been violated, 16. Code 15 :Itis not possible to reach the host because its Precedence is cut off. This message is generated when the datagram is sent with a precedence below a level of Precedence set by the network operator, for the operation of the network. otes : The destination host or routers can produce the destination unreachable message. to eg ets uses source q host or router " te tel the original source that congestion has occuny : it rate of its current rate of pack 4 it to reduce 7 and to reques transmission. / there is no flow control or congestion conta re in mechanism in IP. So the source quench message ICMP is designed to add some kind of flow control and " congestion control to IP. This message serves two purposes : 1. ‘It tells the source that the packet has been discarded and, 2, It gives a warning to the source that the source should slow down (quench) because congestion has taken place somewhere, Fig. 1.124 shows the format of the source quench error message, be 8 bits ~s-— 8 bits 4+ — 16 bits ——+ Type 4 Unused (All zeros) ala : Part ofthe recoived IP datagram inclugh@ JP header + the frst 8 bytes of datagram data.” (G-2108) Fig. 1.12.4 : Source quench format A source - quench message, one per discarded is sent back by a router or host. datagram due to congestio destination host, to the source But the congestion relieved message cannot be sent” tothe Source host as no such mechanism exist, AS no such message could be sent back, the source | 4 © Scanned with OKEN Scanner 1.12.3 Time Exceeded Error Message WE ACN (Comp. Sem. sausete) The congestion can happen due to two types of communications 1. Due tone to one communication or 2 = Inthe one to one communication, a single source host will be responsible for congestion because of its high data transmission rate, The source quench message will be useful under such operating conditions, for reducing the transmission rate of the source host and clear the congestion. Due to many to one communication, But this message will not prove to be successful if congestion occurs in the many to one type communication. This is because the router destination host does not know which source is fast and responsible for the congestion. is or As a result it may discard the packets received from the slowest source instead of dropping them from a fast source which is actually responsible for congestion. ‘This message is generated in two cases : 1. Ifa router receives a packet with 2 0 in the TTL field then it discards that datagram and send a time exceeded message back to the source originating that packet. 2. Ifall the fragments which are parts of a message do not arrive at the destination host within a certain time limit then time exceeded message is sent back, The format of the time exceeded message is as shown in Fig. 1225. Je 8 bits —s}e— 8 bits —+}e—— 16 bits ——] “Type: 11 foods :0 or j Checksum Ts (Unused (All zeros) (G-2109) Fig, 1.12.5 : Message format of time ‘exceeded error message Refer the code field. Its value can be either 0 or 1. If code = 0, then the router will discard the datagram because the value of TTL (time to live) field is zero. H code = 4, then destination host discards the fragments, of datagram because some fragments could Network Layer & Protocols Parameter Problem Error Message Parameter problom mossage : There should not be any ambiguity in the header part of the packet. If a router or destination host comes across such ambiguity or missing value in any field of the datagram then it simply discards that datagram and sends the parameter problem message back to the source originating that message. This message can be created either by a router or the destination host, ‘The message format of the parameter problem error message is as shown in Fig. 1126. Refer to the code field which has two possible values, 0 and 1. Ths field, depending on its value will specify the reason for discarding the datagram as follows : 1. Code = 0 : If code = 0, then the datagram is discarded because of an error or ambiguity present in one of the header fields. The erroneous byte is pointed at by the value of the pointer field. For example if pointer field = 0, then the first byte is an invalid field. . Code = 1: If code =1, then the datagram is, discarded because required part of an option is, missing. The format of the parameter problem is as shown in Fig. 1126, fe Bits He 8 bits —4}+——— 16 bits ———+ Type: 12:]Gode 10 or ‘Checksum | Pointer ‘Unused (All zeros) Tih; Part of the received IP datagram including = IP hoader plus the fist 8 bytes of datagram data (6-2110) Fig. 1.12.6 : Format of parameter problem error message 1.12.5 Redirection Error Message : Ta router or host wants to send a packet to another ‘retwork then it should know the IP address of the next router, ie eee © Scanned with OKEN Scanner

You might also like