The TCP/IP Transport Layer



TCP segment structure

A DECODED ETHERNET FRAME

-------------------------------------------------------------
                         Ethernet header
-------------------------------------------------------------
00 A0 92 48 72 45 | dest. MAC address = 0:a0:92:48:72:45
00 00 0C 05 C3 58 | source MAC address = 0:0:c:5:c3:58
08 00             | network protocol = 0x0800 (IP)
-------------------------------------------------------------
                         IP header
-------------------------------------------------------------
4                 | IP version = 4
5                 | header length = 5 4-bytes words
00                | type of service = 0 (normal)
00 29             | length = 0x29 octets = 41 (dec.)
DB FB             | datagram identification
40 00             | don't fragment
FE                | TTL = 254
06                | transport protocol type = 6 (TCP)
7D CB             | header checksum
81 6E 1E 1A       | source IP address = 129.110.30.26
81 6E 02 11       | destination IP address = 129.110.2.17
-------------------------------------------------------------
                        TCP header
-------------------------------------------------------------
02 8B             | source port = 0x028b (651 dec.)
02 03             | dest. port = 0x0203 (515 dec., printer)
6A 86 7B 57       | source seqno = 1787198295 (dec.)
B6 B6 B0 20       | acknowledgment no = 3065425952 (dec.)
50                | header length = 5 words
10                | indicates an ACK
24 00             | window size = 0x2400 (9216 dec.)
15 89             | TCP checksum
00 00             | urgent pointer off
-------------------------------------------------------------
                         Data
-------------------------------------------------------------
02                | Data byte
54 41 4D 49 4C    | Padding to make a 46 byte IP datagram
-------------------------------------------------------------
D7 87 6C A4       | Ethernet checksum (Ethernet trailer)
-------------------------------------------------------------

TCP SLIDING WINDOWS