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:
- OSI (Open Systems Interconnection): A theoretical 7-layer model (ISO standard) for teaching and troubleshooting.
- 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).
How Data Flows Through OSI Layers
When you send an email:
- Application Layer (7): Your email client (e.g., Gmail) prepares the message.
- Presentation Layer (6): Encrypts/compresses the data.
- Session Layer (5): Establishes a connection with the server.
- Transport Layer (4): TCP breaks the email into segments and ensures delivery.
- Network Layer (3): IP adds a source/destination IP address and routes it.
- Data Link Layer (2): MAC address is added; data becomes a frame.
- Physical Layer (1): The frame is converted to bits (0s and 1s) and sent via cables/wireless.
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
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.
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.
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
- Application Layer (HTTP): Your browser requests
youtube.com. - Transport Layer (TCP): Your device and YouTube’s server establish a 3-way handshake (SYN, SYN-ACK, ACK).
- Network Layer (IP): Your ISP routes packets via BGP (Border Gateway Protocol).
- Data Link Layer (Ethernet): Your router sends frames to the nearest switch.
- 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
curlor another browser.)
6. Case Study: How Daraz Delivers Your Order
Daraz’s supply chain network relies on TCP/IP and OSI principles:
- Physical Layer: Fiber-optic cables connect Daraz’s servers to NTC.
- Data Link Layer: Switches in Daraz’s data center forward your order to the warehouse.
- Network Layer: Routers use OSPF (Open Shortest Path First) to find the fastest path to the delivery partner (e.g., Pathao).
- Transport Layer: TCP ensures your order confirmation email reaches your inbox.
- Application Layer: The Daraz app uses REST APIs to update your order status.
Exam Tip
- Memorize the OSI 7 layers in order (use a mnemonic like "All People Seem To Need Data Processing").
- Compare OSI vs. TCP/IP in a table (examiners love this!).
- Explain encapsulation/decapsulation with an example (e.g., email or YouTube).
- Know key protocols per layer (e.g., TCP/UDP at Transport, IP at Network).
- Apply to real scenarios:
- "How does WhatsApp use TCP/IP?"
- "Why does eSewa need SSL/TLS?"
- 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)
- If a user cannot access a website, which layers could be faulty? (Hint: Think DNS, TCP, IP, or physical cable.)
- How does SSL/TLS fit into the OSI model?
- Compare Ethernet (Layer 2) and Wi-Fi (Layer 1 & 2) in a table.
- 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…