Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
1
Internet Control Message Protocol
• The Internet Control Message Protocol (ICMP) is a
helper protocol that supports IP with facility for
– Error reporting
– Simple queries
• ICMP messages are encapsulated as IP datagram:
DR. SUDHIR SHELKE
2
ICMP message format
additional information
or
0x00000000
type code checksum
bit # 0 15 23 248 317 16
4 byte header:
• Type (1 byte): type of ICMP message
• Code (1 byte): subtype of ICMP message
• Checksum (2 bytes): similar to IP header checksum.
Checksum is calculated over entire ICMP message
If there is no additional data, there are 4 bytes set to zero.
3
ICMP Error message
• ICMP error messages include the complete IP header and
the first 8 bytes of the payload (typically: UDP, TCP)
Unused (0x00000000)
IP header ICMP header IP header 8 bytes of payload
ICMP Message
from IP datagram that triggered the error
type code checksum
4
ICMP Error message
• ICMP error messages report error conditions
• Typically sent when a datagram is discarded
• Error message is often passed from ICMP to the application
program
Host
IP datagram
Host or router
ICMP Error
Message
IP datagram
is discarded
5
Frequent ICMP Error message
Type Code Description
3 0–15 Destination
unreachable
Notification that an IP datagram could
not be forwarded and was dropped. The
code field contains an explanation.
5 0–3 Redirect Informs about an alternative route for
the datagram and should result in a
routing table update. The code field
explains the reason for the route change.
11 0, 1 Time
exceeded
Sent when the TTL field has reached
zero (Code 0) or when there is a timeout
for the reassembly of segments (Code 1)
12 0, 1 Parameter
problem
Sent when the IP header is invalid (Code
0) or when an IP header option is
missing (Code 1)
DR. SUDHIR SHELKE
6
Some subtypes of the “Destination
Unreachable”
Code Description Reason for Sending
0 Network
Unreachable
No routing table entry is available for the
destination network.
1 Host
Unreachable
Destination host should be directly
reachable, but does not respond to ARP
Requests.
2 Protocol
Unreachable
The protocol in the protocol field of the IP
header is not supported at the destination.
3 Port
Unreachable
The transport protocol at the destination
host cannot pass the datagram to an
application.
4 Fragmentation
Needed
and DF Bit Set
IP datagram must be fragmented, but the DF
bit in the IP header is set.
DR. SUDHIR SHELKE

More Related Content

Icmp

  • 1. 1 Internet Control Message Protocol • The Internet Control Message Protocol (ICMP) is a helper protocol that supports IP with facility for – Error reporting – Simple queries • ICMP messages are encapsulated as IP datagram: DR. SUDHIR SHELKE
  • 2. 2 ICMP message format additional information or 0x00000000 type code checksum bit # 0 15 23 248 317 16 4 byte header: • Type (1 byte): type of ICMP message • Code (1 byte): subtype of ICMP message • Checksum (2 bytes): similar to IP header checksum. Checksum is calculated over entire ICMP message If there is no additional data, there are 4 bytes set to zero.
  • 3. 3 ICMP Error message • ICMP error messages include the complete IP header and the first 8 bytes of the payload (typically: UDP, TCP) Unused (0x00000000) IP header ICMP header IP header 8 bytes of payload ICMP Message from IP datagram that triggered the error type code checksum
  • 4. 4 ICMP Error message • ICMP error messages report error conditions • Typically sent when a datagram is discarded • Error message is often passed from ICMP to the application program Host IP datagram Host or router ICMP Error Message IP datagram is discarded
  • 5. 5 Frequent ICMP Error message Type Code Description 3 0–15 Destination unreachable Notification that an IP datagram could not be forwarded and was dropped. The code field contains an explanation. 5 0–3 Redirect Informs about an alternative route for the datagram and should result in a routing table update. The code field explains the reason for the route change. 11 0, 1 Time exceeded Sent when the TTL field has reached zero (Code 0) or when there is a timeout for the reassembly of segments (Code 1) 12 0, 1 Parameter problem Sent when the IP header is invalid (Code 0) or when an IP header option is missing (Code 1) DR. SUDHIR SHELKE
  • 6. 6 Some subtypes of the “Destination Unreachable” Code Description Reason for Sending 0 Network Unreachable No routing table entry is available for the destination network. 1 Host Unreachable Destination host should be directly reachable, but does not respond to ARP Requests. 2 Protocol Unreachable The protocol in the protocol field of the IP header is not supported at the destination. 3 Port Unreachable The transport protocol at the destination host cannot pass the datagram to an application. 4 Fragmentation Needed and DF Bit Set IP datagram must be fragmented, but the DF bit in the IP header is set. DR. SUDHIR SHELKE