Vaidikalaya

TCP/IP Model


The TCP/IP Model is a set of rules (a framework) that explains how data travels across a network, like the internet. It helps different computers communicate with each other, even if they use different hardware or software. TCP/IP stands for Transmission Control Protocol/Internet Protocol. Together, they manage how messages are broken into small packets, sent, routed, and delivered accurately.

  • It has four layers, Application, Transport, Network/Internet and Network Access.
  • While the OSI model has seven layers, the 4 layer TCP/IP model is simpler and commonly used in today’s Internet and networking systems.

Role of TCP/IP

One of its main goals is to make sure that the data sent by the sender arrives safely and correctly at the receiver’s end. To do this, the data is broken down into smaller parts called packets before being sent. These packets travel separately and are reassembled in the correct order when they reach the destination.


Layers of TCP/IP Model

The TCP/IP model has 4 layers. These layers define how data moves from one device to another over a network like the internet.


1. Application Layer

The Application Layer is the topmost layer in the TCP/IP model. It provides network services directly to the user’s applications, such as web browsers, email clients, and file-sharing software.

  • It allows users to interact with the network.
  • All internet-based applications work through this layer.
  • It is the combination of the Application, Presentation, and Session layers of the OSI model.
Functions of Application Layer
  • Provides services like email, web browsing, file transfer, etc.
  • Handles high-level protocols that applications use.
  • Converts user actions (like clicking a link) into network requests.
  • Prepares data to be sent to the lower layers.
Protocols of Application Layer
  • HTTP / HTTPS: Browsing websites
  • FTP: Uploading/downloading files
  • SMTP / POP3 / IMAP: Sending and receiving emails
  • DNS: Converts domain names to IP addresses
  • TELNET / SSH: Remote login to another computer
  • SNMP: Network management
Examples
1. Browsing a Website (HTTP/HTTPS)

When you open https://google.com, your browser (Chrome, Safari, Firefox) uses:

  • HTTP/HTTPS protocol
  • To request the webpage from Google’s server
  • And display the result to you

This entire process is handled at the Application Layer.

When a user opens Google.com in a web browser, the browser uses the HTTP/HTTPS protocol, which works at the Application Layer of the TCP/IP model. This protocol enables communication between the browser and the web server.

Advantages:

The Application Layer provides direct network services to users through protocols like HTTP, FTP, DNS, and SMTP. It simplifies communication, supports interoperability, and enables multiple internet-based functions such as browsing and email.

Limitations:

This layer is highly vulnerable to security threats, depends completely on lower layers, and may suffer performance issues. It has protocol overhead, and incorrect configuration can stop services.


Transport Layer

The Transport Layer is the second layer of the TCP/IP model. It is responsible for end-to-end communication between devices and ensures that data is delivered correctly, in the right order, and without errors. It provide reliable or fast communication between the sender and receiver.

The Transport Layer of the TCP/IP model provides end-to-end communication using TCP and UDP. It performs segmentation, flow control, error detection, and ensures reliable or fast delivery of data. TCP offers reliable connection-oriented service, while UDP provides fast connectionless service. It is essential for accurate and efficient communication.

Functions of Transport Layer
  • Segmentation: Breaks large data into small chunks called segments before sending.
  • End-to-End Communication: Creates a connection between sender and receiver devices.
  • Error Detection & Correction: Ensures the received data is accurate and without corruption.
  • Flow Control: Controls the data sending rate so the receiver does not get overloaded.
  • Reliable or Fast Delivery: Provides two choices 1. Reliable: Using TCP, 2.Fast: Using UDP
Protocols of Transport Layer
1. TCP – Transmission Control Protocol
  • Reliable
  • Connection-oriented
  • Ensures correct order delivery
  • Retransmits lost packets
  • Used for browsing, email, file transfer
2. UDP – User Datagram Protocol
  • Fast
  • Connectionless
  • No guarantee of delivery
  • Used for games, streaming, video calls
Examples
  • When downloading a file → TCP ensures complete, error-free delivery
  • When watching live cricket → UDP delivers data quickly, even if some packets are lost
Advantages of Transport Layer
  • Reliable and Secure Data Transfer: TCP ensures all data reaches correctly.
  • Supports Fast Data Transmission: UDP provides low-latency communication for real-time use.
  • Manages Data Flow: Avoids congestion in networks.
  • Error Handling: Detects and corrects errors using checksum.
