Penguin
Annotated edit history of TCP version 16, including all changes. View license author blame.
Rev Author # Line
16 LawrenceDoliveiro 1 TCP is an [Acronym] of TransmissionControlProtocol. It is part of the [TCP/IP] protocol stack.
12 PerryLorier 2
16 LawrenceDoliveiro 3 TCP is connection-oriented: before two parties can communicate, they must ''open'' a common connection; after they have finished communicating, they ''close'' the connection. The initiation of the connection is ''asymmetric'': one end needs to ''listen'' for connection attempts, while the other end initiates a connection during this time. However, once the connection is opened, it is ''symmetric'' and ''full-duplex''--both ends are equally capable of transmitting arbitrary information at arbitrary times.
4
5 TCP is an ordered stream--data sent from one end will arrive at the other end in the same order. Communication is ''reliable''--all transmissions are automatically acknowledged, with timeouts and retries if any lower-level packets are lost, including automatic sequencing to detect duplicates (as can happen when a lower-level packet wasn't "lost", but simply took too long to arrive). Compare [XCP] and [DCCP].
12 PerryLorier 6
7 Someone who's done 312 recently want to write a big long discussion about Nagle, Slow start, backoff, congestion control, window sizes etc?
14 JohnMcPherson 8
9 We have separate pages discussing TcpStates, and the TcpWindow.
10
11 !!TCP Header:
12 PerryLorier 12
13 |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
14 ||||||||||||||||||||||||||||||||^[IPv4]/[IPv6] Header
15 ||||||||||||||||Source Port |||||||||||||||| Destination Port
16 |||||||||||||||||||||||||||||||| Sequence Number
17 |||||||||||||||||||||||||||||||| Acknowledgement
18 ||||Data Offset||||Reserved|[CWR]|[ECE]|[URG]|[ACK]|[PSH]|[RST]|[SYN]|[FIN]||||||||||||||||Window
19 ||||||||||||||||Checksum||||||||||||||||Urgent Pointer
20 ||||||||||||||||||||||||||||||||Optional Options / Padding
21 ||||||||||||||||||||||||||||||||v Data
22
23 !!TCP Options:
24
25 ! End of option list
26 |00|01|02|03|04|05|06|07
27 |||||||| 0
28
29 ! No Op (Padding)
30 |00|01|02|03|04|05|06|07
31 |||||||| 1
32
33
34 ! Maximum Segement Size
35 |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
36 |||||||| 2 |||||||| length (4) |||||||||||||||| MSS
37 |||||||||||||||| MSS (Continued) ||||||||||||||||
38
39 ! Window Scale Option
40 |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
41 |||||||| 3 |||||||| length (3) |||||||| Shift Count ||||||||
42
43
44 ! [SACK]
45 |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15
46 |||||||| 4 |||||||| length (2)
47
48 ! [SACK] Information
49 |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
50 |||||||| 5 |||||||| length |||||||||||||||| Left edge of first block
51 |||||||||||||||| Left edge of first block (continued) |||||||||||||||| Right edge of first block
52 |||||||||||||||| Right edge of first block (continued) |||||||||||||||| .....
53 |||||||||||||||| ....... |||||||||||||||| Left edge of last block
54 |||||||||||||||| left edge of last block (continued) |||||||||||||||| Right edge of last block
55 |||||||||||||||| Right edge of last block (continued)
56
57
58 ! TCP Timestamps
59 |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
60 |||||||| 8 |||||||| length (10) |||||||||||||||| TS Value
61 |||||||||||||||| TS Value (Continued) |||||||||||||||| TS Echo Reply
62 |||||||||||||||| TS Echo Reply (Continued) ||||||||||||||||
63
64 ----
65
66 See also:
67 * [A very nice cheat sheet | http://www.sans.org/newlook/resources/tcpip.pdf] for [TCP/IP]
68 * [assigned tcp options|http://www.iana.org/assignments/tcp-parameters]
13 PerryLorier 69 * [Linux Congestion Control | http://www.cs.helsinki.fi/u/sarolaht/papers/linuxtcp.pdf ]
15 IanMcDonald 70 * TcpTuning
12 PerryLorier 71
72 ----
73 CategoryProtocols, CategoryNetworking