TCP/IP Reference Model Explained

This tutorial explains five layers of the TCP/IP model (Application, Transport, Internet or Network, Data Link, and Physical) and their functionalities.

Application Layer

This layer defines the protocols and standards that an application requires to connect to the network. For example, an application layer protocol HTTP defines how a web browser can fetch a web page from a web server.

The following image shows an example of the HTTP protocol.

application layer example

The HTTP protocol manages the communication between the web browser and the webserver. It is a language that web browsers and web servers understand and use to provide the necessary information.

When we type a URL in the address bar of a web browser and press the Enter key, the HTTP protocol finds the destination address, gets the requested content from the destination host, and displays the received content. If the requested content is not available, it displays an error message.

The Application layer does not define any application. It only defines the standards, services, and protocols that an application needs to connect to a remote computer. HTTP, HTTPS, SNMP, NTP, SSH, FTP, TFTP, Telnet, DHCP, and DNS are examples of application layer protocols.

This tutorial is the fourth part of the article "Networking reference models explained in detail with examples.". Other parts of this article are the following.

OSI Model Advantages and Basic Purpose Explained

This tutorial is the first part of the article. It briefly explains why the OSI model was created and what the advantages of the OSI model are.

OSI Seven Layers Model Explained with Examples

This tutorial is the second part of the article. It explains the seven layers of the OSI model in detail.

Similarities and Differences between OSI and TCP/IP Model

This tutorial is the third part of the article. It compares the OSI reference model with the TCP/IP model and lists the similarities and differences between both.

Data Encapsulation and De-encapsulation Explained

This tutorial is the fifth part of the article. It explains how data is encapsulated and de-encapsulated when it passes through the layers.

Transport layer

This layer is also known as the host-to-host layer. It provides a logical connection between two hosts. The main functions of this layer are the following: -

  • Segmentation
  • Reliability
  • Flow control
  • Connection multiplexing

Let’s understand each of these functions in detail.

Segmentation

The process of breaking up a large data file into smaller and identifiable pieces is known as segmentation. Each piece produced in the segmentation process is known as a segment. Let's take an example.

A host wants to send a 100Mb file over a 1Mbps connection. Since the host cannot transfer a 100Mb file over a 1Mbps connection, it breaks the file into 100 or more pieces. It sets the size of each piece to less than or equal to the size of the connection. This process is known as segmentation, and each piece produced in this process is known as a segment.

Since the size of a segment is less than or equal to the size of the connection, it can easily travel across the connection. The destination host, upon receiving all pieces, reassembles them back in the original file. Segmentation allows a host to send and receive any size of data file over any size of the connection.

Reliability

A connection is considered as a reliable connection when it provides the following services: -

  • Recognize and resend the lost segments.
  • Recognize the segment order and arrange segments in the correct order.
  • Detect the duplicate segments and drop the extra segments.

TCP protocol provides all the above services. It assigns a unique number to each segment in a sequence. By using the sequence numbers, the remote host can rearrange all the segments in the original order. After transmitting the segments, it waits for an acknowledgment from the remote host. If it doesn’t receive an acknowledgment, it retransmits the segments.

Some applications such as DHCP and DNS do not require reliability. If an application doesn’t require reliability, it usually uses UDP protocol to transmit the data. Since UDP doesn’t use a reliable connection, it doesn’t insert the information in each segment header that is required in a reliable connection. Without this information, the header becomes much lighter than the header with this information. A segment with a lightweight header moves faster in the network than a segment with a heavy header.

Flow control

Flow control ensures that the remote host does not become overwhelmed by the source host sending too many segments at once. There are two types of flow control; ready /not-ready signals and windowing.

Ready/not-ready signals

In this method, the destination host sends ready and not-ready signals to the source host. Based on these signals, the source host controls the flow. The destination host sends a not-ready signal when its buffer fills up. Upon receiving the not-ready signal, the source host stops sending more segments and waits for a ready signal. Once the destination host is ready to receive more segments, it sends a ready signal to the source host. Upon receiving the ready signal, the source host resumes data sending.

Windowing

In this method, the source host and destination host first define the window size. Window size is the number of segments that the source host can send before receiving an acknowledgment from the destination host. Once the acknowledgment is received, the source host can send the next batch of segments.

Connection multiplexing

Multiplexing allows a host to initiate multiple connections with one or many hosts simultaneously. When a source host opens a connection, a session occurs. A session can be reliable or unreliable. To distinguish each session, the source host uses port numbers. It assigns a unique source port number to each segment which it sends in the session.

Internet or Network Layer

In the original TCP/IP model, this layer is defined as the Internet layer. In the updated version, it is renamed to the Network layer. The main functions of this layer are addressing and routing. For these functions, it uses IP protocol.

Addressing

To communicate with other hosts, every host in a network needs a unique address. A unique address is the combination of two types of addresses; software address and hardware address. This layer assigns software addresses. A software address is also known as an IP address.

Routing

Just like postal service delivers packages in the real world, routing service delivers data packets in the network. Routers provide the routing service. Routers receive data packets from source hosts and use certain logic to filter, forward, and deliver packets. A router reads the destination address of the incoming packet, finds the destination address, and delivers the packet to the destination host.

Just as the post office filters and reroutes the package based on the destination address, a router checks the destination address in the data packet and routes it through the best and the shortest path.

Link Layer (Data Link and Physical Layer)

This layer defines standards and protocols for data transmission and physical connectivity. It also provides hardware addressing that is used to locate a device in the local network. Switching and connecting devices are the two main functions of this layer.

Broadly, switching is just like routing, but it works with the hardware address instead of the software address. Switches are used for switching. Besides switching, it also defines standards and protocols which are used for physical connectivity.

In the original TCP/IP model, both functions are defined in the Link layer. In the updated version, both functions are defined separately. Functions and standards which are directly related to the physical transmission are defined in the Physical layer. Functions and standards which are indirectly related to physical transmission are defined in the Data link layer.

In the updated version, switching is defined in the Data link layer while standards and protocols related to the physical transmission are defined in the Physical layer.

TCP/IP model and its layers

Reference to other networking models

When the TCP/IP model was in the development phase, many standards and protocols had already been defined in other networking models. Developers of the TCP/IP model, instead of defining these standards and protocols again, referenced them in the TCP/IP model with their respective model names such as Ethernet standards and IEEE standards.

Whenever you see a standard mentioned with its model-name such as Ethernet standard or IEEE standard in TCP/IP model, you should consider it as a referenced standard. A referenced standard or protocol is a standard or protocol that is originally defined in another networking model.

That’s all for this part. In the next part of this article, we will understand the data encapsulation in the TCP/IP model. If you like this tutorial, please don’t forget to share it through your favorite social site.

Advertisements

ComputerNetworkingNotes CCNA Study Guide TCP/IP Reference Model Explained