All Topics  
Transmission Control Protocol

 

   Email Print
   Bookmark   Link






 

Transmission Control Protocol



 
 
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite
Internet protocol suite

The Internet Protocol Suite is the set of communications protocols used for the Internet and other similar networks. It is named from two of the most important protocols in it: the Transmission Control Protocol and the Internet Protocol , which were the first two networking protocols defined in this standard....
. TCP is so central that the entire suite is often referred to as "TCP/IP". Whereas IP handles lower-level transmissions from computer to computer as a message makes its way across the Internet, TCP operates at a higher level, concerned only with the two end systems, for example a Web browser and a Web server.






Discussion
Ask a question about 'Transmission Control Protocol'
Start a new discussion about 'Transmission Control Protocol'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite
Internet protocol suite

The Internet Protocol Suite is the set of communications protocols used for the Internet and other similar networks. It is named from two of the most important protocols in it: the Transmission Control Protocol and the Internet Protocol , which were the first two networking protocols defined in this standard....
. TCP is so central that the entire suite is often referred to as "TCP/IP". Whereas IP handles lower-level transmissions from computer to computer as a message makes its way across the Internet, TCP operates at a higher level, concerned only with the two end systems, for example a Web browser and a Web server. In particular, TCP provides reliable, ordered delivery of a stream of bytes from one program on one computer to another program on another computer. Besides the Web, other common applications of TCP include e-mail
E-mail

Electronic mail, often abbreviated as e-mail, email, E-Mail, or eMail, is any method of creating, transmitting, or storing primarily text-based human communications with digital communications systems....
 and file transfer
File transfer

File transfer is a generic term for the act of transmission file s over a computer network or the Internet. There are numerous ways and Protocol to transfer files over a network....
. Among its management tasks, TCP controls message size, the rate at which messages are exchanged, and network traffic congestion.

Significance of TCP

TCP provides a communication service at an intermediate level between an application program and the Internet Protocol
Internet protocol

Internet protocol may refer to:*The Internet Protocol, a specific protocol implementation in the Internet protocol suite*The Internet protocol suite, a set of communications protocols that are used for the Internet...
 (IP). That is, when an application program
Application software

Application software is any tool that functions and is operated by means of a computer, with the purpose of supporting or improving the software user 's work....
 desires to send a large chunk of data across the Internet using IP, instead of breaking the data into IP-sized pieces and issuing a series of IP requests, the software can issue a single request to TCP and let TCP handle the IP details.

IP works by exchanging pieces of information called packets. A packet is a sequence of bytes and consists of a header followed by a body. The header describes the packet's destination and, optionally, the routers to use for forwarding—generally in the right direction—until it arrives at its final destination. The body contains the data which IP is transmitting. When IP is transmitting data on behalf of TCP, the content of the IP packet body is TCP payload.

Due to network congestion, traffic load balancing, or other unpredictable network behavior, IP packets can be lost or delivered out of order. TCP detects these problems, requests retransmission of lost packets, rearranges out-of-order packets, and even helps minimize network congestion to reduce the occurrence of the other problems. Once the TCP receiver has finally reassembled a perfect copy of the data originally transmitted, it passes that datagram to the application program. Thus, TCP abstracts the application's communication from the underlying networking details.

Applicability

TCP is used extensively by many of the Internet's most popular application protocols and resulting applications, including the World Wide Web
World Wide Web

The World Wide Web is a very large set of interlinked hypertext documents accessed via the Internet. With a Web browser, one can view Web pages that may contain writing, s, videos, and other multimedia and navigate between them using hyperlinks....
, E-mail
E-mail

Electronic mail, often abbreviated as e-mail, email, E-Mail, or eMail, is any method of creating, transmitting, or storing primarily text-based human communications with digital communications systems....
, File Transfer Protocol
File Transfer Protocol

File Transfer Protocol is a network protocol used to transfer data from one computer to another through a network such as the Internet.FTP is a file transfer protocol for exchanging and manipulating files over a Transmission Control Protocol computer network....
, Secure Shell
Secure Shell

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for TELNET and other Computer security remote Shell s, which send information, notably passwords, in...
, and some streaming media
Streaming media

Streaming media is multimedia that is constantly received by, and normally presented to, an End-user while it is being delivered by a streaming provider ....
 applications.

However, because TCP is optimized for accurate delivery rather than timely delivery, TCP sometimes incurs relatively long delays (in the order of seconds) while waiting for out-of-order messages or retransmissions of lost messages, and it is not particularly suitable for real-time applications such as Voice over IP
Voice over IP

Voice over Internet Protocol is a general term for a family of transmission technologies for delivery of voice communications over Internet Protocol networks such as the Internet or other packet-switched Computer network....
. For such applications, protocols like the Real-time Transport Protocol
Real-time Transport Protocol

The Real-time Transport Protocol defines a standardized packet format for delivering audio and video over the Internet. It was developed by the Audio-Video Transport Working Group of the IETF and first published in 1996 as RFC 1889, and superseded by RFC 3550 in 2003....
 (RTP) running over the User Datagram Protocol
User Datagram Protocol

The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, sometimes known as datagram, to other hosts on an Internet Protocol network without requiring prior communications to set up special transmission cha...
 (UDP) are usually recommended instead.

TCP is a reliable stream delivery service that guarantees delivery of a data stream sent from one host to another without duplication or losing data. Since packet transfer is not reliable, a technique known as positive acknowledgment with retransmission is used to guarantee reliability of packet transfers. This fundamental technique requires the receiver to respond with an acknowledgment message as it receives the data. The sender keeps a record of each packet it sends, and waits for acknowledgment before sending the next packet. The sender also keeps a timer from when the packet was sent, and retransmits a packet if the timer expires. The timer is needed in case a packet gets lost or corrupted.

TCP (Transmission Control Protocol) consists of a set of rules: for the protocol, that are used with the Internet Protocol, and for the IP, to send data "in a form of message units" between computers over the Internet. At the same time that the IP takes care of handling the actual delivery of the data, the TCP takes care of keeping track of the individual units of data "packets" (or more accurately, "segments") that a message is divided into for efficient routing through the net. For example, when an HTML file is sent to you from a Web server, the TCP program layer of that server takes the file as a stream of bytes and divides it into segments, numbers the segments, and then forwards them individually to the IP program layer. The IP program layer then turns each TCP segment into an IP packet by adding a header which includes (among other things) the destination IP address. Even though every packet has the same destination IP address, they can get routed differently through the network. When the client program in your computer gets them, the TCP stack (implementation) reassembles the individual segments and ensures they are correctly ordered as it streams them to an application.