Limitations of Transport Layer
  • TCP Is Slower: Because it checks and verifies each packet.
  • No Guarantee in UDP: Packets may be lost, duplicated, or arrive out of order.
  • Overhead: Extra header information increases data size.
  • Depends on Internet Layer: If routing fails, this layer cannot deliver data.

3. Internet Layer

The Internet Layer is the third layer of the TCP/IP model. It is used for finding the best path for data to travel across different networks so it can reach the right destination. It works like a traffic controller, helping data packets move from one network to another until they reach the correct device.

This layer uses the Internet Protocol (IP) to give every device a unique IP address, which helps identify where data should go.

The Internet Layer of the TCP/IP model handles logical addressing and routing of data across networks. It uses protocols like IP, ICMP, ARP, and RARP. Its main functions include packet forwarding, routing, and fragmentation. Although it ensures that packets reach their destination, it does not guarantee delivery, order, or error correction.

Functions of Internet Layer
  • Logical Addressing: Assigns IP addresses to devices (IPv4, IPv6). This helps identify each device on the network.
  • Routing: Finds the best path for data to travel across networks (via routers).
  • Packet Forwarding: Forwards packets from one network to another until they reach the destination.
  • Packet Fragmentation: Breaks packets into smaller pieces if they are too big for a network.
  • Error Reporting: Helps detect and report errors using ICMP.
Protocols of Transport Layer
  • IP (Internet Protocol): Core protocol of this layer. Handles addressing and routing.Two versions: IPv4 and IPv6
  • ICMP (Internet Control Message Protocol): Used for testing and error messages. Example: Ping command works through ICMP
  • ARP (Address Resolution Protocol): Converts an IP address → MAC address.Used inside local networks
  • RARP (Reverse ARP): Converts MAC address → IP address
Example

When you send a WhatsApp message:

  1. Internet Layer puts your IP address as source
  2. Server IP as destination
  3. Decides the best route
  4. Routers forward packet step-by-step
  5. Message reaches the destination device
Advantages of Internet Layer
  • Efficient Routing: Ensures packets travel through the most efficient path.
  • Supports Large Networks: Allows communication across the entire internet.
  • Supports Multiple Protocols: Works with IP, ICMP, ARP, and RARP.
  • Enables Global Communication: Different networks around the world can talk to each other.
Limitations of Internet Layer
  • No Delivery Guarantee (IP): IP is unreliable: Packets may be lost,Duplicated, Delivered out of order.
  • No Error Correctio: IP reports errors (via ICMP) but doesn’t fix them.
  • No Flow Control: That is handled by the Transport Layer.
  • Fragmentation Issues: Packet fragmentation can reduce performance.

4. Network Access Layer

The Network Access Layer, also called the Link Layer or Host-to-Network Layer, is the bottom layer of the TCP/IP model.Its main role is to handle the physical sending and receiving of data over the network using hardware like: Wi-Fi, Ethernet cables, Network interface cards (NIC) and Switches.

The Network Access Layer is the lowest layer of the TCP/IP model. It manages physical data transmission through technologies like Ethernet and Wi-Fi. It handles framing, MAC addressing, error detection, and communication with hardware devices. This layer corresponds to the Physical and Data Link layers of the OSI Model. It ensures data is properly transmitted over the network medium.

Functions of Network Access Layer
  • Physical Transmission of Data: Transfers bits (0s and 1s) over the physical medium:Copper wires, Fiber cables, Radio waves,(Wi-Fi)
  • MAC Addressing: Uses MAC addresses (hardware addresses) to identify devices within the same local network.
  • Framing: Encapsulates the data into frames before sending it across the network.
  • Error Detection (Basic): Identifies errors in frames using CRC (Cyclic Redundancy Check).
  • Access Control: Decides who gets to use the network channel at what time (important in Wi-Fi & Ethernet).
  • Interfacing With Physical Hardware: Controls NIC, switches, modems, and routers at the lowest level.
Protocols of Transport Layer
  • Ethernet (LAN): Most common wired network technology.
  • Wi-Fi (802.11): Wireless communication.
  • PPP (Point-to-Point Protocol): Used in direct connections.
  • MAC & LLC (Data Link Sub-Layers): MAC → controls physical address, LLC → manages communication between devices
  • Physical Media: Copper cable, Fiber optics, Radio signals
Example

