TCP State Machine (TCP/IP Illustrated vol. 1) W. Richard Stevens

Post on 31-Dec-2015

35 views 7 download

description

TCP State Machine (TCP/IP Illustrated vol. 1) W. Richard Stevens. Client transitions. Starting point. Server transitions. CLOSED. Appl: passive open send:

Transcript of TCP State Machine (TCP/IP Illustrated vol. 1) W. Richard Stevens

1

TCP State Machine (TCP/IP Illustrated vol. 1) W. Richard Stevens

CLOSED

LISTEN

SYN_SENTSYN_RCVD

ESTABLISHED CLOSE_WAIT

LAST_ACK

CLOSINGFIN_WAIT_1

TIME_WAITFIN_WAIT_2

Starting point

Appl: passive open

send: <nothing.Appl: active open

send: SYN

Appl: close

Or timeout

App: send data

Send:SYNRecv:RST

Recv:SYN; send:SYN-ACK

Recv: SYN; send:SYN-ACK

simultaneous open

Recv:ACK; send:<nothing.

Recv:SYN,ACKSend:ACK

Data transfer state Appl : close

Send:

FIN

passive close

Recv:ACK

Send:

nothing

Appl:

close

Close:

FIN

Appl: close

Send:FIN

Recv:FIN

send: ACK

Recv:FIN,ACK;

send:ACK

Recv:FIN

send:ACK

Recv: ACK

send:

<nothing>

Recv: ACK

send: nothing

Simultaneous close

2MSL timeoutActive close

Client transitions

Server transitions