TCP segment structure

A TCP segment consists of two sections:
  • header
  • data


The TCP header consists of 11 fields, of which only 10 are required. The eleventh field is optional (pink background in table) and aptly named "options".

TCP Header
Bit offset Bits 0–3 4–7 8–15 16–31
0 Source port Destination port
32 Sequence number
64 Acknowledgment number
96 Data offset Reserved CWRECEURGACKPSHRSTSYNFIN Window Size
128 Checksum Urgent pointer
160 Options (optional)
160/192+  
Data
 


  • Source port (16 bits) – identifies the sending port
  • Destination port (16 bits) – identifies the receiving port
  • Sequence number (32 bits) – has a dual role
  • If the SYN flag is set, then this is the initial sequence number. The sequence number of the actual first data byte will then be this sequence number plus 1.
  • If the SYN flag is not set, then this is the sequence number of the first data byte


  • Acknowledgement number (32 bits) – if the ACK flag is set then the value of this field is the next expected byte that the receiver is expecting.
  • Data offset (4 bits) – specifies the size of the TCP header in 32-bit words. The minimum size header is 5 words and the maximum is 15 words thus giving the minimum size of 20 bytes and maximum of 60 bytes. This field gets its name from the fact that it is also the offset from the start of the TCP segment to the actual data.
  • Reserved (4 bits) – for future use and should be set to zero
  • Flags (8 bits) (aka Control bits) – contains 8 1-bit flags
  • CWR (1 bit) – Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set (added to header by RFC 3168).
  • ECE (ECN-Echo) (1 bit) – indicate that the TCP peer is ECN
    Explicit Congestion Notification

    Explicit Congestion Notification is an extension to the Internet Protocol and is defined in RFC 3168 . ECN allows end-to-end notification of network congestion without dropping packets....
     capable during 3-way handshake (added to header by RFC 3168).
  • URG (1 bit) – indicates that the URGent pointer field is significant
  • ACK (1 bit) – indicates that the ACKnowledgment field is significant
  • PSH (1 bit) – Push function
  • RST (1 bit) – Reset the connection
  • SYN (1 bit) – Synchronize sequence numbers
  • FIN (1 bit) – No more data from sender


  • Window (16 bits) – the size of the receive window, which specifies the number of bytes (beyond the sequence number in the acknowledgment field) that the receiver is currently willing to receive (see Flow control)
  • Checksum (16 bits) – The 16-bit checksum
    Checksum

    A checksum or hash sum is a fixed-size data computed from an arbitrary block of digital data for the purpose of error detection that may have been introduced during its telecommunications or computer storage....
     field is used for error-checking of the header and data
  • Urgent pointer (16 bits) – if the URG flag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte
  • Options (Variable bits) – the total length of the option field must be a multiple of a 32-bit word and the data offset field adjusted appropriately
  • 0 - End of options list
  • 1 - No operation (NOP, Padding)
  • 2 - Maximum segment size (see maximum segment size)
  • 3 - Window scale (see window scaling for details)
  • 4 - Selective Acknowledgement ok (see selective acknowledgments for details)
  • 5 -
  • 6 -
  • 7 -
  • 8 - Timestamp (see TCP Timestamps for details)


The last field is not a part of the header. The contents of this field are whatever the upper layer protocol wants but this protocol is not set in the header and is presumed based on the port selection.
  • Data (Variable bits): As you might expect, this is the payload, or data portion of a TCP packet. The payload may be any number of application layer protocols. The most common are HTTP, Telnet, SSH, FTP, but other popular protocols also use TCP.


Protocol operation


Unlike TCP's traditional counterpart, User Datagram Protocol
User Datagram Protocol

The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, sometimes known as datagram, to other hosts on an Internet Protocol network without requiring prior communications to set up special transmission cha...
, which can immediately start sending packets, TCP provides connections that need to be established before sending data. TCP connections have three phases:

  1. connection establishment
  2. data transfer
  3. connection termination


Before describing these three phases, a note about the various states
State (computer science)

In computer science and automata theory, a state is a unique configuration of information in a program or machine. It is a concept that occasionally extends into some forms of systems programming such as Lexical analysiss and parsers....
 of a connection end-point or Internet socket
Internet socket

An Internet socket is used in inter-process communication across an Internet Protocol based Computer_network such as the Internet. Internet sockets constitute a mechanism for delivering incoming data packets to the appropriate application process or Thread , based on a combination of local and remote IP addresses and port numbers....
:
  1. LISTEN
  2. SYN-SENT
  3. SYN-RECEIVED
  4. ESTABLISHED
  5. FIN-WAIT-1
  6. FIN-WAIT-2
  7. CLOSE-WAIT
  8. CLOSING
  9. LAST-ACK
  10. TIME-WAIT
  11. CLOSED


LISTEN : represents waiting for a connection request from any remote TCP and port. (usually set by TCP servers) SYN-SENT : represents waiting for the remote TCP to send back a TCP packet with the SYN and ACK flags set. (usually set by TCP clients) SYN-RECEIVED : represents waiting for the remote TCP to send back an acknowledgment after having sent back a connection acknowledgment to the remote TCP. (usually set by TCP servers) ESTABLISHED : represents that the port is ready to receive/send data from/to the remote TCP. (set by TCP clients and servers) TIME-WAIT : represents waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request. According to RFC 793 a connection can stay in TIME-WAIT for a maximum of four minutes.

Connection establishment

To establish a connection, TCP uses a three-way handshake
Handshaking

In information technology, telecommunications, and related fields, handshaking is an automated process of negotiation that dynamically sets parameters of a communications channel established between two entities before normal communication over the channel begins....
. Before a client attempts to connect with a server, the server must first bind to a port to open it up for connections: this is called a passive open. Once the passive open is established, a client may initiate an active open. To establish a connection, the three-way (or 3-step) handshake occurs:
  1. The active open is performed by the client sending a SYN to the server.
  2. In response, the server replies with a SYN-ACK.
  3. Finally the client sends an ACK back to the server.


