Transmission Control Protocol
Transmission Control Protocol adds substantial complexity and functionality to ARP, Proxy ARP, and UDP. TCP is not a piece of software it is a communication protocol.
TCP is is a connection oriented protocol that requires both endpoints to agree.
TCP provides a full duplex connection between two machines, allowing them to exchange large volumes of data efficiently.
TCP is flexible enough to operate over a large variety of delivery systems.
TCPs basic unit of transfer is a segment.
TCP implements flow control and supports out-of-band messages.
TCPs standard specifies exponential backoff for retransmission timers and congestion avoidance algorithms.
TCP uses heuristics to avoid transferring small packets.
Exactly what does TCP provide?
- TCP specifies the format of the data and acknowledgments that two computers exchange to achieve a reliable transfer, as well as the procedures that computers use to ensure that the data arrives correctly.
- Specifies how TCP software distinguishes among multiple destinations on a given machine, and how communicating machines recover from errors like lost or duplicated packets.
- TCP also provides how two computers initiate a TCP stream transfer and how they agree when it is complete.
- TCP's strengths are:[list=1]
- dial-up lines
- High Speed fiber optic networks
- Low speed long haul networks
- Does not dictate the details of the interface between an application program and TCP.
- The protocol documentation only discusses the operation TCP supplies and does not specify the exact procedures application programs invoke to access these operations.
- (This makes the application program interface unspecified, 'very flexible')
- The Operating System provides programmers an interface to connect the TCP and creates a single specification for TCP software to be built against various machines.
TCP port numbers don't correspond to a single object but are identified as a virtual circuit connection.
An endpoint is a pair of integers (host,port). host=IP address & port=TCP port. (ex. 10.10.0.1,25) A connection is defined by two endpoints.
Because TCP identifies a connection by a pair of endpoints, a given TCP port number can be shared by multiple connections on the same machine.
NOTE: A programmer can devise a program that provides concurrent service to multiple connections simultaneously without needing unique local port numbers for each connection.
PASSIVE AND ACTIVE OPENS
First, App1 performs PASSIVE OPEN function by contacting its operating system and indicating that it will accept an incoming connection. OS assigns TCP port number for its end of the connection.
Second, App2 contacts its OS using a ACTIVE OPEN request to establish a connection.
The two TCP software modules communicate to establish and verify connection.
After connections are established they begin to pass data.
Delivery is guaranteed reliable.
CLOSING A TCP CONNECTION
TCP connections are full duplex and contain two independent stream transfers, one going in each direction.
When there is no more data to be sent, TCP closes the connection in one direction.
TCP finishes transmitting the remaining data, waits for the receiver to acknowledge it, and then sends a segment with the FIN bit set.
The FIN bit informs the application program that no more data is available (using the OS's end-of-file mechanism).
RESERVED TCP PORT NUMBERS
TCP combines static and dynamic port binding, using a set of well-known port assignments for commonly invoked programs.
TCP & UDP ports are independent but have chosen to use the same integer port numbers.