IT240 Business Data Communication and Networking

Business Data Communication and NetworkingUnit 211 min read

OSI vs. TCP/IP: Models, Layers, and Real-World Networking

Unit 2 of Business Data Communication and Networking explains the OSI 7-layer model (theoretical framework) and the TCP/IP 4-layer model (practical implementation), their layers, functions, protocols, and how they enable data communication in networks—with comparisons, examples, and business applications.

Why Network Models Matter

Network models are blueprints that standardize how data travels across networks. Without them, devices (like your laptop and a server in the US) wouldn’t understand each other. Two dominant models exist:

  1. OSI (Open Systems Interconnection): A theoretical 7-layer model (ISO standard) for teaching and troubleshooting.
  2. TCP/IP (Transmission Control Protocol/Internet Protocol): A 4-layer practical model used by the internet and all modern networks.

1. The OSI Model: A 7-Layer Theoretical Framework

The OSI model divides networking into logical layers, each with a specific role. Think of it like a postal system:

  • Layer 7 (Application): User interfaces (e.g., web browsers, email clients).
  • Layer 6 (Presentation): Data translation (e.g., encryption, compression).
  • Layer 5 (Session): Manages connections (e.g., opening/closing a chat session).
  • Layer 4 (Transport): End-to-end communication (TCP/UDP).
  • Layer 3 (Network): Logical addressing (IP).
  • Layer 2 (Data Link): Physical addressing (MAC), error detection.
  • Layer 1 (Physical): Raw bit transmission (cables, signals).
1977ISO publishes OSIReference Model1980sWidespreadadoption in academia1990sTCP/IP dominatespractical implementati2000sOSI used fortroubleshooting framew
OSI Model development timeline

How Data Flows Through OSI Layers

When you send an email:

  1. Application Layer (7): Your email client (e.g., Gmail) prepares the message.
  2. Presentation Layer (6): Encrypts/compresses the data.
  3. Session Layer (5): Establishes a connection with the server.
  4. Transport Layer (4): TCP breaks the email into segments and ensures delivery.
  5. Network Layer (3): IP adds a source/destination IP address and routes it.
  6. Data Link Layer (2): MAC address is added; data becomes a frame.
  7. Physical Layer (1): The frame is converted to bits (0s and 1s) and sent via cables/wireless.
Physical Layer (1) → Bits (Transmission Media)Data Link Layer (2) → FrameNetwork Layer (3) → PacketTransport Layer (4)Session Layer (5)Presentation Layer (6)Application Layer (7)
OSI Model encapsulation/decapsulation flow (sender → receiver)

Key Protocols in OSI Layers

Layer Protocol/Function Example
Application HTTP, FTP, SMTP, DNS Loading a webpage (HTTP)
Presentation SSL/TLS, JPEG, MPEG Encrypting data (TLS)
Session NetBIOS, RPC Skype call setup
Transport TCP, UDP Reliable file transfer (TCP)
Network IP, ICMP, Routing Protocols IP addressing (192.168.1.1)
Data Link Ethernet, PPP, MAC Switch forwarding frames
Physical USB, Wi-Fi, Fiber Optic Ethernet cable transmission

2. The TCP/IP Model: A 4-Layer Practical Approach

The TCP/IP model is simpler and used in real networks (e.g., the internet). It combines OSI layers for efficiency:

TCP/IP Layer OSI Equivalent Key Functions
Application Layers 5, 6, 7 HTTP, DNS, FTP, SSH
Transport Layer 4 TCP (reliable), UDP (fast, unreliable)
Internet Layer 3 IP addressing, routing
Network Access Layers 1 & 2 Ethernet, Wi-Fi, MAC addresses

Why TCP/IP is Preferred Over OSI

✅ Simpler: Fewer layers = easier implementation. ✅ Industry Standard: Used by the internet, businesses, and all modern networks. ❌ Less Detailed: OSI is better for troubleshooting (e.g., "Is the issue at Layer 2 or 3?").


3. Comparing OSI and TCP/IP Models

Feature OSI Model TCP/IP Model
Number of Layers 7 (theoretical) 4 (practical)
Primary Use Education, troubleshooting Real-world networking (internet)
Encapsulation Data → PDU → Segment → Packet → Frame → Bits Segment → Packet → Frame → Bits
Protocols Theoretical (e.g., NetBIOS) Real-world (HTTP, TCP, IP)
Flexibility More detailed for analysis Optimized for speed and efficiency

4. Real-World Applications

In the Real World

  1. eSewa (Nepal):

    • Uses TCP/IP’s Application Layer (HTTP/HTTPS) for secure online payments.
    • Transport Layer (TCP) ensures your transaction data reaches the bank reliably.
    • Network Layer (IP) routes your request through NTC’s fiber-optic backbone.
  2. WhatsApp (Global):

    • Session Layer (OSI): Manages your chat connection.
    • Transport Layer (UDP): Sends messages quickly (even if some packets are lost).
    • Physical Layer: Uses mobile data (4G/5G) or Wi-Fi to transmit bits.
  3. Nepal Stock Exchange (NEPSE):

    • Presentation Layer: Encrypts stock trade data (SSL/TLS).
    • Data Link Layer: Switches in the exchange’s network forward frames using MAC addresses.

