ch09
DESCRIPTION
TRANSCRIPT
![Page 1: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/1.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Chapter 9
Internet ControlMessage Protocol
(ICMP)
![Page 2: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/2.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CONTENTSCONTENTS
• TYPES OF MESSAGES• MESSAGE FORMAT• ERROR REPORTING• QUERY• CHECKSUM• ICMP PACKAGE
![Page 3: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/3.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-1
Position of ICMP in the network layer
![Page 4: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/4.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-2
Encapsulation of ICMP packet
![Page 5: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/5.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
TYPES OF
MESSAGES
9.19.1
![Page 6: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/6.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-3
ICMP messages
![Page 7: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/7.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
MESSAGE FORMAT
9.29.2
![Page 8: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/8.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-4
General format of ICMP messages
![Page 9: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/9.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
ERRORREPORTING
9.39.3
![Page 10: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/10.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
ICMP always reports ICMP always reports error messages error messages
to the original source.to the original source.
![Page 11: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/11.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-5
Error-reporting messages
![Page 12: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/12.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Important points about ICMP error messages:Important points about ICMP error messages:1. No ICMP error message for a datagram carrying an ICMP error message.2. No ICMP error message for a fragmented datagram that is not the first fragment.3. No ICMP error message for a datagram having a multicast address.4. No ICMP error message for a datagram with a special address such as 127.0.0.0 or 0.0.0.0.
![Page 13: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/13.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-6
Contents of data field for error messages
![Page 14: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/14.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-7
Destination-unreachable format
![Page 15: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/15.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Destination-unreachable messages with Destination-unreachable messages with codes 2 or 3 can be created only codes 2 or 3 can be created only
by the destination host. by the destination host. Other destination-unreachable Other destination-unreachable
messages can messages can be created only by routers.be created only by routers.
![Page 16: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/16.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A router cannot detect all A router cannot detect all problems that prevent problems that prevent
the delivery of a packet.the delivery of a packet.
![Page 17: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/17.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
There is no flow-control mechanism in the IP protocol.
![Page 18: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/18.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-8
Source-quench format
![Page 19: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/19.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A source-quench message informs A source-quench message informs the source that a datagram has been the source that a datagram has been
discarded due to congestion discarded due to congestion in a router or the destination host.in a router or the destination host.
The source must slow down the sending The source must slow down the sending of datagrams until the congestion of datagrams until the congestion
is relieved.is relieved.
![Page 20: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/20.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
One source-quench message should One source-quench message should be sent for each be sent for each
datagram that is discarded duedatagram that is discarded due to congestion. to congestion.
![Page 21: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/21.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Whenever a router receives a datagram Whenever a router receives a datagram with a time-to-live value of zero, with a time-to-live value of zero,
it discards the datagram and it discards the datagram and sends a time-exceeded message tosends a time-exceeded message to
the original source.the original source.
![Page 22: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/22.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
When the final destination does not receive When the final destination does not receive all of the fragments in a set time, all of the fragments in a set time,
it discards the received it discards the received fragments and sends fragments and sends
a time-exceeded message a time-exceeded message to the original source.to the original source.
![Page 23: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/23.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
In a time-exceeded message, In a time-exceeded message, code 0 is used only by routers code 0 is used only by routers
to show that the value of to show that the value of the time-to-live field is zero. the time-to-live field is zero.
Code 1 is used only by the destination Code 1 is used only by the destination host to show that not all of the host to show that not all of the
fragments have arrived within a set time.fragments have arrived within a set time.
![Page 24: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/24.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-9
Time-exceeded message format
Code 0: Time to liveCode 1: Fragmentation
![Page 25: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/25.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A parameter-problem message can A parameter-problem message can be created by be created by
a router or the destination host.a router or the destination host.
![Page 26: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/26.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-10
Parameter-problem message format
Code 0: Main header problemCode 1: Problem in the option field
![Page 27: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/27.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-11
Redirection concept
![Page 28: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/28.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A host usually starts with a small A host usually starts with a small routing table that is gradually routing table that is gradually
augmented and updated. augmented and updated. One of the tools to accomplish One of the tools to accomplish this is the redirection message.this is the redirection message.
![Page 29: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/29.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-12
Redirection message format
Code 0: Network specificCode 1: Host specificCode 2: Network specific (specified service)Code 3: Host specific (specified service)
![Page 30: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/30.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
A redirection message is A redirection message is sent from a router to sent from a router to
a host on the same local network.a host on the same local network.
![Page 31: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/31.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
QUERY
9.49.4
![Page 32: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/32.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-13
Query messages
![Page 33: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/33.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
An echo-request message can be An echo-request message can be sent by a host or router. sent by a host or router.
An echo-reply message is sent by the An echo-reply message is sent by the host or router which receives host or router which receives
an echo-request message.an echo-request message.
![Page 34: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/34.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Echo-request and echo-reply messages Echo-request and echo-reply messages can be used by network managerscan be used by network managers
to check the operation of the IP protocol.to check the operation of the IP protocol.
![Page 35: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/35.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Echo-request and echo-reply messages Echo-request and echo-reply messages can test the can test the
reachability of a host. reachability of a host. This is usually done by This is usually done by
invoking the invoking the pingping command. command.
![Page 36: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/36.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-14
Echo-request and echo-reply message format
Ping command can use theses messages.
![Page 37: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/37.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-15
Timestamp-request and timestamp-reply message format
![Page 38: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/38.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Sending time value of receive timestamp
value of original timestamp
Receiving time time the packet returned
value of transmit timestamp
Round-trip time sending time
receiving time
![Page 39: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/39.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Timestamp-request and Timestamp-request and timestamp-reply messages can be used to timestamp-reply messages can be used to
calculate the round-trip time calculate the round-trip time between a source and a destination between a source and a destination
machine even if their machine even if their clocks are not synchronized.clocks are not synchronized.
![Page 40: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/40.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Value of original timestamp: 46
Value of receive timestamp: 59
Value of transmit timestamp: 60
Time the packet arrived: 67
Given the following information:
![Page 41: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/41.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Sending time 59 46 13 milliseconds
Receiving time 67 60 7 milliseconds
Round-trip time 13 7 20 milliseconds
We can calculate:
![Page 42: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/42.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Time difference receive timestamp
(original timestamp field one-way time duration)
Given the actual one-way time,
![Page 43: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/43.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Time difference 59 (46 10) 3
We have:
![Page 44: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/44.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
The timestamp-request and The timestamp-request and timestamp-reply messages timestamp-reply messages
can be used to synchronize two can be used to synchronize two clocks in two machines if the clocks in two machines if the
exact one-way time duration is known.exact one-way time duration is known.
![Page 45: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/45.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-16
Mask-request and mask-reply message format
![Page 46: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/46.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-17
Router solicitation message format
![Page 47: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/47.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-18
Router advertisement message format
![Page 48: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/48.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CHECKSUM
9.59.5
![Page 49: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/49.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-19
Example of checksum calculation
![Page 50: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/50.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
ICMPPACKAGE
9.69.6
![Page 51: Ch09](https://reader035.vdocuments.mx/reader035/viewer/2022070303/548c6524b47959f5458b462f/html5/thumbnails/51.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 9-20
ICMP package