OSI Model vs TCP/IP Protocol Suite: Complete Layer-by-Layer Comparison & Packet Flow for TU BCA
Author: Bhuban Subedi | Subject: Computer Networks (CACS303) | Semester: Fifth Semester
In computer networking, understanding how digital data travels from a web server across transoceanic optical cables into your smartphone screen is fundamental.
To standardize multi-vendor telecommunications, the International Organization for Standardization (ISO) developed the theoretical 7-Layer OSI Reference Model, while the practical internet was built upon the robust TCP/IP Protocol Suite.
In the Tribhuvan University (TU) BCA Fifth Semester Computer Networks (CACS303) board exams, a comprehensive 10-mark question asking you to compare OSI vs TCP/IP, explain data encapsulation, or describe the responsibilities of each layer is guaranteed.
In this guide, we will analyze all 7 layers, demystify packet encapsulation headers, compare TCP vs UDP, and map networking devices.
1. The 7-Layer OSI Reference Model Explained
+---+-------------------+-------------------------------+-----------------------------------+
| # | OSI Layer Name | Protocol Data Unit (PDU) | Primary Functions & Protocols |
+---+-------------------+-------------------------------+-----------------------------------+
| 7 | **Application** | Data (Message) | User interface, network services: |
| | | | HTTP, HTTPS, FTP, DNS, SMTP, SSH |
+---+-------------------+-------------------------------+-----------------------------------+
| 6 | **Presentation** | Data (Formatted) | Data formatting, encryption (TLS),|
| | | | compression (JPEG, MP4, ASCII) |
+---+-------------------+-------------------------------+-----------------------------------+
| 5 | **Session** | Data (Dialog) | Session establishment, maintenance,|
| | | | synchronization & checkpointing |
+---+-------------------+-------------------------------+-----------------------------------+
| 4 | **Transport** | **Segment** (TCP) / Datagram | End-to-end reliability, flow & |
| | | | error control: TCP, UDP (Port #s) |
+---+-------------------+-------------------------------+-----------------------------------+
| 3 | **Network** | **Packet** | Logical addressing & routing: |
| | | | IPv4, IPv6, ICMP, OSPF, BGP |
+---+-------------------+-------------------------------+-----------------------------------+
| 2 | **Data Link** | **Frame** | Physical MAC addressing, framing, |
| | | | error detection (CRC): Ethernet |
+---+-------------------+-------------------------------+-----------------------------------+
| 1 | **Physical** | **Bits** (0s and 1s) | Electrical signals, fiber light, |
| | | | cabling (Cat6, Coaxial), hubs |
+---+-------------------+-------------------------------+-----------------------------------+
2. OSI Model vs. TCP/IP Architecture: Direct Mapping
OSI 7-LAYER MODEL TCP/IP 4-LAYER SUITE
+--------------------------+ +--------------------------+
| 7. Application Layer | | |
+--------------------------+ | |
| 6. Presentation Layer | ---------> | 1. Application Layer |
+--------------------------+ | (HTTP, DNS, SSH, etc) |
| 5. Session Layer | | |
+--------------------------+ +--------------------------+
| 4. Transport Layer | ---------> | 2. Transport Layer (Host)|
| (TCP, UDP) | | (TCP, UDP) |
+--------------------------+ +--------------------------+
| 3. Network Layer | ---------> | 3. Internet Layer |
| (IPv4, IPv6, ICMP) | | (IP, ICMP, ARP) |
+--------------------------+ +--------------------------+
| 2. Data Link Layer | ---------> | 4. Network Access / |
+--------------------------+ | Link Layer |
| 1. Physical Layer | ---------> | (Ethernet, Wi-Fi) |
+--------------------------+ +--------------------------+
3. Data Encapsulation & Decapsulation Process
As user data flows down the protocol stack on the sender side, each layer prepends a specific Header (and the Data Link layer appends a Trailer). On the receiver side, headers are stripped layer-by-layer (Decapsulation).
Sender Machine: Receiver Machine:
[ User Message ] [ User Message ]
| ^
v |
[ L4 Header | Data ] (Segment) [ L4 Header | Data ]
| ^
v |
[ L3 Header | L4 Header | Data ] (Packet) [ L3 Header | L4 Header | Data ]
| ^
v |
[ L2 Frame Header | L3 | L4 | Data | FCS Trailer ] [ L2 Frame Header | ... ]
| ^
v |
01101001 01101110 01110100 01100101 (Bits on wire) =====> Bits received
4. Transport Layer Protocols: TCP vs. UDP
+------------------------------------+------------------------------------+
| Transmission Control Protocol (TCP)| User Datagram Protocol (UDP) |
+------------------------------------+------------------------------------+
| **Connection-Oriented:** Establishes| **Connectionless:** Sends packets |
| 3-Way Handshake (SYN, SYN-ACK, ACK)| immediately without handshake. |
| before data transmission. | |
+------------------------------------+------------------------------------+
| **Reliable Delivery:** Guarantees | **Unreliable (Best-Effort):** Does |
| in-order packet delivery and | not guarantee packet delivery or |
| retransmits lost packets. | retransmission. |
+------------------------------------+------------------------------------+
| Heavyweight (20-60 byte header). | Lightweight (8-byte fixed header). |
+------------------------------------+------------------------------------+
| Slower speed due to ACKs. | Ultra-fast, minimal latency. |
+------------------------------------+------------------------------------+
| Use Cases: Web (HTTP/S), Email | Use Cases: Live Video Streaming, |
| (SMTP), File Transfer (FTP), SSH. | DNS queries, VoIP calls, Gaming. |
+------------------------------------+------------------------------------+
5. Network Hardware Devices across Layers
- Hub / Repeater (Layer 1 – Physical): Dumb multi-port broadcast device; forwards all incoming electrical signals to all connected ports without filtering.
- Switch / Bridge (Layer 2 – Data Link): Intelligent device that inspects source and destination MAC addresses and maintains a CAM table to forward frames directly to the target port.
- Router (Layer 3 – Network): Routes packets across different IP subnets based on Logical IP Addresses and routing protocols (OSPF, BGP).
- Application Gateway / Firewall (Layer 7): Inspects application payloads (e.g., blocking malicious SQL strings or filtering URLs).
Frequently Asked Questions (FAQ)
Q1: What is the TCP 3-Way Handshake?
Before sending data over TCP, the client and server synchronize:
1. SYN: Client sends Synchronize packet to server.
2. SYN-ACK: Server acknowledges and sends its own SYN packet.
3. ACK: Client acknowledges server’s SYN. Connection is now ESTABLISHED.
Q2: What is the difference between a MAC Address and an IP Address?
- MAC Address (Physical Address): 48-bit hex address permanently burned into the network card (NIC) by the manufacturer; used for local local-area network delivery.
- IP Address (Logical Address): 32-bit (IPv4) or 128-bit (IPv6) configured address assigned by a network router/ISP; used for global internet routing.



