TCP Header

2009 Mar 09


16 bit - Source Port Number 16 bit - Destination Port Number
32 bit - Sequence Number
32 bit - Acknowledgement Number
4 bit -
Header Length
4 bit -
Reserved
C
W
R
E
C
E
U
R
G
A
C
K
P
S
H
R
S
T
S
Y
N
F
I
N
16 bit - Window Size
16 bit - TCP Checksum 16 bit - Urgent Pointer

Options (if any)


Data


Three-way handshake
  1. Client creates packet with SYN=1 with value for initial sequence number set.
  2. If server has open port for above, it sends back a packet with ACK=1 and SYN=1 with filled in Sequence Number and Acknowledgement Number fields.
  3. Client responds with packet with ACL=1 with same Ackonwledgement Number field value.

TCP Header and Flag Bits

External Links

TCP, RFCs, Ports

2005-2009