Introduction

Download Report

Transcript Introduction

ICMP : Internet Control
Message Protocol
6
1
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
6
2
ICMP Packet Format
20 bytes
IP
header
ICMP message
IP datagram
0
7
8-bit type
8
15 16
8-bit code
31
16-bit checksum
Content depends on type and code
6
3
ICMP Message types
C
Y
M
O
PE
E
D
A
EN
TY
COD
M
PE
EA
ENT
IN
G
--------------------------------0S
O
U
R
0 0 ECHO 4
RE
P
L
Y
5 A
R
EDI
3
DES TIN
TION
0
netw
0 netwo rk
unreac h
1
st
1 ho s t
unreacho
hab
l
2
netw
2 p ro to c o l unreac
3
ho s t
3
p o rt
unreac ha
8 0 EC HO
4
frag
need ed
9 0 R O UT
5
s o urc
e
ro ute
f
10
0 R O UT
6
d es tin
ati
o IM
n
n
e
11
T
E
7
d es tinati
oT
n L
ho
0T
=
8
s o urc e
h
o
s
t
i
s
1 T T L=
9
d es tin
ati
oA
n R
ne
12
P
A
10
d es tin
ati
o
n
h
o
13
0 T IME
11
netwo
rk
u
nrea
14
0T
IM
E
12
ho s t
u
n
reac
h
a
15
0
INF
O
16
INF
O
13
p ro hi
b0
ited
b
y
17
0A
DD
R
14
ho s t
p
rec
ed
en
0
A
R
15
p rec ed18
en
c
eD
cD
uto
6
4
Example: ICMP Port Unreachable Error

Subcode of destination unreachable
# tftp
tftp> connect svr 8888
tftp> get readme.txt
Tranfer timed out.
tftp> quit
PC
svr
tftp
port 69
Readme.txt
6
5
ICMP port unreachable generated by TFTP request
1 arp who-has svr tell pc
2 arp reply svr is-at 0:0:c0:c2:9b:26
3 pc.2924 > svr.8888: udp 20
4 svr > pc: icmp: svr udp port 8888 unreachable
5 pc.2924 > svr.8888: udp 20
6 svr > pc: icmp: svr udp port 8888 unreachable
IP datagram
ICMP message
ICMP data portion
14 bytes
Ethernet
header
20 bytes
IP
header
8 bytes
ICMP
header
20 bytes
IP header of datagram
that generated error
UDP protocol
8 bytes
UDP
header
portnumber 8888
6
6