Previous Up Table of Contents Next

TCP/IP Protocol Layering


Any actual system can be compared to the ISO reference model to clarify the intended function of the layers of the actual system and to aid in its comparison to other actual systems. However, there is never a perfect match between the layers of an actual system and the layers of the ISO reference model.

In the case of the TCP/IP protocol suite, there are only four layers. The TCP/IP standards do not specify anything analogous to layers 1, 5, and 6 of the ISO standard.

Network Interface

The network interface layer of TCP/IP is responsible for arranging for IP datagrams to be passed to a physical network interface device. Included in this responsibility is mapping IP addresses to physical addresses. The IP protocol suite does not specify how to do this mapping, nor does it specify how to interact with specific devices. Ancillary standards, known as Requests for Comments (RFCs), set forth the standards for arranging for IP datagrams to be carried by particular types of network interfaces.

Internet

The Internet layer concerns itself with Internet Protocol (IP) datagrams and the management of the information on routers that are available to forward them from one network to another.

IP datagrams are not guaranteed to be delivered to their destination. Hence, IP is considered "unreliable." However, rather than being a weakness, this unreliability is actually a major strength of the protocol suite. Technically, IP datagram delivery is done on a "best effort" basis. This means that if a device is in possession of a datagram that has not yet been delivered to its final destination, it must attempt to forward it closer to that destination, but if a problem occurs it is free to discard the datagram.

Transport

The IP suite contains two standard transport level protocols: the "transport control protocol" (TCP) and the "user datagram protocol" (UDP). TCP is the protocol popularly associated with the IP suite, hence the common reference to "TCP/IP." The slash mark in "TCP/IP" indicates that TCP is layered on top of IP. Theoretically, TCP could be layered on top of any datagram protocol, even ones that are part of other protocol suites.

The UDP/IP protocol combination is simply a means of delivering a datagram from one program to another with a simple one-to-one correspondence between IP datagrams and UDP datagrams. That is, each UDP datagram is carried by a single IP datagram. Hence, UDP shares all of the unreliability of the IP protocol. It is up to higher layers of software to deal with this unreliability as needed. In some cases, any attempts by the operating system layers to deal with the unreliability cause performance problems that are unacceptable to certain applications

The TCP/IP protocol combination offers a "connection-oriented reliable byte stream", sometimes called a "virtual circuit." TCP deals with datagram loss as well as potential datagram reordering and duplication to provide a degree of "reliability." The notion of reliability is rather technically defined and should not be taken too seriously: there do exist conditions where certain kinds of failure will occur. However, these conditions are ones that are essentially unavoidable. For example, if the destination machine crashes between the time the operating system processes a TCP transmission and the time the application processed the transmission, the sending operating system will have no way of informing the sending application. Most popular IP applications use TCP for a transport layer protocol because it provides good reliability characteristics, has very efficient, proven implementations, and a simple to use interface for programmers. A reliable byte stream is essentially equivalent to a sequential file of characters from a programmer's point of view.

Application

The TCP/IP protocol suite does not deal with session or presentation layers at all. The operating system is typically responsible for the transport layer, but how an application takes advantage of that is left up to the designer of the application protocol. In practice, however, a variety of session and presentation protocols have evolved as application protocol designers build on each other's work and borrow ideas from each other.

This evolutionary development is one of the major strengths of the suite. It is based on proven ideas that work rather than ideas written down by a committee before anyone tries them out.

The earliest major application protocols were for providing terminal sessions (telnet), file transfer (FTP), and electronic mail (SMTP). All of these use TCP and are still widely used across the expanse of the Internet. The protocols that use UDP are those expected to be limited to a local site and support system functions rather than application functions. For example file sharing (NFS) routing information (RIP) protocols use UDP.

Some application layer protocols use either TCP or UDP depending on the situation. For example the domain name system (DNS) uses TCP for bulk transfers and queries for critical information, but uses UDP for routine queries.

Previous Up Table of Contents Next

&copy Paul Buis, Associate Professor
Computer Science Department
Ball State University
September, 1996