INHow the Internet Works · Lesson 1 of 7

The Big Picture: Packets & Layers

The internet's founding trick: chop every message into small packets, let each one find its own way, reassemble at the far end. No phone-style dedicated lines — just billions of self-addressed envelopes.

There is no wire between you and a website. Your request is split into packets (~1,500 bytes each), each stamped with source and destination addresses. Routers — machines whose whole job is 'read the address, forward toward it' — pass each packet hop by hop. Packets may take different routes, arrive out of order, or vanish; the endpoints sort it out. This design survives failures beautifully: any router can die and packets route around it.

Text
The layers (each one only talks to its neighbors):

  Application   HTTP, DNS, SSH — what the data MEANS
  Transport     TCP/UDP — reliable delivery, ports
  Internet      IP — addressing & routing between networks
  Link          Ethernet, WiFi — the next physical hop

A packet is envelopes inside envelopes:
  [Ethernet [IP [TCP [HTTP "GET / ..."]]]]

Each hop unwraps the outer envelope, reads the IP
address, and re-wraps for the next physical link.
Bash
# Watch your packets cross the world:
traceroute example.com
#  1  192.168.1.1      1ms   your router
#  2  10.20.0.1        8ms   your ISP
#  5  core2.chi.net   25ms   a city backbone
#  9  93.184.216.34   85ms   the destination

# Each line = one router hop. Latency jumps reveal
# oceans: ~70ms extra = an Atlantic crossing.
# (Physics floor: light in fiber does ~200km per ms.)
◆ Note
Layering is why the internet evolves without coordination: WiFi replaced cables without changing IP; HTTP/3 replaced TCP with QUIC without changing web apps. Each layer only promises an interface to the one above — implementation swaps freely. It's the best API-design lesson in engineering history.