Illustrated TCP/IP Illustrated TCP/IP
by Matthew G. Naugle
Wiley Computer Publishing, John Wiley & Sons, Inc.
ISBN: 0471196568   Pub Date: 11/01/98
  

Previous Table of Contents Next


Chapter 194
TCP Fields

The slide shows the TCP header fields as encapsulated in a IP datagram.

Source port. The port number (application) of the originating station.
Destination port. The port number (application) for the receiving station.
Sequence number. A number assigned to a TCP datagram to indicate the beginning byte number of a packet unless the SYN bit is set. If this bit is set, the sequence number is the initial sequence number (ISN) and the first data byte is ISN + 1.
Acknowledgment number. A Number sent by the destination station to the source station, acknowledging receipt of a previously received packet or packets. This number indicates the next sequence number the destination station expects to receive. Once a connection is established, this field is always set.
Data offset. Indicates how long the TCP header is (i.e., the number of 32-bit words in the TCP header). It indicates where the TCP header ends and the data begins.
Reserved. Reserved for future use. Must be set to 0.


TCP Fields

Control bits:
URG Urgent pointer: Used to send a message to the destination that urgent data is waiting to be sent to it. This could be sent to a destination station, when the destination station has closed the Receive window to the sender. However, the receiver will still accept packets with this bit set.
ACK If set, this packet contains an acknowledgment to a previously sent datagram(s).
PSH Push function: Immediately sends data when read the segment.
RST Reset the connection. One function for this is to not accept a connection request.
SYN Used at startup and to establish sequence number.
FIN No more data is coming from the sender of the connection.

Window. The number of data octets beginning with the one indicated in the Acknowledgment field that the sender of this segment is willing to accept. It indicates the available buffers (memory) on the receiver.

Checksum. An error-detection number.

Urgent pointer. The urgent pointer points to the sequence number of the byte following the urgent data. This field is interpreted only in segments with the URG bit set.

Options. Variable in length, it allows for TCP options to be presented. These are:

End of Option List, No Operation, and Maximum Segment Size (MSS).


Previous Table of Contents Next