TCP Header

( Transmission Control Protocol)

 

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Source Port Destination Port
Sequence Number
Acknowledgment Number
Offset Reserved Flags Window Size
Checksum Urgent Pointer
Options (optional)

 

TCP Header Contents

Common TCP Well-Known Sever Ports
7 echo 110 pop3
19 chargen 111 sunrpc
20 ftp-data 119 nntp
21 ftp-control 139 netbios-ssn
22 ssh 143 imap
23 telnet 179 bgp
25 smtp 389 ldap
53 domain 443 https (ssl)
79 finger 445 microsoft-ds
80 http 1080 socks
Offset  
Number of 32-bit words in TCP header; minimum value = 5
Reserved  
4 bits; set to 0  
ECN bits (used when ECN employed; else 00)
CWR (1= sender has cut congestion window in half)
ECN-Echo (1= receiver cuts congestion window in half)
Flag (UAPRSF)  
U (1 = Urgent pointer valid)  
A (1 = Acknowledgement field value valid)  
P (1 = Push data)  
R (1 = Reset connection)  
S (1 = Synchronize sequence numbers)  
F (1 = no more data; Finish connection)  
Checksum  
covers pseudoheader and entire TCP segment
Urgent Pointer  
Points to the sequence number of the byte  
following urgent data.  
Options  
0 End of Options list 3 Window scale
1 No operation (pad) 4 Selective ACK ok
2 Maximum segment size 8 Timestamp