Network+ (N10-009) · ELI Explains Networking Layers (book)

How the Layers Work Together

5 min read
Want it in plain words first? Jump to Eli explains — the same idea, no jargon.
On this page 3 sections
  1. The college version
  2. Eli explains
  3. Study tools

The college version

One Trip, Seven Jobs

You have now met all seven layers separately. This chapter follows a single ordinary action — opening a website — all the way down one machine, across the network, and back up another.

Two words first, because the whole process rests on them.

Encapsulation is what happens on the way down. Each layer takes whatever it received from the layer above, treats it as cargo without inspecting it, and adds its own small piece of information to the front. That addition is a header, and it holds exactly what that layer needs to do its own job: addresses, numbers, or codes. Layer by layer, the original data ends up wrapped in several coverings, one per job.

Decapsulation is the same thing in reverse at the far end. Each layer reads the covering meant for it, uses the information inside, removes it, and passes the rest upward. By the time the data reaches the top, every wrapper has been opened by the layer that put it there, and what remains is the original message.

Going Down: Sending the Request

You type a web address and press Enter.

   Layer 7   Application    Browser builds an HTTPS request for the page
      ↓
   Layer 6   Presentation   Request is encoded and encrypted
      ↓
   Layer 5   Session        The ongoing conversation is set up and tracked
      ↓
   Layer 4   Transport      TCP adds port numbers; data becomes segments
      ↓
   Layer 3   Network        IP adds source and destination addresses; packets
      ↓
   Layer 2   Data Link      MAC addresses added for the next local hop; frames
      ↓
   Layer 1   Physical       Bits leave as electricity, light, or radio waves

Read that as seven small decisions rather than one big event.

Layer 7 produces the actual request: fetch this page from this site. Layer 6 puts it into a form the server will understand and encrypts it, so nothing readable travels across the internet. Layer 5 handles the fact that this is one visit rather than an isolated shout. Layer 4 decides the delivery is one that must be complete and in order, so it uses TCP, and stamps the destination port so the server knows the request is for its web service. Layer 3 attaches your IP address and the server's, which is what lets routers move it across networks. Layer 2 attaches the MAC address of the very next device on your local network — your router — because that is as far as local delivery reaches. Layer 1 turns the finished result into signals and pushes them out.

Coming Back Up: Receiving the Request

At the server, the same steps happen in reverse.

   Layer 1   Physical       Signals arrive and become bits
      ↓
   Layer 2   Data Link      Frame checked, MAC header removed
      ↓
   Layer 3   Network        IP header read and removed; this is the right host
      ↓
   Layer 4   Transport      Port number read; data reassembled in order
      ↓
   Layer 5   Session        Request recognized as part of a conversation
      ↓
   Layer 6   Presentation   Data decrypted and decoded
      ↓
   Layer 7   Application    Web service receives the request and answers it

The server then sends its response, which travels down its own seven layers, across the network, and back up yours. Your browser draws the page. All of this usually finishes in well under a second.

Where Each Address Is Used

One detail deserves special attention because it confuses nearly every beginner.

The IP addresses stay the same for the whole journey — yours and the server's, from end to end. The MAC addresses do not. They change at every hop. Your device addresses its frame to your router; your router builds a new frame addressed to the next device; and so on, all the way across. Layer 3 knows the destination. Layer 2 only ever knows the next step.

A Note on the Words

You have seen data called bits, frames, packets, segments, and datagrams, each belonging to a particular layer. Those distinctions are real and worth knowing.

You should also know that working engineers use the words loosely. People say "packet" for almost anything traveling on a network, and no one is confused by it. Different textbooks and vendors draw the lines in slightly different places too. Learn the precise meanings so that you understand the formal ones — and don't be thrown when a colleague speaks casually.

Remember This

Encapsulation adds a wrapper at each layer on the way down; decapsulation removes it at the matching layer on the way up.

Eli, the EliExplains learning guide

Eli explains

The same idea, in plain words

Explain it like I’m 10

Imagine mailing a letter, but with several envelopes.

You write the letter. That is your message. You put it in an envelope and write which room it should go to. You put that envelope inside a bigger one and write the street address. You put that one inside a delivery bag and write which truck it goes on next.

Every envelope has one job, and each is added by a different person who writes down only what they need to know. Nobody opens the letter along the way.

That is what your computer does when you open a website. Your message gets wrapped several times. One wrapper says which program it is for. One says which computer, anywhere in the world. One says which device to hand it to right here in your house. Adding those wrappers is encapsulation.

At the other end it happens backwards. The delivery person removes the bag. The front desk opens the outer envelope and sees the room number. The room opens the inner one. Finally, someone reads the letter. Taking the wrappers off is decapsulation.

Why do it this way? Because each wrapper can be handled by someone who needs to understand nothing else. The truck driver does not read your letter.

Here is a real example. Opening one webpage does this whole trip — down through seven wrappers, across the world, and back up — faster than you can blink.

The arrows in the diagrams picture the order of the jobs. There is no staircase inside your computer.

Keep learning

Ready to build on this? Continue to the next lesson.

Practice Network+ (N10-009)

This lesson has no separate scored set. Practice draws from the subject’s question bank.

Study tools & related lessonsRelated

Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.