banner

Home | Transport Layer | TCP and UDP | Layer 4 Ports

TCP-IP Essentials

Transmission Control Protocol/Internet Protocol (TCP/IP) is a protocol suite, or set of interrelated protocols organized into what generically is known as a protocol stack. In the context of the OSI Reference Model, IP operates at Layer 3, the Network Layer, and TCP operates at Layer 4, the Transport Layer. Extensions such as File Transfer Protocol (FTP) and Simple Mail Transfer Protocol (SMTP) operate at Layer 7, the Application Layer.

The initial set of protocols were proposed in 1974 by Vinton Cerf and Robert Kahn for the ARPANET (Advanced Research Project Agency Network), which was the foundation for what we know today as the Internet. Development work was completed in 1980 and in 1983 TCP/IP became mandatory for use in the Internet.

The intent of TCP/IP was to serve as the glue for the interworking of disparate networks, independent of host computer hardware and operating systems, transmission media, and data link technologies. The end result is that the underlying issues of incompatibility are transparent to the users, as they cross network boundaries.

TCP/IP immediately realized great popularity due to its extensive documentation, ease of use, high level of effectiveness, extreme versatility and low cost. As it was developed with public funds, TCP/IP was, and remains, a public domain protocol, with no associated licensing fees.

Internet Protocol (IP) is the foundation for the entire suite. IP establishes the nature and length of the packets, and provides addressing information used by the various switches and routers to direct each individual packet to its intended destination. IP operates in connectionless datagram mode.

Datagram mode refers to the fact that each packet is considered by the entire network and all constituent network elements as a separate unit, which survives or dies on its own. At this level, there is no concept of a packet's constituting a subset of data associated with something such as a text file or graphics file. Connectionless refers to the fact that there is no predetermined path through the network established as part of a call setup process. Rather, each datagram (hopefully) works its way through the network independently.

As a result, each of 100 datagrams may follow a different path from one host computer to another across the network, depending on factors including congestion levels, blockages and hard failures. While this approach may seem less than stunning in terms of performance, it offers the advantage of extreme efficiency in a highly-shared packet network.

As there exist in such a network a great many switches and routers, and interconnecting links through and over which a given packet might travel, this approach also offers the built-in advantages of redundancy and resiliency.

Admittedly, IP is inherently unreliable, as there is no numbering of packets and, therefore, no opportunity for resequencing of packets on the receiving end, should they get out of order in transit. Further, there is no inherent error control mechanism. Finally, in this admittedly abbreviated list, there is no guarantee of delivery -- each packet gets across the network, or not, whether errored or not.

The IPv4 (IP version 4, the version most commonly used today) datagram has a fixed maximum size of 65,536 octets, including a header of 20 octets (a default minimum). The minimum total packet size, which all IP networks must be able to support, is 576 octets, including the header(s).

The header is a signaling and control mechanism which prepends the data payload, and which comprises a number of fields, the detailed discussion of which is beyond the scope of this Study Guide.

The header does, however, contain several fields that we do have room to discuss:

Service Type can be used to describe a set of QoS (Quality of Service) parameters such as priority, latency, throughput and reliability. While IP networks, unlike ATM networks do not offer guaranteed QoS, they can be designed to support something more along the lines of GoS (Grade of Service) on a best-effort basis only.

Time To Live (TTL) specifies the time in seconds or, more commonly, the number of hops through which a packet can survive. At each hop (i.e., network node) the number is decremented by a value of 1 until the TTL reaches 0, at which time the packet dies (i.e., is discarded). This mechanism prevents errored or misdirected packets from circling the network endlessly, contributing nothing but congestion.

Protocol identifies any higher-layer protocol that is running on top of IP. TCP or UDP, for example, might have created the data in the payload of the IP packet.

Source and Destination Address each are 32-bit fields that are used for identifying the source and destination host computers. This information also is critical for routing the datagrams.

Transmission Control Protocol (TCP) is one option that runs on top of IP, using all of the fundamental mechanisms of IP, and adding some important functionality.

TCP is a virtual circuit protocol that is connection-oriented in nature. Unlike a true connection-oriented protocol, however, TCP does not set up predefined paths across which all data flows during a given call. Rather, TCP sets up a virtual connection between the host computers.

The virtual connection, which is purely logical in nature, lasts for the duration of the session. As the underlying IP protocol provides the fundamental rules for the call, TCP is inherently connectionless. The virtual connection exists by virtue of the fact that a tight relationship is established between the source and destination host computers running the TCP/IP protocol suite.

On the transmit side of the equation, TCP accepts the data stream from the originating host computer, segments it into packets, numbers each, and attaches an error control mechanism to each before sending it on its way. On the receive side, TCP accepts each packet, checks each for errors, and resequences them in order to ensure that the file is reconstituted in its original form. Instances of missing or errored packets are resolved through requests for retransmission. TCP assumes responsibility for the integrity of the entire datastream, from end-to-end, which clearly adds value.

Top