0% found this document useful (0 votes)
20 views

18 - ICMP Messages Types

acn icmp message types

Uploaded by

aayushparab83
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

18 - ICMP Messages Types

acn icmp message types

Uploaded by

aayushparab83
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

ICMP Message Types

• ICMP messages are divided into two types.

ICMP Message

Error Reporting
messages Query Messages
Types of Error Reporting Messages
• ICMP has five types of error reporting messages :
1. Destination Unreachable
2. Source Quench
3. Time exceeded
4. Parameter Problems
5. Redirection
Destination Unreachable
• This error occurs when the packet does not reach the
destination.
• Suppose the sender sends the message, but the
message does not reach the destination.
• The intermediate router reports to the sender that
the destination is unreachable and will discard the
packet.
• Type: It defines the type of message and number 3
specifies that the destination is unreachable.
• Code (0 to 15): It is a 4-bit number which identifies
whether the message comes from some intermediate
router or the destination itself.
Source Quench
• There is no flow control or congestion control mechanism in
the network layer or the IP protocol.
• The sender is concerned with only sending the packets,
whether the receiver is ready to receive those packets or is
there any congestion occurs.
• In this case, ICMP provides feedback, i.e., source quench.
• A host and router uses source quench messages in order to
tell the original source that congestion has occured.
• The sender must either stop or slow down the sending of
datagrams until the congestion is reduced.
• The router sends one source-quench message for each
datagram that is discarded due to the congestion
Time exceeded

• When there are many routers that exist between the


sender and the receiver it moves in a routing loop.
• The time exceeded is based on the time-to-live value.
• When the packet traverses through the router, then
each router decreases the value of TTL by one.
• When a router decreases a datagram TTL value to Zero
then the router discards a datagram.
• It sends the time exceeded message to the original
source.
• The type of time-exceeded is 11, and the code can be
either 0 or 1.
• The code 0 is used by the routers to show the TTL
value is reached to zero.
• The code 1 is used by the destination to show that all
the fragments do not reach within a set time.
Parameter problems
• This message conveys that some parameters are not
properly set.
• This message can be created either by a router or
destination host.
• If router or destination host comes across any ambiguity
or missing value in any field of datagram then it simply
discards that datagram.
• It sends the parameter problem message back to the source
originating that message.

• Type message is 12, when code =0, then datagram is discarded


because error or ambiguity present in one of header field.
• When code =1 then datagram is discarded because required
part of an option is missing.
Redirection

• If router or host wants to send a packet to another


network then it should know the IP address of next
router.
• The router and host must have routing table to find the
address of next router.
• The routing table has to be updated automatically on a
continuous basis.
• ICMP sends a redirection message back to its host to
carry out an automatic periodic updating.
Type : 5 Code : 0 to 3 Checksum
IP address of the target router
Part of received IP datagram including IP
header plus the first 8 bytes of datagram data

• Router does not discard the erroneous datagram instead


it is sent to appropriate target router.
• This process of redirection is done through contents of
code field.
ICMP Query Messages

• ICMP Query message is used for error handling.


• Query Message is a group of two pairs that are being
used:
1. Echo Request and Reply
2. Timestamp Request and Reply.
Echo Request and Reply
• A router or a host can send an echo-request message used to
ping a message to another host to check it is alive or not.
• If the other host is alive, then it sends the echo-reply
message.
• They can be used by the network managers to check the
operation of the IP protocol.
• The echo-request and reply message check the host's
reachability, and it can be done by invoking the ping
command.

• The type of echo-request is 8, and the request of


echo-reply is 0.
Timestamp Request and Reply
• Pair of messages can be used to find out the round trip
time that an IP datagram needs to travel between them.
• It can also be used for synchronizing the clock signals
used on the two machines.
• Timestamp request message is created by source and it
fills the original timestamp field at departure time and
fills other two with zeros.
• The destination then fills up receive timestamp field by
time at which the request was received.
• At end destination fills up the transmit timestamp field
with the departure time of reply message.
• Computation of one way or round trip time (RTT):
- WE can use pair of timestamp messages to compute the one
way or RTT.
- Sending time = receive timestamp – original timestamp
- Receiving time = returned timestamp – transmit timestamp
- Round trip time = sending time + receiving time.

You might also like