background image
OSI Layer 3: Routed and Routing Protocols
51
This structure is similar to the IP packet structure. The TCP header is
32 bits long and has a minimum length of five layers, but can be six layers
deep when options are specified. The first layer starts with Source and
Destination Port
fields. Each of these fields is 16 bits long.
A Sequence Number field occupies all of the second layer, meaning that
it is 32 bits long. TCP is a connection-oriented protocol and this field is
used to keep track of the different requests that have been sent.
The third layer is a 32-bit length field that contains the acknowledgment
sequence number that is used to track responses.
The fourth layer begins with the Offset field, which is four bits and
specifies the number of 32-bit words present in the header. Six bits are
reserved for future use (this is called the Reserved field). This field follows
the Offset field.
The next field, called the Flag or Code field, is also a six-bit field, and it
contains control information. Look at Table 2.5 for an explanation of the six
bits within the Flag field.
The Window field specifies the buffer size for incoming data. Once the
buffer is filled, the sending system must wait for a response from the receiv-
ing system. This field is 16 bits long.
Layer five of the TCP header begins with the Checksum Parameter, which
also occupies 16 bits. It is used to verify the integrity of the transmitted data.
The Urgent Pointer field references the last byte of data, so the receiver
knows how much urgent data it will receive. This is also a 16-bit field.
Finally, there is the Option field, which must also be 32 bits long. If the
options do not occupy 32 bits, padding is added to reach the correct length.
T A B L E 2 . 5
Flag Bit Assignments
Bit number
(right to left)
Control
Information
Definition
1
URG
Urgent pointer is significant
2
ACK
Acknowledgment pointer is significant
3
PSH
Push function
4
RST
Reset connection
5
SYN
Synchronize sequence numbers
6
FIN
No more data to transfer
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com