Consultor Eletrônico



Kbase P73433: What is TCP (Transmission Control Protocol)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   05/11/2009
Status: Unverified

GOAL:

What is TCP (Transmission Control Protocol)

FIX:

TCP is a subset of the Internet protocol suite, which is often called TCP/IP, although the acronym TCP/IP refers to only two of the many protocols in the Internet protocol suite. Still, most people refer to the Internet protocols as TCP/IP and that style is retained here.

The Internet Protocol suite consists of a set of protocols that provide a variety of networking services as shown in Figure T-1. TCP and UDP (User Datagram Protocol) are transport layer components that provide the connection point through which applications access network services. TCP and UDP use IP, which is a lower-layer best effort delivery service. IP encapsulates TCP and UDP information in datagrams and delivers the information across router-connected internetworks.

TCP is a connection-oriented protocol that provides the flow controls and reliable data delivery services listed next. These services run in the host computers at either end of a connection, not in the network itself. Therefore, TCP is a protocol for managing end-to-end connections, as shown in Figure T-2. Since end-to-end connections may exist across a series of point-to-point connections, they are often called virtual circuits.

Connections
Two computers set up a connection to exchange data. The systems synchronize with one another to manage packet flows and adapt to congestion in the network.

Full-duplex operation
A TCP connection is a pair of virtual circuits (one in each direction). Only the two end systems can use the connection.

Error checking
A checksum technique is used to verify that packets are not corrupted.

Sequencing
Packets are numbered so that the destination can reorder packets and determine if a packet is missing.

Acknowledgements
Upon receipt of one or more packets, the receiver returns an acknowledgement (called an "ACK") to the sender indicating that it received the packets. If packets are not ACKed, the sender may retransmit the packets (or terminate the connection if it thinks the receiver has crashed).

Flow control
If the sender is overflowing the receiver by transmitting too quickly, the receiver drops packets. Failed ACKs alert the sender to slow down or stop sending.

Packet recovery services
The receiver can request retransmission of a packet. Also, if packet receipt is not ACKed, the sender will resend the packets.
Reliable data delivery services are critical for applications such as file transfers, database services, transaction processing, and other mission-critical applications in which every packet must be delivered-guaranteed.

While TCP provides these reliable services, it depends on IP to delivery packets. IP is often referred to as an unreliable or best effort service. While it seems odd to build a network that is unreliable, the original Internet architects wanted to remove as many services from the network itself to support fast packet delivery rather than reliability. Routers do not keep track of packets or do anything to ensure delivery. They just forward packets.

The assumption was that end systems would be relatively smart devices with memory and processors. The end devices could handle all the reliability functions rather than the network. This was actually a radical approach at the time, but the implications have been profound. It meant that end systems would become the focus of application development for the Internet, not the network.

In contrast, the telephone network implements an architecture in which end devices (phones) are dumb and the network is supposedly "smart." The only problem with this model is that you can't run applications on your phone that take advantage of the network. In fact, you are totally dependent on the phone company to deploy new appl.ications (call waiting and caller ID are examples). Compared to the Internet, the phone system is a dinosaur. Consider that the user interface for the Web is a full-color graphical browser, while the interface for the telephone network is a 12-key pad!

While end-systems provide TCP's reliability functions, not all applications need them. For example, there is no need to recover lost packets in a live video stream. By the time they are recovered, the viewer has will have already seen the barely visible glitch caused by the missing packet. These applications just need speed. So UDP was created to provide an application interface to the network for real-time applications that don't need TCP's extra services. UDP provides a very simple port connection between applications and IP.

Reliable Data Delivery Services has a subsection called Partial Reliable Services that describes several Internet protocols that provide some but not all of TCP's reliable services but more than what UDP provides. An example is RTP (Real-time Transport Protocol), a multimedia delivery protocol that provides what is called a "partial ordered service." RTP sequentially numbers packets and adds timing information for services that might need to reconstruct the original packet sequence.

TCP is described in RFC 793 (Transmission Control Protocol, September 1981). Related documents with revisions and updates are listed on the related entries page. Also see RFC 1180 (A TCP/IP Tutorial, January 1991)..