What is the TCP/IP model and how it works?

The TCP/IP reference model is a layered model developed by the Defense Project Research Agency(ARPA or DARPA) of the United States as a part of their research project in 1960. Initially, it was developed to be used by defense only. But later on, it got widely accepted. The main purpose of this model is to connect two remote machines for the exchange of information. These machines can be operating in different networks or have different architecture.

In the early days, the TCP/IP reference model has four layers, as described below.

These layers are much similar to the layers of the OSI modl. The Application layer in the TCP/IP model has approximately the same functionality as the upper three layers(Application, Presentation, and Session layer) of the OSI model. Also, the Internet layer acts as the Network layer, and the Network Access layer acts as the lower two layers(Physical and Data-Link layer) of the OSI model. TCP/IP network model is named after two main protocols(TCP and IP) and is widely used in current internet architecture. But nowadays, we generally use a five-layer TCP/IP model, as shown below.

In the above diagram, the Physical and Data-Link layer acts as the Network Access layer of the previously used TCP/IP model. This TCP/IP model is currently in use. So, in this blog, we'll learn about the five-layer TCP/IP reference model. We'll also see the key features of this model and the functionalities of its five layers.

The key features of the TCP/IP model are as follows:
  1. Supports flexible architecture: We can connect two devices with totally different architecture using the TCP/IP model.
  2. End-node verification: The end-nodes(source and destination) can be verified, and connection can be made for the safe and successful transmission of data.
  3. Dynamic Routing: The TCP/IP model facilitates the dynamic routing of the data packets through the shortest and safest path. Due to dynamic routing, the path taken by the data packet can not be predicted, and thus it improves data security.
There are also some demerits of using the TCP/IP model, these are as follows:
  1. Replacing a protocol is not easy.
  2. The roles and functionalities of each layer are not documented and specified properly, as it is described in the OSI model.
Following are the five layers of the TCP/IP model:
  1. Physical Layer
  2. Data-Link Layer
  3. Internet Layer
  4. Transport Layer
  5. Application Layer

Now, we will learn about the functionalities of these layers one-by-one in detail.

1. Physical Layer

The Physical Layer is the lowest layer of the TCP/IP model. It deals with data in the form of bits. This layer mainly handles the host to host communication in the network. It defines the transmission medium and mode of communication between two devices. The medium can be wired or wireless, and the mode can be simplex, half-duplex, or full-duplex.

It also specifies the line configuration(point-to-point or multiport), data rate(number of bits sent each second), and topology in the network. There are no specific protocols that are used in this layer. The functionality of the physical layer varies from network-to-network.

2. Data-Link Layer

The Data-Link Layer is the second layer of the TCP/IP layer. It deals with data in the form of data frames. It mainly performs the data framing in which, it adds some header information to the data packets for the successful delivery of data packets to correct destinations. For this, it performs physical addressing of the data packets by adding the source and the destination address to it.

The data-link layer facilitates the delivery of frames within the same network. It also facilitates the flow and error control of the data frames. The flow of the data can be controlled through the data rate. Also, the errors in the data transmission and faulty data frames can be detected and retransmitted using the checksum bits in the header information.

3. Internet Layer

The Internet layer of the TCP/IP model is approximately the same as the Network layer of the OSI model. It deals with data in the form of datagrams or data packets. This layer mainly performs the logical addressing of the data packets by adding the IP(Internet Protocol) address to it. The IP addressing can be done either by using the Internet Protocol Version 4(IPv4) or Internet Protocol Version 6(IPv6).

The Internet layer also performs routing of data packets using the IP addresses. The data packets can be sent from one network to another using the routers in this layer. This layer also performs the sequencing of the data packets at the receiver's end. In other words, it defines the various protocols for logical transmission of data within the same or different network. The protocols that are used in the Internet layer are IP(Internet Protocol), ICMP(Internet Control Message Protocol), IGMP(Internet Group Management Protocol), ARP(Address Resolution Protocol), RARP(Reverse Address Resolution Protocol), etc.

4. Transport Layer

The Transport layer is the fourth layer of the TCP/IP model. It deals with data in the form of data segments. It mainly performs segmentation of the data received from the upper layers. It is responsible for transporting data and setting up communication between the application layer and the lower layers. This layer facilitates the end-to-end communication and error-free delivery of the data. It also facilitates flow control by specifying data rates. The transport layer is used for process-to-process communication with the help of the port number of the source and the destination.

The Transport layer facilitates the congestion control using the following protocols:

  1. TCP: TCP stands for Transmission Control Protocol. It is a connection-oriented protocol. It performs sequencing and segmentation of data. It also performs flow and error control in data transmission. There is an acknowledgement feature in TCP for the received data. It is a slow but reliable protocol. It is suitable for important and non-real time data items.
  2. UDP: UDP stands for User Datagram Protocol. It is a connection-less protocol. It does not perform flow and error control in data transmission. There is no acknowledgement feature in UDP for the received data. It is a fast but unreliable protocol. It is suitable for real-time data items.

5. Application Layer

The Application layer in the TCP/IP model is equivalent to the upper three layers(Application, Physical, and Session Layer) of the OSI model. It deals with the communication of the whole data message. The Application layer provides an interface between the network services and the application programs. It mainly provides services to the end-users to work over the network. For Example, file transfer, web browsing, etc. This layer uses all the higher-level protocols like HTTP, HTTPS, FTP, NFS, DHCP, FMTP, SNMP, SMTP, Telnet, etc.

The application layer helps in setting up and managing the network connections. It also checks for the user's program authentication and authorization for the data. It also performs some complex operations like data translation, encryption and decryption, and data compression. The application layer synchronizes the data at the sender's and the receiver's end. In other words, it is the topmost layer and defines the interface for application programs with transport layer services.

This is all about the TCP/IP model, its various layers and their functionalities. Hope you learned something new today. That's it for this blog.

Do share this blog with your friends to spread the knowledge. Visit our YouTube channel for more content. You can read more blogs from here.

Keep Learning :)

Team AfterAcademy!