-
-
Save 331527583/5122fa93900bb838a4beeac637a2a69f to your computer and use it in GitHub Desktop.
TCP
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
Transmission Control Protocol | |
Functional Specification | |
+---------+ ---------\ 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