We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Cloud Infrastructure
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Cloud Infrastructure
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
Right now, as you read this page, at least four different layers of software are working together to deliver these words to your screen. Your browser speaks HTTP. HTTP rides on . TCP rides on IP. IP rides on your Wi-Fi or Ethernet hardware. Each layer does one job, trusts the layer below it to do its job, and has no idea what the layers above it are doing.
This is the TCP/IP stack, the actual protocol architecture the internet runs on. Not a theoretical model. Not an abstraction exercise. The real, deployed, running-right-now blueprint for how data moves across the planet.
Every API call you make, every database query you run, every time you ssh into a production server, it all goes through these four layers. If you understand them, you can diagnose network problems that stump most developers. If you don't, every networking issue looks like "the internet is broken."
The /IP model has four layers. Each one has a specific responsibility, and they stack on top of each other, hence the name.
| Layer | Name | What It Does | Protocols | Real-World Analogy |
|---|---|---|---|---|
| 4 | Application | Formats data for the application | HTTP, , SMTP, SSH, FTP | Writing a letter in English |
| 3 | Transport | Ensures reliable (or fast) delivery | TCP, UDP | Choosing registered mail vs postcard |
| 2 | Internet | Routes packets across networks | IP, ICMP, ARP | The postal routing system |
| 1 | Network Access | Moves bits over physical media | Ethernet, Wi-Fi, Fiber | The mail truck driving on roads |
How they work together, sending a request:
You type google.com in your browser. The Application layer creates an GET request. The Transport layer wraps it in a TCP segment with port numbers and sequence numbers. The Internet layer wraps that in an IP packet with source and destination addresses. The Network Access layer wraps that in an Ethernet frame and shoves it onto the wire as electrical signals.
Receiving is the reverse: The destination machine peels off each layer. Ethernet frame, IP packet, TCP segment, until the Application layer gets the original HTTP request.
This wrapping process is called encapsulation. Each layer adds its own header (and sometimes a trailer) around the data from the layer above. The receiving side does de-encapsulation, stripping headers one layer at a time.