At this point, both the client and server have received an acknowledgment of the connection.

Example:
  1. The initiating host (client) sends a synchronization packet (SYN flag set to 1) to initiate a connection. It sets the packet's sequence number to a random value .
  2. The other host receives the packet, records the sequence number from the client, and replies with an acknowledgment and synchronization (SYN-ACK). The Acknowledgment is a 32-bit field in TCP segment header. It contains the next sequence number that this host is expecting to receive . The host also initiates a return session. This includes a TCP segment with its own initial Sequence Number of value .
  3. The initiating host responds with the next Sequence Number and a simple Acknowledgment Number value of , which is the Sequence Number value of the other host + 1.


Data transfer

There are a few key features that set TCP apart from User Datagram Protocol
User Datagram Protocol

The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, sometimes known as datagram, to other hosts on an Internet Protocol network without requiring prior communications to set up special transmission cha...
:
  • Ordered data transfer - the destination host rearranges according to sequence number
  • Retransmission of lost packets - any cumulative stream not acknowledged will be retransmitted
  • Discarding duplicate packets
  • Error-free data transfer
  • Flow control - limits the rate a sender transfers data to guarantee reliable delivery. When the receiving host's buffer fills, then next acknowledgement contains a 0 in the window size, to stop transfer and allow the data in the buffer to be processed.
  • Congestion control - sliding window


Ordered data transfer, retransmission of lost packets and discarding duplicate packets
TCP uses a sequence number to identify each byte of data. The sequence number identifies the order of the bytes sent from each computer so that the data can be transferred reliably and in order, regardless of any fragmentation, disordering, or packet loss
Packet loss

Packet loss occurs when one or more packet s of data traveling across a computer network fail to reach their destination. Packet loss is distinguished as one of the three main error types encountered in digital communications; the other two being bit error and spurious packets caused due to noise....
 that occurs during transmission. For every byte transmitted the sequence number must be incremented. In the first two steps of the 3-way handshake, both computers exchange an initial sequence number (ISN). This number can be arbitrary, and should in fact be unpredictable, in order to avoid a TCP Sequence Prediction Attack
TCP Sequence Prediction Attack

A Transmission Control Protocol sequence prediction attack is an attempt to predict the sequence number used to identify the packets in a TCP connection, which can be used to counterfeit packets....
.

TCP primarily uses a cumulative acknowledgment scheme, where the receiver sends an acknowledgment signifying that the receiver has received all data preceding the acknowledged sequence number. Essentially, the first data byte in a segment is assigned a sequence number, which is inserted in the sequence number field, and the receiver sends an acknowledgment specifying the sequence number of the next byte they expect to receive. For example, if computer A sends 4 bytes with a sequence number of 100 (conceptually, the four bytes would have a sequence number of 100, 101, 102, & 103 assigned) then the receiver would send back an acknowledgment of 104 since that is the next byte it expects to receive in the next packet. By sending an acknowledgment of 104, the receiver is signaling that it received bytes 100, 101, 102, & 103 correctly. If, by some chance, the last two bytes were corrupted then an acknowledgment value of 102 would be sent since 100 & 101 were received successfully.

In addition to cumulative acknowledgments, TCP receivers can also send selective acknowledgments to provide further information (see selective acknowledgments).

If the sender infers that data has been lost in the network, it retransmits
Retransmission (data networks)

Retransmission is the resending of packet s which have been either damaged or lost. It is a term that refers to one of the basic mechanisms used by network protocol operating over a packet switched computer network to provide reliable communication ....
 the data.

Error-free data transfer
Sequence numbers and acknowledgments cover discarding duplicate packets, retransmission of lost packets, and ordered-data transfer. To assure correctness a checksum
Checksum

A checksum or hash sum is a fixed-size data computed from an arbitrary block of digital data for the purpose of error detection that may have been introduced during its telecommunications or computer storage....
 field is included (see TCP segment structure for details on checksumming).

The TCP checksum is a quite weak check by modern standards. Data Link Layers with high bit error rates may require additional link error correction/detection capabilities. If TCP were to be redesigned today, it would most probably have a 32-bit cyclic redundancy check
Cyclic redundancy check

A cyclic redundancy check is a type of function that takes as input a data stream of any length, and produces as output a value of a certain space, commonly a 32-bit integer....
 specified as an error check instead of the current checksum. The weak checksum is partially compensated for by the common use of a CRC or better integrity check at layer 2, below both TCP and IP, such as is used in PPP
Point-to-Point Protocol

In Computer network, the Point-to-Point Protocol, or PPP, is a Data Link Layer Protocol commonly used to establish a direct connection between two Node ....
 or the Ethernet
Ethernet

Ethernet is a family of Data frame-based computer networking technologies for local area networks . The name comes from the physical concept of the Luminiferous aether....
 frame. However, this does not mean that the 16-bit TCP checksum is redundant: remarkably, introduction of errors in packets between CRC-protected hops is common, but the end-to-end
End-to-end principle

The end-to-end principle is one of the central design principles of the Internet and is implemented in the design of the underlying methods and protocols in the Internet Protocol Suite....
 16-bit TCP checksum catches most of these simple errors . This is the end-to-end principle
End-to-end principle

The end-to-end principle is one of the central design principles of the Internet and is implemented in the design of the underlying methods and protocols in the Internet Protocol Suite....
 at work.

Flow control
TCP uses an end-to-end flow control
Flow control

In computer networking, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from over running a slow receiver....
 protocol to avoid having the sender send data too fast for the TCP receiver to reliably receive and process it. Having a mechanism for flow control is essential in an environment where machines of diverse network speeds communicate. For example, when a fast PC sends data to a slow hand-held PDA, the PDA needs to regulate the influx of data, or protocol software would be overrun quickly. Similarly, flow control is essential if the application that is receiving the data is reading it more slowly than the sending application is sending it.

TCP uses a sliding window
Sliding Window Protocol

Sliding Window Protocol is a bi-directional data transmission Protocol used in the data link layer as well as in Transmission Control Protocol ....
 flow control protocol. In each TCP segment, the receiver specifies in the receive window field the amount of additional received data (in bytes) that it is willing to buffer for the connection. The sending host can send only up to that amount of data before it must wait for an acknowledgment and window update from the receiving host.

