seegongsik
Networks

What are the layers of a network

Suppose you are mailing a letter. You write on the paper, put the paper in an envelope, write the address on the envelope, and drop it into the mail bin. No one person does everything at once; the job is split into steps. A network splits its work into layers in the same way.

01

Why Split into Layers?

As we saw, my message is passed along through many stops. But even a single delivery involves a lot of work.
The content has to be packed, care has to be taken that nothing goes missing or arrives out of order, an address has to be attached to say where it goes, and the whole thing has to be turned into an actual signal.
Trying to handle all of that as one lump makes it so complicated that things easily get tangled.

one lump
contentcorrectnessaddresssignal
split into layers
content
correctness
address
signal
Tap the lump on the left
Tap the right to spread the layers

Tap the lump on the left and the jobs tangle together; tap the right side and content, correctness, address, and signal separate into clear layers.

Work bundled into one lump is scary to touch, because fixing one thing shakes something unrelated.
Once it is split into layers, each layer takes care of its own job only. The layer that attaches the address does not need to know what the content is, and the layer that turns it into a signal does not need to know the address.
So fixing one layer leaves the others intact. That is the first reason for splitting into layers.

02

Wrapping Layer upon Layer

When sending, the message is wrapped layer upon layer. First the content is written on the paper, and the paper goes into an inner envelope. The inner envelope goes into an outer envelope, and the address is written on the outer one.
Finally it all goes into the mail bin, which stands for the actual signal made of 0s and 1s.
The content inside stays as it is while a new layer is added on the outside each time. This wrapping is called encapsulation.

paper (content)
Wrote the content on the paper

Each press of the button adds one more layer. Once it is wrapped in order, paper → inner envelope → outer envelope → mail bin, encapsulation is complete.

Once everything is wrapped, only the mail bin is visible from outside. The outer signal does not need to know what content is inside; it simply carries 0s and 1s.
In the same way, the paper does not care what the address is. Each layer looks after its own part only.

03

Each Layer Does Only Its Own Job

The four layers each have a different job. The paper handles what to say: the content. The inner envelope handles whether everything arrived, with nothing missing and in order: correctness.
The outer envelope handles where to send it: the address. The mail bin handles putting 0s and 1s onto real wires and radio waves: the signal.
On the real internet these four layers are usually called the application, transport, internet, and link layers.

paper
inner envelope
outer envelope
mail bin
Tap each layer. Only that layer’s job lights up

Tap the layers one by one and only the job that layer handles lights up. Content, correctness, address, signal: four jobs, one on each of the four layers.

The interesting part is that one layer does not need to know what goes on inside the next. The address layer does not need to know whether the content is a greeting or a photo, and the signal layer does not care what address is written above it.
As long as each keeps to its own slot, the whole thing runs smoothly. So how does the receiving side undo these layers?

04

On Arrival, Peel in Reverse

At the receiving end, everything is undone in the reverse of the order it was wrapped. First it comes out of the mail bin, and the 0s and 1s are gathered back into a bundle of envelopes.
Next the outer envelope is removed; the address has done its job, so it comes off. Then the inner envelope is removed, with a check that everything arrived with nothing missing.
Finally the paper is unfolded, and the sender's message appears exactly as it was.

mail bin (signal)
outer envelope (address)
inner envelope (correctness)
paper (content)
It arrived. Peel from the mail bin first

Each press of the button peels one layer, starting from the outside. Peel in the order mail bin → outer envelope → inner envelope → paper, and the message arrives.

With every layer peeled away, the message written at the start is still exactly as it was, because the receiving side undid the sender's wrapping in precisely the reverse order.
So the content inside is never touched on the way. Matching layers follow the same agreement, which is called a protocol, and thanks to these agreements, machines made by different companies can still understand each other.

05

Summing Up

In one line: a network does not do everything at once; it splits the work into layers, and each layer does only its own job.
When sending, the message is wrapped layer upon layer from the paper out to the mail bin: that is encapsulation. When receiving, the layers are peeled off one at a time from the outside until the message is reached.
Because each layer keeps the same agreement, even complicated work runs simply and reliably.

1. split into layers
2. wrap when sending = encapsulation
3. each layer does its own job
4. peel in reverse when receiving
Press the button to review the key points in order

Each press of the button reveals one more key point. (split into layers → wrap when sending (encapsulation) → each layer does its own job → peel in reverse when receiving) Once all four have appeared, the review is done.

Now you know how a message is wrapped and unwrapped in layers. The layer in charge of the outer envelope's address is where the number address we saw earlier is used.
So when a stop receives that outer envelope, how does it choose the next stop at a fork? The next lesson is about choosing the path: routing.

In one lineA network does not do everything at once; it splits the work into layers, and each layer does only its own job. When sending, the message is wrapped layer upon layer: the paper (content) goes into the inner envelope (did it all arrive correctly), the inner envelope into the outer envelope (the address it goes to), and finally into the mail bin (the actual signal of 0s and 1s). This is called encapsulation. The receiving side peels the layers off in reverse, from the outside in, until it reaches the message. Split into layers, each one only has to do its own job well without knowing about the layers above or below, which makes the whole thing simple and reliable.
← Networks
Was this helpful? Support seegongsik