Internet Control Message Protocol ICMP ICMP ICMP has

  • Slides: 12
Download presentation
Internet Control Message Protocol ICMP

Internet Control Message Protocol ICMP

ICMP • ICMP has two major purposes: – To report erroneous conditions – To

ICMP • ICMP has two major purposes: – To report erroneous conditions – To diagnose network problems

ICMP Message Format 1 byte Type Which type of message? 1 byte Code Which

ICMP Message Format 1 byte Type Which type of message? 1 byte Code Which sub-type of message? 2 bytes Checksum ? Data Checksum of entire ICMP message Extra data (specific to the type of message)

Important ICMP Messages • • • Echo Request/Reply Destination Unreachable Redirect Time Exceeded Parameter

Important ICMP Messages • • • Echo Request/Reply Destination Unreachable Redirect Time Exceeded Parameter Problem Router Advertisement/Discovery

Echo Request/Reply • Echo Request (Type: 8, Code: 0): – • Echo Response (Type:

Echo Request/Reply • Echo Request (Type: 8, Code: 0): – • Echo Response (Type: 0, Code: 0): – • Requests that the receiving host send a copy (echo) of the request back to the sender The response from the receiving host Using these 2 commands is one way that the ping command can perform its function

Destination Unreachable • Network Unreachable (Type: 3, Code: 0): – • The network of

Destination Unreachable • Network Unreachable (Type: 3, Code: 0): – • The network of the packet’s destination address field could not be reached Network Unknown (Type: 3, Code: 6): – • The network of the packet’s destination address field could not be located Host Unreachable (Type: 3, Code: 1): – • The host specified by the destination address could not be reached Host Unknown (Type: 3, Code: 7): – • The host specified by the destination address could not be located Protocol Unreachable (Type: 3, Code: 2): – • The specified protocol (e. g. TCP or UDP) could not be established with the specified host Port Unreachable (Type: 3, Code: 3): – The specified port number could not be reached

Redirect • Redirect (Type: 5, Code: 0): – – This router knows of a

Redirect • Redirect (Type: 5, Code: 0): – – This router knows of a better path to the specified destination The next router in the new path is provided

Time Exceeded • Time Exceeded (Type: 11, Code: 0): – The router has decremented

Time Exceeded • Time Exceeded (Type: 11, Code: 0): – The router has decremented the hop limit of a packet to zero and dropped the packet

Parameter Problem • Parameter Problem (Type: 12, Code: 0): – Part of all of

Parameter Problem • Parameter Problem (Type: 12, Code: 0): – Part of all of the packet’s IP header was invalid

Router Advertisement/Discovery • Router Advertisement (Type: 9, Code: 0): – • A router announces

Router Advertisement/Discovery • Router Advertisement (Type: 9, Code: 0): – • A router announces its existence using this type of message Router Discovery (Type: 10, Code: 0): – A host explicitly searches for a router

Ping ICMP Echo Response (Type: 0, Code: 0) Destination Source ICMP Echo Request (Type:

Ping ICMP Echo Response (Type: 0, Code: 0) Destination Source ICMP Echo Request (Type: 8, Code: 0)

Traceroute Packet w/ Hop Limit = 1 ICMP Time Limit Exceeded Packet w/ Hop

Traceroute Packet w/ Hop Limit = 1 ICMP Time Limit Exceeded Packet w/ Hop Limit = 2 ICMP Time Limit Exceeded Destination Packet w/ Hop Limit = 3 Router 2 Router 1 Source ICMP Time Limit Exceeded Packet w/ Hop Limit = 4 Response to Packet