Computer Networks
Lesson 2 of 3 9 min +55 XP

The Layered Stack

TCP/IP and DNS.

What you'll learn

  • Explain why networking is layered
  • Describe what TCP and IP each do
  • Explain how DNS resolves a name
The postal system's layers

You write a letter, the post office sorts it, trucks carry it, planes fly it — each layer does its job without worrying about the others. The internet's TCP/IP stack is layered the same way, and DNS is the address book turning names into numbers.

Divide the job into layers

Networking is built as a stack of layers, each handling one job and trusting the layer below. IP handles addressing and routing — getting packets to the right machine. TCP sits on top and handles reliability — numbering packets, requesting resends for any that get lost, and putting them back in order. Applications like web browsers sit above TCP and never worry about lost packets.

DNS: the internet's phone book

You type example.com, but routers need a numeric IP address. The Domain Name System (DNS) translates the human-friendly name into the number, quietly, before your request even leaves. It is a giant, distributed lookup table.

Layering is why the internet can evolve: you can swap Wi-Fi for fiber at the bottom, or invent a new app at the top, without rewriting the middle. Each layer only promises a clean service to the one above.

Lab · Trace a page load
  1. Write the steps when you visit a site: (1) DNS turns the name into an IP address.
  2. (2) TCP opens a reliable connection to that address; (3) your request and the reply travel as IP packets.
  3. (4) TCP reorders packets and asks for any that were lost; (5) the browser renders the page.
  4. For each step, name which layer is responsible.

What you should see: You mapped a single click onto the layered stack and saw how DNS, TCP, and IP cooperate without stepping on each other.

Knowledge Check

+15 XP / correct

1. TCP's main job (on top of IP) is to…

2. DNS is best described as the system that…