TCP/IP communication protocol layers

The TCP/IP layers are:

LayerPrimary functionExamples
Application Do useful work HTTP, SMTP, POP, Ping, FTP
Transport Control the flow of information between the application program running on the client and the application program running on the server TCP (reliable), UDP (not reliable)
Network Route packets between networks (inter-network) IP
Data link Move data within a local area network Ethernet, ATM, PPP
Physical Define the physical characteristics of the communication hardware and mediumradio, twisted pair, fiber

The application layer is where real work gets done. Users typically interact with application programs to retrieve Web pages, transfer files, log on to remote systems, send and read e-mail, conduct teleconferences, etc. In other cases, the "user" might be a computer -- for example, a search engine "spider" automatically downloading pages to index.

Transport layer programs do what the name suggest -- they transport information between the application program on the client and the application program on the server. There are two major transport layer protocols.

  1. Transmission control protocol (TCP) is for applications that require a reliable connection between the client and server. TCP establishes a temporary connection between the client and server and controls the transmission of information. It checks for transmission errors, lost packets, and packets arriving out of order, and tries to automatically correct these without "bothering" the application program. It also does flow control slowing transmission if it is too fast for the receiver.
  2. The user datagram protocol (UDP), is an unreliable transport protocol with no sessions and no flow control. Error checking is optional. UDP is faster than TCP, and is suitable for isochronous applications like voice over IP (VoIP) or streaming video where nothing can be done if an error is detected.
The network layer is responsible for routing packets between networks. The network layer protocol is called Internet protocol or IP for short. Again, as the name "inter-net" implies, IP moves information between networks. Since routing efficiency is critical, IP is simple and fast. The complexity of message integrity is left to TCP.

The data link layer is used for moving information between two hosts within a local area network.

The physical layer Standards at this layer spell out the physical characteristics of the medium, for example radio, optical fiber or twisted pairs of copper wire, and the physical definition of "one" and "zero" bits (the modulation method).

The software at each layer is responsible only for its own function. In an organization, the president does not have to worry about how the IT people build Web pages, he delegates that to them. Similarly, an application programmer does not know or care how TCP does error checking, TCP does not care how IP routes packets, and the Ethernet protocol does not care whether the physical connection is a radio transmission or light over fiber.

The lower two layers, data-link and physical, are often discussed together as a combined network-access layer.

Finally, note that nearly all operating systems today -- Windows, Mac, Linux and other versions of UNIX -- include programs for the TCP and IP protocols. They also come with common application programs like Web, FTP, Ping, Telnet, Traceroute, POP and SMTP clients. Data-link programs are usually bundled with network interface hardware as firmware.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.