TCP/IP Model

Tarun BhargavaTarun Bhargava
4 min read

The TCP/IP Network Model

The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a foundational Internet and network communication framework. The Department of Defense developed this in the 1970s to maintain reliable and secure communication across different networks.

TCP (Transmission Control Protocol), IP (Internet Protocol) is the collection of protocols that allows the computers to connect with the network and exchange data with other computers over the Network.

The two main protocols in the Internet Protocol suite serve specific functions. TCP defines how applications can create channels of communication across a network. It also manages how a message is assembled into smaller packets before they are then transmitted over the internet and reassembled in the right order at the destination address. IP defines how to address and route each packet to make sure it reaches the right destination. Each gateway computer on the network checks this IP address to determine where to forward the message.

Example -the IP layer provides the ability to transfer data from one host to another without any guarantee to reliable delivery or duplicate suppression. Transport protocols such as TCP make use of this service to provide applications with reliable, in-order, data stream delivery

Common protocols of TCP/IP include the following:

  • HTTP (Hyper Text Transfer Protocol) handles the communication between a web server and a web browser.

  • HTTPS (Secure HTTP) handles secure communication between a web server and a web browser.

  • FTP (File Transfer Protocol) handles transmission of files between computers.

• The Application layer provides applications with standardized data exchange. Its protocols include the HTTP, FTP, Post Office Protocol 3 (POP3), Simple Mail Transfer Protocol (SMTP) and Simple Network Management Protocol (SNMP). At the application layer, the payload is the actual application data.

• The Transport layer is responsible for maintaining end-to-end communications across the network. TCP handles communications between hosts and provides flow control, multiplexing and reliability. The transport protocols include TCP and User Datagram Protocol (UDP), which is sometimes used instead of TCP for special purposes.

• The Network layer, also called the internet layer, deals with packets and connects independent networks to transport the packets across network boundaries. The network layer protocols are the IP and the Internet Control Message Protocol (ICMP), which is used for error reporting.

• The Physical layer, also known as the network interface layer or data link layer, consists of protocols that operate only on a link -- the network component that interconnects nodes or hosts in the network. The protocols in this lowest layer include Ethernet for local area networks (LANs) and the Address Resolution Protocol (ARP).

Advantages of using the TCP/IP model :-

  • Helps establish a connection between different types of computers;

  • Works independently of the operating system;

  • Supports many routing protocols;

  • Can be operated independently;

Disadvantages of TCP/IP

  • Complicated to set up and manage;

  • Transport layer doesn't guarantee delivery of packets;

  • Not easy to replace protocols in TCP/IP;

  • Doesn't clearly separate the concepts of services, interfaces and protocols, so not good for describing new technologies in new networks;

Real World Scenario :-

You want to order a book from an online bookstore.

Step 1: Application Layer (HTTP)
You open a web browser (e.g., Google Chrome) and type the URL of the online bookstore (e.g.,wwww.Fipkart.com The browser sends an HTTP (Hypertext Transfer Proctol) request to the server hosting the website.

Step 2: Transport Layer (TCP
The HTTP request is passed to the Transport Layer, where TCP breaks the request into smaller packets and assigns a sequence number to each packet. This ensures that the packets are delivered in the correct order.

Step 3: Internet Layer (IP)
The packets are then passed to the Internet Layer, where IP adds a header to each packet containing the source and destination IP addresses. The source IP address is your device's IP address, and the destination IP address is the server's IP address.

Step 4: Network Access Layer (Ethernet)
The packets are then passed to the Network Access Layer, where Ethernet adds a header and trailer to each packet. The header contains the source and destination MAC (Media Access Control) addresses, which are used to identify the devices on the local network.

Step 5: Physical Layer
The packets are transmitted over the physical network, such as a Wi-Fi or Ethernet connection.

Step 6: Server Response
The packets arrive at the server, which reassembles them into the original HTTP request. The server processes the request and sends a response back to your device.

Step 7: Return Journey
The response follows the same path as the request, but in reverse. The packets are transmitted from the server to your device, where they are reassembled into the original response .

0
Subscribe to my newsletter

Read articles from Tarun Bhargava directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Tarun Bhargava
Tarun Bhargava

Hello Everyone thanks to search my Profile . I am learning about DevOps and starting my journey with blogs.