When a receiver advertises a window size of 0, the sender stops sending data and starts the persist timer. The persist timer is used to protect TCP from a deadlock
Deadlock

A deadlock is a situation wherein two or more competing actions are waiting for the other to finish, and thus neither ever does. It is often seen in a paradox like 'the chicken or the egg'....
 situation that could arise if the window size update from the receiver is lost and the sender has no more data to send while the receiver is waiting for the new window size update. When the persist timer expires, the TCP sender sends a small packet so that the receiver sends an acknowledgement with the new window size.

If a receiver is processing incoming data in small increments, it may repeatedly advertise a small receive window. This is referred to as the silly window syndrome
Silly window syndrome

Silly window syndrome is a problem in computer networking caused by poorly-implemented Transmission Control Protocol flow control. If a Server with this problem is unable to process all incoming data, it requests that its Client s reduce the amount of data they send at a time ....
, since it is inefficient to send only a few bytes of data in a TCP segment, given the relatively large overhead of the TCP header. TCP senders and receivers typically employ flow control logic to specifically avoid repeatedly sending small segments. The sender-side silly window syndrome avoidance logic is referred to as Nagle's algorithm
Nagle's algorithm

Nagle's algorithm, named after John Nagle, is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network....
.

Congestion control
The final main aspect of TCP is congestion control
Congestion control

Congestion control concerns controlling traffic entry into a telecommunications network, so as to avoid congestive collapse by attempting to avoid oversubscription of any of the processing or data link capabilities of the intermediate nodes and networks and taking resource reducing steps, such as reducing the rate of sending packet s....
. TCP uses a number of mechanisms to achieve high performance and avoid 'congestion collapse
Congestive collapse

Congestive collapse is a condition which a packet switched computer network can reach, when little or no useful communication is happening due to Network congestion....
', where network performance can fall by several orders of magnitude. These mechanisms control the rate of data entering the network, keeping the data flow below a rate that would trigger collapse.

Acknowledgments for data sent, or lack of acknowledgments, are used by senders to infer network conditions between the TCP sender and receiver. Coupled with timers, TCP senders and receivers can alter the behavior of the flow of data. This is more generally referred to as congestion control and/or network congestion avoidance.

Modern implementations of TCP contain four intertwined algorithms: Slow-start
Slow-start

Slow-start is part of the congestion control strategy used by Transmission Control Protocol, the data transmission protocol used by many Internet applications, such as [] and Secure Shell....
, congestion avoidance
TCP congestion avoidance algorithm

The Transmission Control Protocol uses a network congestion avoidance algorithm that includes various aspects of an AIMD scheme, with other schemes such as slow-start in order to achieve congestion avoidance....
, fast retransmit
Fast retransmit

Fast Retransmit is an enhancement to Transmission Control Protocol which reduces the time a sender waits before retransmitting a lost Protocol data unit....
, and fast recovery
Slow-start

Slow-start is part of the congestion control strategy used by Transmission Control Protocol, the data transmission protocol used by many Internet applications, such as [] and Secure Shell....
 ().

In addition, senders employ a retransmission timer that is based on the estimated round-trip time (or RTT) between the sender and receiver, as well as the variance in this round trip time. The behavior of this timer is specified in RFC 2988. There are subtleties in the estimation of RTT. For example, senders must be careful when calculating RTT samples for retransmitted packets; typically they use Karn's Algorithm
Karn's Algorithm

Karn's Algorithm addresses the problem of getting accurate estimates of the round-trip time for messages when using Transmission Control Protocol....
 or TCP timestamps (see RFC 1323). These individual RTT samples are then averaged over time to create a Smoothed Round Trip Time (SRTT) using Jacobson's algorithm. This SRTT value is what is finally used as the round-trip time estimate.

Enhancing TCP to reliably handle loss, minimize errors, manage congestion and go fast in very high-speed environments are ongoing areas of research and standards development. As a result, there are a number of TCP congestion avoidance algorithm
TCP congestion avoidance algorithm

The Transmission Control Protocol uses a network congestion avoidance algorithm that includes various aspects of an AIMD scheme, with other schemes such as slow-start in order to achieve congestion avoidance....
 variations.

Maximum segment size

The Maximum segment size
Maximum segment size

The maximum segment size is the largest amount of data, specified in bytes, that a computer or communications device can handle in a single, IP fragmentation piece....
 (MSS) is the largest amount of data, specified in bytes, that TCP is willing to send in a single segment. For best performance, the MSS should be set small enough to avoid IP fragmentation
IP fragmentation

The Internet Protocol allows IP fragmentation so that datagrams can be fragmented into pieces small enough to pass over a link with a smaller MTU than the original datagram size....
, which can lead to excessive retransmissions if there is packet loss. To try to accomplish this, typically the MSS is negotiated using the MSS option when the TCP connection is established, in which case it is determined by the maximum transmission unit (MTU) size of the data link layer
Data link layer

The Data Link Layer is layer 2 of the seven-layer OSI model of computer networking.The Data Link Layer is the protocol layer which transfers data between adjacent network nodes in a wide area network or between nodes on the same local area network network segment....
 of the networks to which the sender and receiver are directly attached. Furthermore, TCP senders can use Path MTU discovery
Path MTU discovery

Path MTU discovery is a technique in computer networking for determining the maximum transmission unit size on the network path between two Internet Protocol hosts, usually with the goal of avoiding IP fragmentation....
 to infer the minimum MTU along the network path between the sender and receiver, and use this to dynamically adjust the MSS in order to avoid IP fragmentation within the network.

Selective acknowledgments

Relying purely on the cumulative acknowledgment scheme employed by the original TCP protocol can lead to inefficiencies when packets are lost. For example, suppose 10,000 bytes are sent in 10 different TCP packets, and the first packet is lost during transmission. In a pure cumulative acknowledgment protocol, the receiver cannot say that it received bytes 1,000 to 9,999 successfully, but failed to receive the first packet, containing bytes 0 to 999. Thus the sender would then have to resend all 10,000 bytes.

