Chapter 2: The OSI Model and TCP/IP Model
2.3 The TCP/IP model and comparison
OSI is the language we speak; TCP/IP is what actually runs the internet. Samjla ka? Let's compare them.
The TCP/IP (Internet) model is the practical model on which the internet runs. It has 4 layers (some books show 5 by splitting the bottom layer).
OSI Model TCP/IP Model
+---------------------+ +----------------------+
| 7 Application | | |
| 6 Presentation | ---> | Application | HTTP, DNS, SSH, TLS
| 5 Session | | |
+---------------------+ +----------------------+
| 4 Transport | ---> | Transport | TCP, UDP
+---------------------+ +----------------------+
| 3 Network | ---> | Internet | IP, ICMP, ARP
+---------------------+ +----------------------+
| 2 Data Link | ---> | Network Access | Ethernet, Wi-Fi
| 1 Physical | | (Link) |
+---------------------+ +----------------------+
| Point | OSI model | TCP/IP model |
|---|---|---|
| Layers | 7 | 4 (or 5) |
| Developed by | ISO (reference/theoretical) | US DoD / DARPA (practical) |
| Approach | Model first, protocols later | Protocols first, model later |
| Session & presentation | Separate layers | Merged into Application |
| Usage | Teaching, troubleshooting vocabulary | Actual internet implementation |
| Transport layer | Connection-oriented and connectionless | TCP (connection) and UDP (connectionless) |
Where AWS services sit
| Layer | AWS example |
|---|---|
| L7 | Application Load Balancer (routes by URL/host), CloudFront, AWS WAF, Route 53 (DNS) |
| L4 | Network Load Balancer, Security Groups (filter by protocol + port + IP) |
| L3 | VPC, subnets, route tables, Internet/NAT gateways, Network ACLs |
| L1–L2 | Managed by AWS (physical data centres, Nitro hardware, ENIs) |
Ravindra Bagale's Tip
Think of the OSI model like sending a parcel through a courier: you pack the item (application data), write the flat number (port), write the full address with pin code (IP), the local delivery van uses the street route (MAC/data link), and the road itself is the physical layer. But in the exam and the interview, always explain the real mechanism — headers added at each layer (encapsulation) and removed at the receiver (decapsulation).