Upload
marvin-garcia
View
219
Download
0
Embed Size (px)
Citation preview
8/3/2019 4-IE-ICMP
1/17
Internet Engineering (Adel Nadjaran Toosi) Slide 1
Internet Control MessageProtocol (ICMP)
Adel Nadjaran Toosi
http://NadjaranToosi.mshdiau.ac.irEmail: [email protected]
8/3/2019 4-IE-ICMP
2/17
Internet Engineering (Adel Nadjaran Toosi) Slide 2
Internet Control Message Protocol (ICMP)
for Supervisory Messages
Host Unreachable
Error Message
Router
EchoRequestEcho
Response
ICMP Message IP Header
8/3/2019 4-IE-ICMP
3/17
8/3/2019 4-IE-ICMP
4/17
Internet Engineering (Adel Nadjaran Toosi) Slide 4
Abstract Function
Error reporting
Reachability testing
Congestion control
Route change notification
Performance measuring
Subnet addressing
8/3/2019 4-IE-ICMP
5/17
Internet Engineering (Adel Nadjaran Toosi) Slide 5
ICMP Format 15 different types.
Some types use a code to further specify thecondition.
IP header ICMP message
8-bit type 8-bit code 16-bit checksum
(content depends on type and code)
8/3/2019 4-IE-ICMP
6/17
Internet Engineering (Adel Nadjaran Toosi) Slide 6
ICMP MessageType
Type Field: Identifies message type
Type ICMP Message Type
0 Echo Reply
3 Destination Unreachable
4 Source Quench
5 Redirect (change a route)
8 Echo Request
11 Time Exceeded for a Datagram
12 Parameter Problem on a Datagram
13 Timestamp Request
14 Timestamp Reply
17 Address Mask Request
18 Address Mask Reply
8/3/2019 4-IE-ICMP
7/17
Internet Engineering (Adel Nadjaran Toosi) Slide 7
8/3/2019 4-IE-ICMP
8/17
Internet Engineering (Adel Nadjaran Toosi) Slide 8
Echo Request and Reply Message Format
Used when ping is invoked
Identifier and Sequence# used for the sender to matchreplies to request.
Optional Data: variable length field containing data to be
returned to the sender.
8/3/2019 4-IE-ICMP
9/17
8/3/2019 4-IE-ICMP
10/17
Internet Engineering (Adel Nadjaran Toosi) Slide 10
Congestion and Datagram Flow Control
A machine uses ICMP source quench messages
to report congestion to the original source. A source quench message is a request for the
source to reduce its current rate of datagram
transmission. No ICMP message to reverse source quench
message. Sources after receiving a quenchmessage reduce their transmission rate and thengradually increase their rate provided noadditional quench messages are received.
8/3/2019 4-IE-ICMP
11/17
Internet Engineering (Adel Nadjaran Toosi) Slide 11
Route Change Request from Routers
Routers are assumed to know the correct routes.
Host begin with minimal routing information andlearn new routes from routers.
When a router detects a host using a nonoptimal
route, it sends the host a redirect message,
requesting that the host change the route.
Redirect messages limited to interactions between
a router and a directly connected network.
8/3/2019 4-IE-ICMP
12/17
Internet Engineering (Adel Nadjaran Toosi) Slide 12
ICMP Redirect Message
Redirect message Format
Router Internet Address address of the router that the host is to use to reach the destination
Code Value Meaning
0 Redirect datagrams for the Net(obsolete)
1 Redirect datagrams for the Host
2 Redirect datagrams for the Type of Service andNet
3 Redirect datagrams for the Type of Service andHost
8/3/2019 4-IE-ICMP
13/17
Internet Engineering (Adel Nadjaran Toosi) Slide 13
Detecting Circular or Excessively Long
Routes
Cycle can be produced
ICMP time exceeded message sent When Time-to-live counter value = 0, the datagram is
discarded.
Timeout occurs while waiting for fragments, thefragments are discarded.
Message Format
Code = 0 means time-to-live count exceeded Code = 1 means fragment reassembly time exceeded
8/3/2019 4-IE-ICMP
14/17
Internet Engineering (Adel Nadjaran Toosi) Slide 14
Parameter Problems
When a router encounters a problem with a
datagram not covered by other ICMP errormessages such as an incorrect datagram header, a
parameter problem message is sent to the source.
Message Format Code= 1 is used to report that a required option is missing (i.e.,
security option in military community)
Pointer Field: identify the octet field in the datagram that caused
the problem. Not used when Code = 1
8/3/2019 4-IE-ICMP
15/17
Internet Engineering (Adel Nadjaran Toosi) Slide 15
Clock Synchronization and Transit Time
Estimation
Clocks differ widely in a distributed systemsenvironment.
ICMP message can be used to obtain time informationfrom other machines.
ICMP timestamp request message
ICMP timestamp reply message Type = 13 (request), 14(reply)
Identifier and Sequence Number to match request with replies
Originate timestamp: timestamp of sender (T1)
Receive timestamp: timestamp upon receipt at receivers end (T2) Transmit timestamp: timestamp immediately before the reply is sent
(T3)
8/3/2019 4-IE-ICMP
16/17
Internet Engineering (Adel Nadjaran Toosi) Slide 16
Clock Synchronization and Transit Time
Estimation
SenderSender
T1T1T2T2
T3T3
T4T4
RTT = (T4T1)(T3T2)
= T2(T1 + (RTT / 2) )
ReceiverReceiver
8/3/2019 4-IE-ICMP
17/17
Internet Engineering (Adel Nadjaran Toosi) Slide 17
THANK YOU