The Transmission Control Protocol

Each TCP/IP application typically chooses to use either TCP or UDP based on the application's requirements. For instance, TCP provides error recovery, but to do so, it consumes more bandwidth and uses more processing cycles. UDP does not do error recovery, but it takes less bandwidth and uses fewer processing cycles. Regardless of which of the two TCP/IP transport layer protocols the application chooses to use, you should understand the basics of how each of the protocols works.

TCP provides a variety of useful features, including error recovery. In fact, TCP is best known for its error-recovery feature—but it does more. TCP, defined in RFC 793, performs the following functions:

■ Multiplexing using port numbers

■ Error recovery (reliability)

■ Flow control using windowing

■ Connection establishment and termination

■ End-to-end ordered data transfer

■ Segmentation

TCP accomplishes these functions through mechanisms at the endpoint computers. TCP relies on IP for end-to-end delivery of the data, including routing issues. In other words, TCP performs only part of the functions necessary to deliver the data between applications, and the role that it plays is directed toward providing services for the applications that sit at the endpoint computers. Regardless of whether two computers are on the same Ethernet, or are separated by the entire Internet, TCP performs its functions the same way.

Figure 6-1 shows the fields in the TCP header. Not all the fields are described in this text, but several fields are referred to in this section. The Cisco Press book, Internetworking Technologies Handbook, Fourth Edition, lists the fields along with brief explanations.

Figure 6-1 TCP Header Fields

Bit 0

Bit 15

Bit 16 Bit 31

Source Port (16)

Destination Port (16)

Sequence Number (32)

Acknowledgement Number (32)

Header Length (4)

Reserved (6) Code Bits (6)

Window (16)

Checksum (16)

Urgent (16)

Options (0 or 32 If Any)

Was this article helpful?

0 0

Post a comment