Home > Articles > Operating Systems, Server

  • Print
  • + Share This
This chapter is from the book

1.2 The Layers of the TCP/IP 5-Layer Model

A closer examination of the layers of the TCP/IP 5-layer model follows. The layers of the protocol stack are numbered, as you saw in Table 1.3. This examination starts at the Application layer (layer 5) of the protocol stack and works downward to the level of the Physical layer (layer 1) at the bottom of the stack.

Application Layer (5)

There are literally hundreds of applications that function at the Application layer, and more are being developed as the Internet evolves. Well-known TCP/IP applications include:

  • Web browsers/servers using the HyperText Transfer Protocol (HTTP)

  • mail applications and related protocols

    • Post Office Protocol (POP)

    • Internet Message Access Protocol (IMAP)

    • Simple Mail Transport Protocol (SMTP)

  • File Transfer Protocol (FTP)

  • telnet and rlogin

  • Domain Name Service (DNS)

  • Network File System (NFS)

  • Network Information Service (NIS) and Network Information Service Plus (NIS+)

Application layer protocols and applications are unable to deliver their own data across a network or Internet unassisted and so need to be encapsulated in a Transport protocol such as TCP or User Datagram Protocol (UDP). The Transport layer provides this transport service (also known as a delivery service) to the Application layer. The Transport layer protocol in turn relies on the Internet Protocol (IP) to provide an end-to-end routing service.

You will visit these concepts again when IP (Chapter 5), routing (Chapter 6), TCP/UDP (Chapter 7), and the Client-Server model (Chapter 8) are investigated in greater detail.

Focus on the following important points that summarize features of the Application layer. Chapter 8 examines how these applications interact with Transport layer protocols.


Key Learning Points

  • Many protocols function at the Application layer.

  • HTTP, SMTP, POP, FTP, and DNS are the most heavily used Application layer protocols on the Internet.

  • Web browsers, mail clients, news readers, ftp, telnet, sendmail are just a few of the thousands of layer 5 applications.

  • The Application layer uses the Transport layer for delivery.

  • Users often interact directly with Application layer programs.

  • The Application layer (5) is at the top of the stack.

Transport Layer (4)

TCP and UDP are the only two protocols that function at the Transport layer (4). They encapsulate or carry the layer 5 protocols and offer an end-to-end transport service. They accept data from a client network application on a client host and deliver it to the server application on the server host that is providing the client with the service. The client and the servers are usually on different systems and therefore need a network to connect them. Data travels between the client and server across one or more networks.

For example, a telnet client on the client host needs to reach the in.telnetd server daemon running on the server host. The telnet client process uses the TCP Transport layer protocol to connect to the in.telnetd server process (which usually exists on a different system). Other Application layer protocols use the UDP transport protocol, which offers a nonguaranteed transport service, trading guaranteed delivery for speed and minimized overhead. DNS queries, for example, use UDP, as speed is of the essence, and failure considerations are not so critical.

The choice of using either TCP or UDP at the Transport layer is made by the network programmer and is based on the type of service required. Some well-known network protocols that function at the Application layer use both TCP and UDP for different functions—DNS, for example, which is fully explored in Chapter 11. Some applications that were originally designed to use UDP, such as Sun's NFS that allows file sharing between systems, have switched to using TCP. Version 2 of NFS used UDP, but version 3 uses TCP.

Focus on the following important points before proceeding to the next section on the Internet layer.


Key Learning Points

  • Most Solaris applications use TCP and UDP for end-to-end delivery.

  • TCP and UDP are transport protocols.

  • TCP and UDP are encapsulated in IP.

  • TCP and UDP are not able to route their own data and so use IP to perform this task.

Chapter 7 explores the Transport layer protocols (TCP and UDP) in detail, examining why a given application may be better suited to using TCP than UDP, or the converse. In Chapter 8 we examine the client-server model and learn how the applications that use TCP/UDP are configured.

We next examine the Internet layer, on which the Transport layer relies for routing the data it is transporting. The Transport layer provides client and server applications with an end-to-end delivery service (which is not the same as routing), which you will see in Chapter 7, whereas IP (described in Chapter 6) provides an end-to-end IP datagram routing service.

Internet Layer (3)

At every other layer of the TCP/IP network model, multiple protocols exist to carry out similar tasks. The Internet layer is an exception, with only the IP protocol capable of performing the critical routing function. Although other protocols function at the Internet layer, only the IP protocol offers a datagram-based routing service to the upper layers of the stack. IP is the only protocol able to encapsulate and route packets to a destination IP address (identified in the IP datagram header), understand the IP address scheme, and route data for upper-layer protocols such as TCP, UDP, and ICMP. These, in turn, carry encapsulated application layer data.

The Internet layer protocol, IP, makes the routing decision and handles the routing of IP datagrams. IP is also responsible for the fragmentation of IP datagrams, which might be necessary if the underlying Network Interface layer (2) demands it. Chapter 5 covers IP fragmentation in detail.


IP does not build the routing tables; it merely uses the kernel routing table information in an attempt to route the IP datagram(s), as you will learn in Chapter 6.

IP was designed to run over any LAN or WAN technology. An IP's address is essentially a logical or software address that is mapped onto a Network layer (2) address so that IP datagrams can be packaged up (framed) and carried across a specific type of Network Interface layer technology, such as Token Ring or Ethernet. ARP manages the mapping between the Internet layer (3) where IP resides and the Network Interface layer where Ethernet resides. Chapter 4 examines ARP further. Chapter 5 covers IPv4 in detail and Chapter 13 explores IPv6.


Key Learning Points

IP makes the routing decision and routes IP datagrams.

IP routes datagram(s) to the destination IP address in the IP header.

IP datagrams typically carry (encapsulate) TCP/UDP application data.

IP functions at the Internet layer.

IP's header is a minimum of 20 bytes and can be larger.

IP's unit of data is an IP datagram.

Network Interface Layer (2)

Ethernet functions at this layer. There are alternatives to Ethernet at this layer, but Ethernet is dominant in terms of UNIX LANS and is the only LAN examined in detail in this book. Ethernet frames or encapsulates the data it is carrying, prior to transmitting its packet onto the Ethernet bus.

Network Interface layer technologies have Maximum Transmission Units (MTUs) of various sizes. (The MTU determines the maximum number of bytes that can be transmitted in a single frame, not including the headers.) As Table 1.5 shows, MTU size varies according to the Network Interface layer technology.

Table 1.5 Network Layer MTUs

Network Type

MTU (Bytes)



16 MB/second Token Ring (IBM)


4 Mbits/second Token Ring (IEEE 802.5)


Fiber Distributed Data Interface (FDDI)




IEEE 802.3/802.2


Point to Point (low delay)


Ethernet's MTU is especially significant because it determines whether an IP datagram carried by Ethernet needs fragmenting. See Chapter 5 for further information.


Key Learning Points

  • The Network Interface layer MTU determines the maximum number of bytes carried in a single frame.

  • Ethernet is a Network Interface layer technology.

  • Network Interface layer technologies have MTUs of various sizes.

Physical Layer (1)

This layer at the base of the stack identifies the LAN transmission media, typically fiberoptic or wire-based media. This layer concerns the transmission of bits across a physical media with very little interpretation of the data.

Chapter 3 examines the copper wire and fiberoptic-based media used by Ethernet, FDDI, and ATM in greater detail.

So far, we have examined the network protocols in the context of a network model. The ensuing discussion of the most important network protocols reveals their features and provides a foundation for chapters that follow.

  • + Share This
  • 🔖 Save To Your Account