In order to solve this problem TCP employs the selective acknowledgment (SACK) option, defined in RFC 2018, which allows the receiver to acknowledge discontiguous blocks of packets that were received correctly, in addition to the sequence number of the last contiguous byte received successively, as in the basic TCP acknowledgment. The acknowledgement can specify a number of SACK blocks, where each SACK block is conveyed by the starting and ending sequence numbers of a contiguous range that the receiver correctly received. In the example above, the receiver would send SACK with sequence numbers 1,000 and 10,000. The sender will thus retransmit only the first packet, bytes 0 to 999.

The SACK option is not mandatory and it is used only if both parties support it. This is negotiated when connection is established. SACK uses the optional part of the TCP header (see TCP segment structure for details). The use of SACK is widespread - all popular TCP stacks support it. Selective acknowledgment is also used in SCTP
Stream Control Transmission Protocol

In computer networking, the Stream Control Transmission Protocol is a Transport Layer communications protocol, serving in a similar role as the popular protocols Transmission Control Protocol and User Datagram Protocol ....
.

Window scaling

For more efficient use of high bandwidth networks, a larger TCP window size may be used. The TCP window size field controls the flow of data and its value is limited to between 2 and 65,535 bytes.

Since the size field cannot be expanded, a scaling factor is used. The TCP window scale option
TCP window scale option

The Transmission Control Protocol window scale option is an option to increase the TCP receive window size above its maximum value of 65,536 bytes....
, as defined in RFC 1323, is an option used to increase the maximum window size from 65,535 bytes to 1 Gigabyte. Scaling up to larger window sizes is a part of what is necessary for TCP Tuning
TCP tuning

TCP tuning techniques adjust some parameters of Transmission Control Protocol connections over high-bandwidth, high-latency networks. Well-tuned networks can perform up to 1000 times faster in some cases....
.

The window scale option is used only during the TCP 3-way handshake. The window scale value represents the number of bits to left-shift the 16-bit window size field. The window scale value can be set from 0 (no shift) to 14 for each direction independently. Both sides must send the option in their SYN segments to enable window scaling in either direction.

Some routers and packet firewalls rewrite the window scaling factor during a transmission. This causes sending and receiving sides to assume different TCP window sizes. The result is non-stable traffic that may be very slow. The problem is visible on some sending and receiving sites which are behind the path of defective routers.

TCP Timestamps

TCP timestamps, defined in RFC 1323, help TCP compute the round-trip time between the sender and receiver. Timestamp options include a 4-byte timestamp value, where the sender inserts its current value of its timestamp clock, and a 4-byte echo reply timestamp value, where the receiver generally inserts the most recent timestamp value that it has received. The sender uses the echo reply timestamp in an acknowledgment to compute the total elapsed time since the acknowledged segment was sent.

TCP timestamps are also used to help in the case where TCP sequence numbers encounter their 232 bound and "wrap around" the sequence number space. This scheme is known as Protect Against Wrapped Sequence numbers, or PAWS (see RFC 1323 for details).

Out of Band Data

One is able to interrupt or abort the queued stream instead of waiting for the stream to finish. This is done by specifying the data as urgent. This will tell the receiving program to process it immediately, along with the rest of the urgent data. When finished, TCP informs the application and resumes back to the stream queue. An example is when TCP is used for a remote login session, the user can send a keyboard sequence that interrupts or aborts the program at the other end. These signals are most often needed when a program on the remote machine fails to operate correctly. The signals must be sent without waiting for the program to finish its current transfer.

Unfortunately, TCP OOB data was not designed for the modern Internet. The urgent pointer only alters the processing on the remote host and doesn't expedite any processing on the network itself. When it gets to the remote host there are two slightly different interpretations of the protocol which means only single bytes of OOB data are reliable. This is assuming it's reliable at all as it's one of the least commonly used protocol elements and tends to be poorly implemented.

Forcing Data Delivery

Normally, TCP waits for the buffer to exceed the maximum segment size before sending any data. This creates serious delays when the two sides of the connection are exchanging short messages and need to receive the response before continuing. For example, the login sequence at the beginning of a session begins with the short message "Login," and the session cannot make any progress until these five characters have been transmitted and the response has been received. This process can be seriously delayed by TCP's normal behavior.

However, an application can force delivery of segments to the output stream using a push operation provided by TCP to the application layer. This operation also causes TCP to set the PSH flag or control bit to ensure that data will be delivered immediately to the application layer by the receiving transport layer.

In the most extreme cases, for example when a user expects each keystroke to be echoed by the receiving application, the push operation can be used each time a keystroke occurs. More generally, application programs use this function to force output to be sent after writing a character or line of characters. By forcing the data to be sent immediately, delays and wait time are reduced.

Connection termination

The connection termination phase uses, at most, a four-way handshake, with each side of the connection terminating independently. When an endpoint wishes to stop its half of the connection, it transmits a FIN packet, which the other end acknowledges with an ACK. Therefore, a typical tear-down requires a pair of FIN and ACK segments from each TCP endpoint.

A connection can be "half-open", in which case one side has terminated its end, but the other has not. The side that has terminated can no longer send any data into or receive any data from the connection, but the other side can (but generally if it tries, this should result in no acknowledgment and therefore a timeout, or else result in a positive RST, and either way thereby the destruction of the half-open socket).

It is also possible to terminate the connection by a 3-way handshake, when host A sends a FIN and host B replies with a FIN & ACK (merely combines 2 steps into one) and host A replies with an ACK. This is perhaps the most common method.

It is possible for both hosts to send FINs simultaneously then both just have to ACK. This could possibly be considered a 2-way handshake since the FIN/ACK sequence is done in parallel for both directions.

Some host TCP stacks may implement a "half-duplex" close sequence, as Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 or HP-UX
HP-UX

HP-UX 11i is Hewlett-Packard's proprietary software implementation of the Unix operating system, based on UNIX System V . It runs on the HP 9000 PA-RISC-based range of central processing unit and HP Integrity Intel's Itanium-based systems, and was also available for later Apollo/Domain systems....
 do. If such a host actively closes a connection but still has not read all the incoming data the stack already received from the link, this host will send a RST instead of a FIN (Section 4.2.2.13 in ). This allows a TCP application to be sure that the remote application has read all the data the former sent - waiting the FIN from the remote side when it will actively close the connection. Unfortunately, the remote TCP stack cannot distinguish between a Connection Aborting RST and this Data Loss RST - both will cause the remote stack to throw away all the data it received, but the application still didn't read.

