Toasty Answers

Networking, explained.

Guides, tools, and a place to ask, for people who want to know why it works — not just that it does.

  • 28,000+subscribers
  • 133videos
Skip to the packet journey

Most tutorials show you which button to press. These show you why the button exists, so when it breaks at two in the morning, you already know where to look.

The journey of one packet

Six stops. Every one changes something.

Scroll to send one request from a laptop to a server, and watch what each device actually does to it.

  1. 01Layer 2 · Data link

    Your laptop

    The request is wrapped layer by layer until it becomes a frame. Here is what most people miss: the frame is addressed to your router's MAC, not the server's. The server is miles away. Your laptop only ever talks to the next hop.

    Src MAC
    a4:83:e7:1c:42:09
    Dst MAC
    b8:27:eb:5f:01:aa
    Src IP
    192.168.1.42
    Dst IP
    198.51.100.20
    TTL
    64

    Changed: Frame built, addressed to the gateway

    Start with the fundamentals
  2. 02Layer 2 · Switching

    The switch

    A switch reads exactly one field, the destination MAC, finds it in its table, and sends the frame out the right port. It changes nothing. That is the whole job, and it is why VLANs and trunks matter so much: they decide which table the switch is allowed to look in.

    Src MAC
    a4:83:e7:1c:42:09
    Dst MAC
    b8:27:eb:5f:01:aa
    Src IP
    192.168.1.42
    Dst IP
    198.51.100.20
    TTL
    64

    Changed: Nothing. A switch only reads.

    UniFi switching guides
  3. 03Layer 3 · Routing

    The router

    The router strips the frame, checks the destination IP against its routing table, and knocks one off the TTL. Then it builds a brand-new frame for the next hop. MAC addresses change at every router. IP addresses do not.

    Src MAC
    b8:27:eb:5f:01:ab
    Dst MAC
    00:1b:21:3a:7c:10
    Src IP
    192.168.1.42
    Dst IP
    198.51.100.20
    TTL
    63

    Changed: TTL −1 · new source and destination MAC

    EdgeRouter guides
  4. 04Layer 3–4 · Firewall

    The firewall

    Rules are checked, a connection-tracking entry is written so the reply will be let back in, and NAT swaps your private source address for your public one. 192.168.1.42 cannot be routed on the internet, so it never leaves your house.

    Src MAC
    00:1b:21:3a:7c:11
    Dst MAC
    3c:fd:fe:9a:00:01
    Src IP
    203.0.113.7
    Dst IP
    198.51.100.20
    TTL
    62

    Changed: NAT · source IP rewritten · TTL −1

    Firewall guides
  5. 05Layer 3 · The internet

    Eleven routers you never see

    Your ISP and its upstreams pass it along, each one decrementing TTL and rewriting the MACs again. If TTL ever reached zero the packet would be dropped, and that is exactly how traceroute discovers every hop on the way.

    Src MAC
    rewritten ×11
    Dst MAC
    rewritten ×11
    Src IP
    203.0.113.7
    Dst IP
    198.51.100.20
    TTL
    51

    Changed: TTL 62 → 51 across eleven hops

    Browse every guide
  6. 06Layer 7 · Destination

    The server

    It arrives. The server sees 203.0.113.7 and has no idea 192.168.1.42 exists. That one fact explains port forwarding, why a game server at home needs it, and why your homelab is invisible from outside until you decide otherwise.

    Src MAC
    d0:50:99:11:22:33
    Dst MAC
    52:54:00:ab:cd:ef
    Src IP
    203.0.113.7
    Dst IP
    198.51.100.20
    TTL
    51

    Changed: Delivered

    Homelab and game servers
LAPTOP SWITCH ROUTER FIREWALL INTERNET SERVER

Addresses come from the RFC 5737 documentation ranges, so nothing here points at a real machine.

Built in

Subnetting, solved.

Any notation: plain, CIDR, or with a mask. Change the prefix and watch the bits move.

Subnet Calculator IPv4 · runs in your browser, nothing is sent anywhere

192.168.1.10 · 192.168.1.10/24 · 10.0.0.1 255.255.255.0


Latest guides

Toasty Answers

Learn it.

Guides, tools, and a forum. Take your time.

Browse the guides

Toasty Systems

Solve it.

Repairs, IT consulting, security work, and VHS transfers, for when you would rather hand it over.

Visit Toasty Systems