When you connect your laptop to Wi-Fi:

  • The Network Access Layer converts data into wireless signals
  • Sends them to the router
  • Router converts them back into electrical signals
  • Sends to the internet
Advantages of Network Access Layer
  • Direct Hardware Communication: Enables real physical data transfer.
  • Supports Multiple Media Types: Ethernet, Wi-Fi, fiber, DSL, etc.
  • Provides High-Speed Data Transfer: Modern technologies allow gigabit or multi-gigabit speeds.
  • Ensures Frame-Level Error Detection: Basic error checking prevents corrupted data at the earliest stage.
Limitations of Network Access Layer
  • Limited to Local Network: Only works within LAN or link layer networks.
  • Physical-Level Errors: Prone to issues like:, Cable damage: Signal interference, Hardware failure
  • No Routing: Cannot send data between different networks—that’s the Internet Layer’s role.
  • No Reliability Features: No guarantees of delivery, order, or retransmission.

Why TCP/IP Is Used Over the OSI Model

1. TCP/IP Is Practical, OSI Is Theoretical
  • TCP/IP is used in real-world networks, including the entire internet.
  • OSI is only a reference model used for teaching and understanding.
2. TCP/IP Model Came First
  • TCP/IP was developed before the OSI model.
  • By the time OSI came, TCP/IP was already used globally and widely adopted.
3. Faster Implementation and Adoption
  • TCP/IP was implemented quickly and used in ARPANET and early internet.
  • OSI took time, was complex, and never gained full implementation.
4. Simple, Fewer Layers
  • TCP/IP has 4 layers, making it easier to implement.
  • OSI has 7 layers, which is more complex.
5. Protocol Standards Are Open and Free
  • TCP/IP protocols are open standards, available freely to everyone.
  • OSI protocols were expensive and sometimes restricted.
6. Works with Multiple Hardware and Operating Systems
  • Supports Windows, Linux, macOS, Android, routers, and all devices.
  • Designed for interoperability.
7. Robust, Scalable, and Reliable
  • Designed to support millions of devices
  • Used across global networks
  • Supports routing, congestion control, addressing, etc.
TCP/IP is used over the OSI model because it is practical, implemented, and widely adopted in real networks, including the internet. It is simpler, faster, and supports open standards. TCP/IP was developed earlier and proved to be efficient, reliable, and scalable, while the OSI model remained mostly theoretical. Therefore, TCP/IP became the standard protocol suite for communication worldwide.

Advantages of TCP/IP Model

1. Standard Model for the Internet
  • TCP/IP is the foundation of the entire internet.
  • All modern networking systems, servers, routers, and devices use it.
2. Highly Scalable

TCP/IP is highly scalable, making it suitable for both small and large networks, from local area networks (LANs) to wide area networks (WANs) like the internet.

3. Independent of Hardware & OS

Works on: Windows, Linux, macOS, Android, Routers & switches. Ensures interoperability between different systems.

4. Supports Routing & Multiple Paths

TCP/IP efficiently routes data across:LAN, WAN, Internet. Makes global communication possible.

5. Reliable Communication (TCP)

TCP/IP includes error-checking and retransmission features that ensure reliable data transfer, even over long distances and through various network conditions.

6. Open Protocol Standard

Protocols are publicly available → anyone can implement them.

7. Flexible & Extensible

New protocols can be added easily. e.g., HTTP/2, IPv6, HTTPS.


Disadvantages of TCP/IP Model

1. Difficult to Understand for Beginners

Some protocols and working mechanisms are complex.

2. Does Not Clearly Separate Services

Compared to OSI’s 7 layers, TCP/IP’s 4 layers combine many functions. Example Application Layer = OSI's Application + Presentation + Session

3. Lacks Security Features

TCP/IP was not designed with built-in security. (It relies on additional protocols like SSL, TLS, IPSec).

4. No Strict Model Structure

Layer boundaries are not strict—some protocols do not fit perfectly into just one layer.

5. Security Concerns

TCP/IP was not originally designed with security in mind. While there are now many security protocols available (such as SSL/TLS), they have been added on top of the basic TCP/IP model, which can lead to vulnerabilities.

6. Limited by Address Space

Although IPv6 addresses this issue, the older IPv4 system has a limited address space, which can lead to issues with address exhaustion in larger networks.

7. Inefficiency for Small Networks

For very small networks, the overhead and complexity of the TCP/IP model may be unnecessary and inefficient compared to simpler networking protocols.


MCQ

TCP/IP Model