Computer Networks · Module 3 — Layered Models
Why layers exist
Getting a page from college.edu to Aisha's screen needs many different jobs done.
Sign in to track your score
Aisha's Wi-Fi is weak, so she plugs in a LAN cable instead. The page still loads. Her browser did not need reinstalling, or even restarting.
Why & what
Why we split the work. Getting a page from college.edu to Aisha's screen needs many different jobs done.
- Turn bits into a radio signal.
- Get data across the hostel to the router.
- Find a path across the internet.
- Make sure nothing was lost on the way.
- Understand what a web page actually is.
Now imagine one giant program doing all of that. Buy a new Wi-Fi card, and you would have to rewrite the browser. Every app would need its own copy of the routing code.
So the work is split into layers, and each layer is given one job.
What a layer is. A layer is one job in the chain, plus a fixed way of handing work to the layer below.
A model is the agreed list of layers and who does what. Two models matter: OSI (7 layers) and TCP/IP (4 layers). Both are coming up.
How it works
Four rules make the whole idea work.
- Each layer does one job and does not care how the others do theirs.
- Each layer talks only to the layer directly above and directly below it. Never sideways, never skipping.
- Each layer trusts the layer below to deliver, and hands its work down.
- You can replace the inside of a layer freely, as long as the handover stays the same. Wi-Fi becomes cable, and nothing above notices.
Sending goes down the stack. Receiving goes up it.

Common confusion
Students think each layer is a separate piece of hardware. Actually, layers are a way of dividing the job, not a list of devices.
Aisha's single laptop performs the top five layers by itself the browser, the encryption library, the operating system's TCP and IP code, and the Wi-Fi driver. One device, many layers. Meanwhile a simple switch only ever deals with the bottom two.
Interview angle
Asked as: "Why do we use a layered architecture in networking?"
Model answer:
Because it splits one very large problem into independent jobs. Each layer does one thing and only talks to the layer above and below it through a fixed interface. That gives three benefits. You can change one layer without touching the others switching from Wi-Fi to Ethernet does not affect the browser. Different vendors can build different layers and still work together. And problems are easier to isolate, because you can test one layer at a time.
- 1.
A layer is allowed to talk to
- 2.
Aisha switches from Wi-Fi to a cable. What must be rewritten?
- 3.
Layers are best described as
- 4.
When Aisha sends data, it moves through the stack