The Transmission Control Protocol (TCP) is a communications protocol that was developed in the 1970's as a part of the TCP/IP protocol suite. The Transmission Control Protocol (TCP) is now a part of the Internet protocol suite, and is located within the transport layer. The Transmission Control Protocol (TCP) has been designed to provide a reliable, accurate and error checked delivery of data on IP networks.
In 1973, Bob Kahn joined DARPA and started a project to design a new communications protocol that would improve upon and replace the Network Control Program (NCP). Kahn invited Vint Cerf to help him design this new communications protocol: which would provide an open, simple network design. The emphasis of this new communications protocol was to make it easier to interconnect networks, and place responsibility for the delivery of data onto the host computers, rather than on the network. The eventual result was TCP/IP, a suite of protocols, with the core protocols being: Internet Protocol (IP) and the Transmission Control Protocol (TCP). TCP/IP evolved to become the Internet protocol suite, and IP and TCP remain the core communication protocols of the Internet.
The Internet and TCP/IP networks are based upon packet switching: where tiny blocks of data, known as packets, are routed from one location to another. The size and structure of packets is defined by the Internet Protocol (IP), and this protocol also provides a routing structure (numbering system) so that a packet can be sent from a source location to a destination location. The problem with the Internet Protocol (IP) is that it is unreliable and does not guarantee that the data received will be identical to the data sent.
The Transmission Control Protocol (TCP) is part of the transport layer of the Internet protocol suite; there are four layers in the Internet protocol suite, and the transport layer is an intermediate layer, placed between the application layer and the Internet layer. Application layer protocols include protocols that provide Internet services like: the World Wide Web, Gopher and Electronic Mail. The Internet layer is dominated by the Internet Protocol (IP).
Applications layer protocols need data to be sent accurately, therefore, they cannot rely solely on the Internet Protocol (IP) to route the data. Through a process of encapsulation, application layer protocols use the Transmission Control Protocol (TCP) to reliable send data for them. The Transmission Control Protocol (TCP) is concerned with reliability rather than speed; therefore, if a data stream uses TCP it will delay the transmission of the data by a few seconds. If an application layer did not use TCP, but relied solely on the Internet Protocol (IP) to send the data: the data would be transported faster, but with no guarantee that the data will be sent, or sent in an orderly manner.
If an application layer protocol does use the Transmission Control Protocol (TCP), then TCP will accept the data, divide it into segments of data, and will add a header (which includes routing information) for the data. The TCP segment will then - through a system of encapsulation - be inserted into a Internet Protocol (IP) datagram. The Internet Protocol (IP) will always be responsible for the actual delivery of the data, but the Transmission Control Protocol (TCP) will 'keep an eye' on the data to ensure it is sent and received as intended. TCP achieves this through segmenting the data and adding it's own header.
The TCP header is the essential component that ensures that the data is reliable sent and received. The TCP header includes ten fields:
Two notable fields - which help to understand how TCP functions - is a source port and a destination port. The Internet Protocol (IP) assigns a 32bit or a 128bit number to host computers: this number is a unique address for that host computer. TCP assigns a port number to each application layer protocol - the World Wide Web is port number 80 for example. When an IP address is combined with a TCP port number it ensures that the data is sent and received to an exact location at a host computer. The sequence number ensures that the destination computer can arrange the data in the correct order. The checksum feature of a TCP header ensures that the data is error checked.