Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous...

12
Internet Control Internet Control Message Protocol Message Protocol ICMP

Transcript of Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous...

Page 1: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Internet Control Message Internet Control Message ProtocolProtocol

ICMP

Page 2: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

ICMPICMP

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

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

Page 3: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

ICMP Message FormatICMP Message Format

Type

Code

Checksum

Data

1 byte

1 byte

2 bytes

?

Which type of message?

Which sub-type of message?

Checksum of entire ICMP message

Extra data (specific to the type of message)

Page 4: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Important ICMP MessagesImportant ICMP Messages

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

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

Page 5: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Echo Request/ReplyEcho Request/Reply

• Echo Request (Type: 8, Code: 0):– Requests that the receiving host send a copy

(echo) of the request back to the sender

• Echo Response (Type: 0, Code: 0):– The response from the receiving host

• Using these 2 commands is one way that the ping command can perform its function

• Echo Request (Type: 8, Code: 0):– Requests that the receiving host send a copy

(echo) of the request back to the sender

• Echo Response (Type: 0, Code: 0):– The response from the receiving host

• Using these 2 commands is one way that the ping command can perform its function

Page 6: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Destination UnreachableDestination 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

• 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

Page 7: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

RedirectRedirect

• 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

• 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

Page 8: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Time ExceededTime Exceeded

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

packet to zero and dropped the packet

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

packet to zero and dropped the packet

Page 9: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Parameter ProblemParameter Problem

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

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

Page 10: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

Router Advertisement/DiscoveryRouter 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

• 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

Page 11: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

PingPing

ICMP Echo Request (Type: 8, Code: 0)

ICMP Echo Response (Type: 0, Code: 0)

Des

tinat

ion

Sou

rce

Page 12: Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.

TracerouteTraceroute

Des

tinat

ion

Rou

ter

1

Rou

ter

2

Rou

ter

3

Packet w/ Hop Limit = 1

ICMP Time Limit Exceeded

Packet w/ Hop Limit = 2

ICMP Time Limit Exceeded

ICMP Time Limit Exceeded

Packet w/ Hop Limit = 3

Response to Packet

Packet w/ Hop Limit = 4

Sou

rce