Some application protocols may violate the OSI model layers
OSI model

The Open Systems Interconnection Reference Model is an abstract description for layered communications and computer network protocol design. It was developed as part of the Open Systems Interconnection initiative....
, using the TCP open/close handshaking for the application protocol open/close handshaking - these may find the RST problem on active close. As an example: s = connect(remote); send(s, data); close(s); For a usual program flow like above, a TCP/IP stack like that described above does not guarantee that all the data will arrive to the other application unless the programmer is sure that the remote side will not send anything.

Vulnerabilities


Vulnerability to Denial of Service
By using a spoofed IP address and repeatedly sending purposely assembled
Mangled packet

In computer networking, a mangled or invalid packet is a Packet —especially Internet protocol suite packet—which lacks sound order, self-coherence or content to confuse computers, firewall , routers or any service present on the network....
 SYN packets attackers can cause the server to consume large amounts of resources keeping track of the bogus connections. This is known as a SYN flood
SYN flood

A SYN flood is a form of denial-of-service attack in which an attacker sends a succession of SYN requests to a target's system....
 attack. Proposed solutions to this problem include SYN cookies
SYN cookies

SYN Cookies are the key element of a technique used to guard against SYN flood attacks. Daniel J. Bernstein, the technique's primary inventor, defines SYN Cookies as "particular choices of initial Transmission Control Protocol sequence numbers by TCP servers." In particular, the use of SYN Cookies allows a server to avoid dropping connections...
 and Cryptographic puzzles.

Connection hijacking
An attacker who is able to eavesdrop a TCP session and redirect packets can hijack a TCP connection. To do so, the attacker learns the sequence number from the ongoing communication and forges a false packet that looks like the next packet in the stream. Such a simple hijack can result in one packet being erroneously accepted at one end. When the receiving host acknowledges the extra packet to the other side of the connection, synchronization is lost. Hijacking might be combined with ARP or routing attacks that allow taking control of the packet flow, so as to get permanent control of the hijacked TCP connection.

Impersonating a different IP address was possible prior to RFC 1948, when the initial sequence number was easily guessable. That allowed an attacker to blindly send a sequence of packets that the receiver would believe to come from a different IP address, without the need to deploy ARP or routing attacks: it is enough to ensure that the legitimate host of the impersonated IP address is down, or bring it to that condition using denial of service attacks. This is why the initial sequence number is chosen at random.

TCP ports


TCP uses the notion of port number
TCP and UDP port

In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint used by Transport layer protocols of the Internet protocol suite such as Transmission Control Protocol and User Datagram Protocol ....
s to identify sending and receiving application end-points on a host, or Internet socket
Internet socket

An Internet socket is used in inter-process communication across an Internet Protocol based Computer_network such as the Internet. Internet sockets constitute a mechanism for delivering incoming data packets to the appropriate application process or Thread , based on a combination of local and remote IP addresses and port numbers....
s
. Each side of a TCP connection has an associated 16-bit unsigned port number (0-65535) reserved by the sending or receiving application. Arriving TCP data packets are identified as belonging to a specific TCP connection by its sockets, that is, the combination of source host address, source port, destination host address, and destination port. This means that a server computer can provide several clients with several services simultaneously, as long as a client takes care of initiating any simultaneous connections to one destination port from different source ports.

Port numbers are categorized into three basic categories: well-known, registered, and dynamic/private. The well-known ports are assigned by the Internet Assigned Numbers Authority
Internet Assigned Numbers Authority

The Internet Assigned Numbers Authority is the entity that oversees global IP address, root nameserver for the Domain Name System , Internet media type, and other Internet protocol assignments....
 (IANA) and are typically used by system-level or root processes. Well-known applications running as servers and passively listening for connections typically use these ports. Some examples include: FTP
File Transfer Protocol

File Transfer Protocol is a network protocol used to transfer data from one computer to another through a network such as the Internet.FTP is a file transfer protocol for exchanging and manipulating files over a Transmission Control Protocol computer network....
 (21), SSH
Secure Shell

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for TELNET and other Computer security remote Shell s, which send information, notably passwords, in...
 (22), TELNET
TELNET

Telnet is a network protocol used on the Internet or Local Area Network connections. It was developed in 1969 beginning with RFC 15 and standardized as Internet Engineering Task Force STD 8, one of the first Internet standards....
 (23), SMTP (25) and HTTP (80). Registered ports are typically used by end user applications as ephemeral source ports when contacting servers, but they can also identify named services that have been registered by a third party. Dynamic/private ports can also be used by end user applications, but are less commonly so. Dynamic/private ports do not contain any meaning outside of any particular TCP connection.

Development

TCP is a complex protocol. However, while significant enhancements have been made and proposed over the years, its most basic operation has not changed significantly since its first specification in 1974, and the v4 specification RFC 793, published in September 1981. RFC 1122, Host Requirements for Internet Hosts, clarified a number of TCP protocol implementation requirements. RFC 2581, TCP Congestion Control, one of the most important TCP-related RFCs in recent years, describes updated algorithms to be used in order to avoid undue congestion. In 2001, RFC 3168 was written to describe explicit congestion notification
Explicit Congestion Notification

Explicit Congestion Notification is an extension to the Internet Protocol and is defined in RFC 3168 . ECN allows end-to-end notification of network congestion without dropping packets....
 (ECN
Explicit Congestion Notification

Explicit Congestion Notification is an extension to the Internet Protocol and is defined in RFC 3168 . ECN allows end-to-end notification of network congestion without dropping packets....
), a congestion avoidance signalling mechanism.

The original TCP congestion avoidance algorithm
TCP congestion avoidance algorithm

The Transmission Control Protocol uses a network congestion avoidance algorithm that includes various aspects of an AIMD scheme, with other schemes such as slow-start in order to achieve congestion avoidance....
 was known as "TCP Tahoe", but many alternative algorithms have since been proposed (including TCP Reno, TCP Vegas
TCP Vegas

TCP Vegas is a Transmission Control Protocol congestion control, or network congestion avoidance, algorithm that emphasizes packet delay, rather than packet loss, as a signal to help determine the rate at which to send packets....
, FAST TCP
FAST TCP

FAST TCP is a new TCP congestion avoidance algorithm especially targeted at high-speed, long-distance links, developed at the , California Institute of Technology and now being commercialized by ....
, TCP New Reno, and TCP Hybla).

TCP Interactive (iTCP) is a research effort into TCP extensions that allows applications to subscribe to TCP events and register handler components that can launch applications for various purposes, including application assisted congestion control.

TCP over wireless

TCP has been optimized for wired networks. Any packet loss
Packet loss

Packet loss occurs when one or more packet s of data traveling across a computer network fail to reach their destination. Packet loss is distinguished as one of the three main error types encountered in digital communications; the other two being bit error and spurious packets caused due to noise....
 is considered to be the result of congestion and the congestion window size is reduced dramatically as a precaution. However, wireless links are known to experience sporadic and usually temporary losses due to fading, shadowing, hand off, and other radio effects, that cannot be considered congestion. After the (erroneous) back-off of the congestion window size, due to wireless packet loss, there can be a congestion avoidance phase with a conservative decrease in window size. This causes the radio link to be underutilized. Extensive research has been done on the subject of how to combat these harmful effects. Suggested solutions can be categorized as end-to-end solutions (which require modifications at the client and/or server), link layer solutions (such as RLP
Radio Link Protocol

Radio Link Protocol is an automatic repeat request fragmentation protocol used over a wireless air interface. Most wireless air interfaces are tuned to provide 1% packet loss, and most Vocoder are mutually tuned to sacrifice very little voice quality at 1% packet loss....
 in CDMA2000
CDMA2000

CDMA2000 is a hybrid 2.5G / 3G technology of mobile telecommunications Standardizations that use CDMA, a multiple access scheme for digital radio, to send voice, data, and Signalling data between mobile phones and cell sites....
), or proxy based solutions (which require some changes in the network without modifying end nodes).

Hardware implementations

One way to overcome the processing power requirements of TCP is to build hardware implementations of it, widely known as TCP Offload Engine
TCP Offload Engine

TCP Offload Engine or TOE is a technology used in network interface cards to offload processing of the entire TCP/IP stack to the network controller....
s (TOE). The main problem of TOEs is that they are hard to integrate into computing systems, requiring extensive changes in the operating system of the computer or device. The first company to develop such a device was Alacritech
Alacritech

Alacritech is a computer network company based in the United States. The company specializes in high speed network card that enhance performance by moving some TCP/IP processing from the central processing unit to the NIC....
.

Debugging

A packet sniffer
Packet sniffer

A packet analyzer is computer software or computer hardware that can intercept and log traffic passing over a digital telecommunications network or part of a network....
, which intercepts TCP traffic on a network link, can be useful in debugging networks, network stacks and applications which use TCP by showing the user what packets are passing through a link. Some networking stacks support the SO_DEBUG socket option, which can be enabled on the socket using setsockopt. That option dumps all the packets, TCP states and events on that socket which will be helpful in debugging. netstat
Netstat

netstat is a Command line interface Computer software that displays Transmission Control Protocol , routing tables, and a number of network interface statistics....
 is another utility that can be used for debugging.

Alternatives

For many applications TCP is not appropriate. One big problem (at least with normal implementations) is that the application cannot get at the packets coming after a lost packet until the retransmitted copy of the lost packet is received. This causes problems for real-time applications such as streaming multimedia (such as Internet radio), real-time multiplayer games and voice over IP
Voice over IP

Voice over Internet Protocol is a general term for a family of transmission technologies for delivery of voice communications over Internet Protocol networks such as the Internet or other packet-switched Computer network....
 (VoIP) where it is sometimes more useful to get most of the data in a timely fashion than it is to get all of the data in order.

For both historical and performance reasons, most storage area network
Storage area network

A storage area network is an architecture to attach remote computer storage devices to Server s in such a way that the devices appear as Direct-attached storage to the operating system....
s (SANs) prefer to use Fibre Channel
Fibre Channel

Fibre Channel, or FC, is a gigabit-speed network technology primarily used for storage networking. Fibre Channel is standardized in the Technical Committee T11 of the InterNational Committee for Information Technology Standards , an American National Standards Institute ?accredited standards committee....
 protocol (FCP) instead of TCP/IP.

Also for embedded systems, network booting
Network booting

Network booting is the process of booting a computer from a computer network rather than a local drive. This method of booting can be used by routers, diskless workstations and centrally managed computers such as public computers at library and schools....
 and servers that serve simple requests from huge numbers of clients (e.g. DNS
Domain name system

The Domain Name System is a hierarchical naming system for computers, services, or any resource participating in the Internet. It associates various information with domain names assigned to such participants....
 servers) the complexity of TCP can be a problem. Finally some tricks such as transmitting data between two hosts that are both behind NAT
Network address translation

In computer networking, network address translation is the process of modifying network address information in datagram packet headers while in transit across a traffic router for the purpose of remapping a given address space into another....
 (using STUN
STUN

Simple Traversal of User Datagram Protocol through Network Address Translators , is a standards-based IP protocol used as one of the methods of NAT traversal in applications of real-time voice, video, messaging, and other interactive IP communications....
 or similar systems) are far simpler without a relatively complex protocol like TCP in the way.

Generally where TCP is unsuitable the User Datagram Protocol
User Datagram Protocol

The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, sometimes known as datagram, to other hosts on an Internet Protocol network without requiring prior communications to set up special transmission cha...
 (UDP) is used. This provides the application multiplexing
Multiplexing

In telecommunications and computer networks, multiplexing is a process where multiple analog message signals or digital data streams are combined into one signal over a shared medium....
 and checksums that TCP does, but does not handle building streams or retransmission giving the application developer the ability to code those in a way suitable for the situation and/or to replace them with other methods like forward error correction
Forward error correction

In telecommunication and information theory, forward error correction is a system of error control for data transmission, whereby the sender adds Redundancy to its messages, also known as an error correction code....
 or interpolation
Interpolation (computer programming)

In the context of computer animation, interpolation refers to the use of piecewise polynomial interpolation to draw images semi-automatically....
.

SCTP
Stream Control Transmission Protocol

In computer networking, the Stream Control Transmission Protocol is a Transport Layer communications protocol, serving in a similar role as the popular protocols Transmission Control Protocol and User Datagram Protocol ....
 is another IP protocol that provides reliable stream oriented services not so dissimilar from TCP. It is newer and considerably more complex than TCP so has not yet seen widespread deployment. However, it is especially designed to be used in situations where reliability and near-real-time considerations are important.

Venturi Transport Protocol
Venturi Transport Protocol

Venturi Transport Protocol is a patented proprietary protocol transport layer protocol that is designed to transparently replace Transmission Control Protocol in order to overcome inefficiencies in the design of TCP related to wireless data transport....
 (VTP) is a patented proprietary protocol that is designed to replace TCP transparently in order to overcome perceived inefficiencies related to wireless data transport.

TCP also has some issues in high bandwidth utilization environments. The TCP congestion avoidance algorithm
TCP congestion avoidance algorithm

The Transmission Control Protocol uses a network congestion avoidance algorithm that includes various aspects of an AIMD scheme, with other schemes such as slow-start in order to achieve congestion avoidance....
 works very well for ad-hoc environments where it is not known who will be sending data, but if the environment is predictable, a timing based protocol such as ATM
Asynchronous Transfer Mode

Asynchronous Transfer Mode is an electronic digital data transmission technology. ATM is implemented as a network protocol and was first developed in the mid 1980s....
 can avoid the overhead of the retransmits that TCP needs.

Fields used to compute the checksum


TCP checksum using IPv4

When TCP runs over IPv4
IPv4

Internet Protocol version 4 is the fourth revision in the development of the Internet Protocol and it is the first version of the protocol to be widely deployed....
, the method used to compute the checksum is defined in RFC 793:
The checksum field is the 16 bit one's complement of the one's complement sum of all 16-bit words in the header and text. If a segment contains an odd number of header and text octets to be checksummed, the last octet is padded on the right with zeros to form a 16-bit word for checksum purposes. The pad is not transmitted as part of the segment. While computing the checksum, the checksum field itself is replaced with zeros.


In other words, after appropriate padding, all 16-bit words are added using one's complement arithmetic
Signed number representations

In mathematics, negative numbers in any base are represented in the usual way, by prefixing them with a "−" sign. However, on a computer, there are various ways of representing a number's sign....
. The sum is then bitwise complemented and inserted as the checksum field. A pseudo-header that mimics the IPv4 header, used in the checksum computation, is shown in the table below.

TCP pseudo-header (IPv4)
Bit offset Bits 0–3 4–7 8–15 16–31
0 Source address
32 Destination address
64 Zeros Protocol TCP length
96 Source port Destination port
128 Sequence number
160 Acknowledgement number
192 Data offset Reserved Flags Window
224 Checksum Urgent pointer
256 Options (optional)
256/288+  
Data
 


The source and destination addresses are those of the IPv4 header. The protocol value is 6 for TCP (cf. List of IP protocol numbers). The TCP length field is the length of the TCP header and data.

TCP checksum using IPv6

When TCP runs over IPv6
IPv6

Internet Protocol version 6 is the next-generation Internet layer protocol for packet -switched internetworking and the Internet. IPv4 is the dominant Internet Protocol version, and was the first to receive widespread use....
, the method used to compute the checksum is changed, as per RFC 2460:
Any transport or other upper-layer protocol that includes the addresses from the IP header in its checksum computation must be modified for use over IPv6, to include the 128-bit IPv6 addresses instead of 32-bit IPv4 addresses.


An IPv6 pseudo-header for computation of the checksum is shown below.

TCP pseudo-header (IPv6)
Bit offset Bits 0 - 7 8–15 16–23 24–31
0 Source address
32
64
96
128 Destination address
160
192
224
256 TCP length
288 Zeros Next header
320 Source port Destination port
352 Sequence number
384 Acknowledgement number
416 Data offset Reserved Flags Window
448 Checksum Urgent pointer
480 Options (optional)
480/512+  
Data
 


  • Source address – the one in the IPv6 header
  • Destination address – the final destination; if the IPv6 packet doesn't contain a Routing header, that will be the destination address in the IPv6 header, otherwise, at the originating node, it will be the address in the last element of the Routing header, and, at the receiving node, it will be the destination address in the IPv6 header.
  • TCP length – the length of the TCP header and data;
  • Next Header – the protocol value for TCP


See also


Further reading

  • W. Richard Stevens
    W. Richard Stevens

    William Richard Stevens was one of the most famous and widely acclaimed authors of Unix and Internet protocol suite books....
    . TCP/IP Illustrated, Volume 1: The Protocols. ISBN 0-201-63346-9
  • W. Richard Stevens
    W. Richard Stevens

    William Richard Stevens was one of the most famous and widely acclaimed authors of Unix and Internet protocol suite books....
     and Gary R. Wright. TCP/IP Illustrated, Volume 2: The Implementation. ISBN 0-201-63354-X
  • W. Richard Stevens
    W. Richard Stevens

    William Richard Stevens was one of the most famous and widely acclaimed authors of Unix and Internet protocol suite books....
    . TCP/IP Illustrated, Volume 3: TCP for Transactions
    T/TCP

    T/TCP is a variant of the TCP protocol.It is an experimental TCP extension for efficient transaction-oriented service.It was developed to fill the gap between TCP and User Datagram Protocol, by Bob Braden in 1994....
    , HTTP, NNTP
    Network News Transfer Protocol

    The Network News Transfer Protocol or NNTP is an Internet application Protocol used primarily for reading and posting Usenet articles , as well as transferring news among news servers....
    , and the UNIX Domain Protocols. ISBN 0-201-63495-3


External links

  • (Dissertation)
  • RFC 675 - Specification of Internet Transmission Control Program, December 1974 Version
  • RFC 793 - TCP v4
  • RFC 1122 - includes some error corrections for TCP
  • RFC 1323 - TCP-Extensions
  • RFC 1379 - Extending TCP for Transactions -- Concepts
  • RFC 1948 - Defending Against Sequence Number Attacks
  • RFC 2018 - TCP Selective Acknowledgment Options
  • RFC 2581 - TCP Congestion Control
  • RFC 2988 - Computing TCP's Retransmission Timer
  • RFC 4614 - A Roadmap for TCP Specification Documents
  • by Joel Spolsky