Created
December 4, 2019 15:39
-
-
Save rickyzhang82/c2d862b67346bc76c4310bd302e35a15 to your computer and use it in GitHub Desktop.
RFC 793 TCP Connection State Diagram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+---------+ ---------\ active OPEN | |
| CLOSED | \ ----------- | |
+---------+<---------\ \ create TCB | |
| ^ \ \ snd SYN | |
passive OPEN | | CLOSE \ \ | |
------------ | | ---------- \ \ | |
create TCB | | delete TCB \ \ | |
V | \ \ | |
+---------+ CLOSE | \ | |
| LISTEN | ---------- | | | |
+---------+ delete TCB | | | |
rcv SYN | | SEND | | | |
----------- | | ------- | V | |
+---------+ snd SYN,ACK / \ snd SYN +---------+ | |
| |<----------------- ------------------>| | | |
| SYN | rcv SYN | SYN | | |
| RCVD |<-----------------------------------------------| SENT | | |
| | snd ACK | | | |
| |------------------ -------------------| | | |
+---------+ rcv ACK of SYN \ / rcv SYN,ACK +---------+ | |
| -------------- | | ----------- | |
| x | | snd ACK | |
| V V | |
| CLOSE +---------+ | |
| ------- | ESTAB | | |
| snd FIN +---------+ | |
| CLOSE | | rcv FIN | |
V ------- | | ------- | |
+---------+ snd FIN / \ snd ACK +---------+ | |
| FIN |<----------------- ------------------>| CLOSE | | |
| WAIT-1 |------------------ | WAIT | | |
+---------+ rcv FIN \ +---------+ | |
| rcv ACK of FIN ------- | CLOSE | | |
| -------------- snd ACK | ------- | | |
V x V snd FIN V | |
+---------+ +---------+ +---------+ | |
|FINWAIT-2| | CLOSING | | LAST-ACK| | |
+---------+ +---------+ +---------+ | |
| rcv ACK of FIN | rcv ACK of FIN | | |
| rcv FIN -------------- | Timeout=2MSL -------------- | | |
| ------- x V ------------ x V | |
\ snd ACK +---------+delete TCB +---------+ | |
------------------------>|TIME WAIT|------------------>| CLOSED | | |
+---------+ +---------+ | |
TCP Connection State Diagram |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment