1 6 icmp : internet control message protocol. 2 6 introduction - problem error messages and...
TRANSCRIPT
1
6
ICMP : Internet Control Message Protocol
2
6
Introduction - Problem
Error messages and conditions to draw attention
acted on IP - UDP - TCP
ICMP message can generate errors to user process
query-message <--> error message
3
6
ICMP Packet Format
ICMP messageIP
headerIP datagram
20 bytes
8-bit type 8-bit code 16-bit checksum
Content depends on type and code
0 7 8 15 16 31
4
6
ICMP Message types
TYPE CODE MEANING-----------------------4 0 SOURCE QUENCH5 REDIRECT
0 network1 host2 network & TOS3 host & TOS
8 0 ECHO REQUEST (ping request)9 0 ROUTER ADVERTISEMENT10 0 ROUTER SOLICITATION11 TIME EXCEEDED
0 TTL=0 during transmit1 TTL=0 during reassembly
12 PARAMETER PROBLEM13 0 TIMESTAMP REQUEST14 0 TIMESTAMP REPLY15 0 INFO REQUEST16 0 INFO REPLY17 0 ADDRESS MASK REQUEST18 0 ADDRESS MASK REPLY
TYPE CODE MEANING-----------------------0 0 ECHO REPLY (ping reply)3 DESTINATION UNREACHABLE
0 network unreachable1 host unreachable2 protocol unreachable3 port unreachable4 frag needed5 source route failed6 destination network unknown7 destination host unknown8 source host isolated9 destination network administratively prohibited10 destination host administratively prohibited11 network unreachable for TOS12 host unreachable for TOS13 prohibited by filtering14 host precedence violation15 precedence cutoff
5
6
Example: ICMP Port Unreachable Error
Subcode of destination unreachable
# tftp
tftp> connect svr 8888
tftp> get readme.txt
Tranfer timed out.
tftp> quit
tftpport 69
tftpport 69
Readme.txt
PC
svr
6
6
ICMP port unreachable generated by TFTP request
1 arp who-has svr tell pc2 arp reply svr is-at 0:0:c0:c2:9b:26
3 pc.2924 > svr.8888: udp 204 svr > pc: icmp: svr udp port 8888 unreachable
5 pc.2924 > svr.8888: udp 206 svr > pc: icmp: svr udp port 8888 unreachable
IP header
IP datagram
20 bytes
Ethernet header
14 bytes 8 bytes
ICMP headerIP header of datagram
that generated errorUDP
header
20 bytes 8 bytes
ICMP message
ICMP data portion
portnumber 8888UDP protocol