Ravindra BagaleCourses & study guides मराठी Track your progress

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. In other words, OSI is for talking, TCP/IP is for real running. Got it? 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 by courier: packing the item (application data), the flat number (port), the full address with pin code (IP), the route of the local delivery van (MAC/data link), and the road itself is the physical layer. But in exams and interviews always explain the real mechanism – a header is added at each layer (encapsulation) and removed at the receiver (decapsulation).

Ravindra Bagale's Tip

Many students put the Security Group at Layer 3. Look at the table above: a Security Group filters on protocol + port + IP, so we have placed it at L4; NACLs, route tables and subnets are at L3. ALB is L7, NLB is L4 – this is definitely asked in interviews.

Practice task

Kagdavar OSI vs TCP/IP cha diagram kadha aani pratyek TCP/IP layer samor Mauli Dairy chya website madhla ek udaharan liha – udaharan mhanje Application: HTTP aani DNS, Transport: TCP 443, Internet: EC2 cha public IP, Network Access: AWS che hardware aani ENI.

Got it? OSI is the dictionary, TCP/IP is the real internet. Now let's move on to my favourite interview question – what exactly happens when you open a website?

Quick revision cards

Revise this lesson in two minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens its lesson.

Comparison card: OSI model vs TCP/IP model. OSI model: A teaching model that splits networking into steps. TCP/IP model: The model the real internet runs on.
Comparison: OSI model vs TCP/IP model · Download PNG

More cards: Ravi Sir's Cards.