Professional Documents
Culture Documents
0 16 31
4-bit 4-bit header 8-bit type of service
16-bit total length (in bytes)
version length (TOS)
D M
16-bit identification 0 13-bit fragment offset
F F
8-bit time to live
8-bit protocol 16-bit header checksum 20 bytes
(TTL)
data
UDP Header
0 16 31
16-bit source port number 16-bit destination port number
8 bytes
16-bit UDP length 16-bit UDP checksum
TCP Header
0 16 31
ap sen
pl:
ac : SY
timeout
tiv
LISTEN
d
send: RST
eo
C K
pe
,A passive open
N
ap
n
SYN pl
:s
d: se en
sen T nd d
N; RS : S da
Y v: YN ta
v:S rec
rec
recv: SYN appl: close
SYN_RCVD SYN_SENT
send: SYN, ACK or timeout
simultaneous open active open
se r K
nd ecv: , AC
:< A N K
no CK SY AC
th v: nd:
in c
g> re se
se
lo appl: close
:l c FIN
p send: FIN
ap nd:
se
simultaneous close
recv: FIN recv: ACK
FIN_WAIT_1 CLOSING LAST_ACK
send: ACK send: <nothing>
re
cv
: passive close
se FIN
recv: ACK nd recv: ACK
send: <nothing> : A , AC send: <nothing>
CK K
recv: FIN
FIN_WAIT_2 TIME_WAIT
send: ACK
2MSL timeout
active close