Worked Example: How a YouTube Video Loads

  1. Application Layer (HTTP): Your browser requests youtube.com.
  2. Transport Layer (TCP): Your device and YouTube’s server establish a 3-way handshake (SYN, SYN-ACK, ACK).
  3. Network Layer (IP): Your ISP routes packets via BGP (Border Gateway Protocol).
  4. Data Link Layer (Ethernet): Your router sends frames to the nearest switch.
  5. Physical Layer: Fiber optic cables transmit light pulses (bits) globally.
sequenceDiagram
    participant Browser as Your Browser
    participant ISP as ISP Router
    participant YouTube as YouTube Server
    Browser->>ISP: HTTP Request (DNS resolves youtube.com)
    ISP->>YouTube: IP Packet (Routed via BGP)
    YouTube->>ISP: TCP SYN (Handshake)
    ISP-->>Browser: TCP SYN-ACK
    Browser->>ISP: TCP ACK
    YouTube->>ISP: Video Data (UDP for streaming)
    ISP-->>Browser: Video Frames (Decapsulated)

5. Troubleshooting with OSI Layers

If your internet is slow, ask:

  • Layer 1 (Physical): Is the cable connected? Is the Wi-Fi signal weak?
  • Layer 2 (Data Link): Is the MAC address blocking traffic? (Check switch ports.)
  • Layer 3 (Network): Is the IP address correct? (Run ping 8.8.8.8.)
  • Layer 4 (Transport): Is TCP timing out? (Check firewall settings.)
  • Layer 7 (Application): Is the website down? (Try curl or another browser.)
Layer 7 (Application): Check app logs/errorsLayer 6 (Presentation): Verify encryption/compressionLayer 5 (Session): Test connection establishmentLayer 4 (Transport): Ping/traceroute (TCP/UDP ports)Layer 3 (Network): IP address conflicts/routingLayer 2 (Data Link): MAC address issues/switch errorsTroubleshooting Approach
Layer-by-layer troubleshooting flowchart

6. Case Study: How Daraz Delivers Your Order

Daraz’s supply chain network relies on TCP/IP and OSI principles:

  1. Physical Layer: Fiber-optic cables connect Daraz’s servers to NTC.
  2. Data Link Layer: Switches in Daraz’s data center forward your order to the warehouse.
  3. Network Layer: Routers use OSPF (Open Shortest Path First) to find the fastest path to the delivery partner (e.g., Pathao).
  4. Transport Layer: TCP ensures your order confirmation email reaches your inbox.
  5. Application Layer: The Daraz app uses REST APIs to update your order status.
Bits → Warehouse Server (Layer 1-2)Bits → Fiber Optic (Layer 1) → NTC BackboneFrame → Switch (Layer 2)IP Packet → Router (Layer 3, OSPF routing)TCP Segment → Load Balancer (Layer 4)HTTP Request → Daraz Server (Layer 7)Your Order on Daraz App (Layer 7)
Daraz order delivery process (OSI layers)

Exam Tip

  1. Memorize the OSI 7 layers in order (use a mnemonic like "All People Seem To Need Data Processing").
  2. Compare OSI vs. TCP/IP in a table (examiners love this!).
  3. Explain encapsulation/decapsulation with an example (e.g., email or YouTube).
  4. Know key protocols per layer (e.g., TCP/UDP at Transport, IP at Network).
  5. Apply to real scenarios:
    • "How does WhatsApp use TCP/IP?"
    • "Why does eSewa need SSL/TLS?"
  6. Troubleshooting questions are common—practice diagnosing layer-by-layer issues.

Key Formulas & Shortcuts

Concept Formula/Example
TCP 3-Way Handshake SYN → SYN-ACK → ACK
IP Address Classes Class A: 1-126, Class B: 128-191, Class C: 192-223
Port Numbers HTTP: 80, HTTPS: 443, FTP: 21
Subnet Mask 255.255.255.0 (for /24 subnet)

Common Mistakes to Avoid

❌ Confusing TCP (reliable) with UDP (fast, unreliable). ❌ Forgetting that OSI is theoretical while TCP/IP is practical. ❌ Mixing up MAC (Layer 2) and IP (Layer 3) addresses. ❌ Not explaining encapsulation step-by-step in exams.


Practice Questions (Self-Check)

  1. If a user cannot access a website, which layers could be faulty? (Hint: Think DNS, TCP, IP, or physical cable.)
  2. How does SSL/TLS fit into the OSI model?
  3. Compare Ethernet (Layer 2) and Wi-Fi (Layer 1 & 2) in a table.
  4. Explain how VoIP (e.g., Pathao calls) uses TCP/IP layers.

Further Reading

  • Books: Computer Networks by Andrew Tanenbaum, Data Communications and Networking by Behrouz Forouzan.
  • Websites: Cisco’s OSI Model Guide, TCP/IP Illustrated.
  • Tools: Wireshark (to see packets in real time), ping, traceroute.

Based on the TU BIM syllabus for Business Data Communication and Networking (IT240), unit 2.

Discussion

Loading…