learninfra · Linux · Networking · Kubernetes · System Design · AI Infrastructure · Exam blueprints · Drills

IPv6

128 bits, written in hex, with room for every device: link-local addresses that need no server, global addresses that need no NAT, and how the two families share one network.

An interactive Networking lesson: 22 steps, about 32 minutes, on a live simulation in your browser.

An office LAN: pc1, pc2 and pc3 on one switch. pc1 pings pc2 at 192.168.1.11. First an ARP broadcast asking who owns that address, then the echo itself. Nothing here needs the rest of the lesson's machinery.

The trouble is outside this room. IPv4 has 32 bits, about 4.3 billion addresses, and the world has more devices than that. The internet kept working by sharing: whole offices hide behind one public address. That sharing has a price, and you are about to watch pc1 pay it.

What you will learn

  1. Why a new address family

    • Two machines, one wire
    • The trick holding v4 together: NAT rewrites a private source address into a public one and remembers the flow. The server outside sees the gateway, never the real client.
    • What does the server log?: Behind NAT, every client of one office looks like one address. Logs, rate limits and abuse blocks all see the gateway.
  2. 128 bits

    • 128 bits, written in hex: An IPv6 address is 128 bits written as eight hex groups. The size is the point: no sharing, no translation, no scarcity.
    • How many addresses in a /64?: A single IPv6 /64 subnet is incomparably larger than all of IPv4. Address planning stops being about conservation.
    • The sizes you will actually meet
  3. Writing it down

    • Drop the leading zeros: Shortening rule one: leading zeros go. Each group keeps at least one digit, and the address keeps all eight groups.
    • Where does :: go?: :: replaces one run of zero groups, the longest one. It may appear exactly once, or the length becomes ambiguous.
    • The :: rules, exactly
  4. Link-local: no server needed

    • Every interface already has one: fe80::/10 is always there: every v6 interface has a link-local address before any server has spoken.
    • The lookup that goes nowhere: A v4 host without DNS is stuck. A v6 host still has its link-local address, which needs no server to exist.
    • Drill: show only the v6 lines
  5. Global addresses, no NAT

    • Global unicast: 2000::/3: 2000::/3 is the routable internet: globally unique addresses, so two hosts anywhere can address each other directly.
    • SLAAC vs DHCPv6: SLAAC: the router announces the prefix and every host addresses itself. DHCPv6: the network assigns addresses when it wants control.
    • Break it: the gateway vanishes
    • Why NAT goes away: NAT was compensation for scarcity. With enough addresses for every device, translation has nothing left to do.
  6. Living with both families

    • What breaks in the legacy corner?: Dual-stack adds and never removes: v4 keeps working while v6 grows. Single-stack v6 is the one that cannot reach v4-only.
    • Break it: the old device fails
    • AAAA records and Happy Eyeballs: Dual-stack DNS means A plus AAAA. Happy Eyeballs prefers v6 but falls back to v4 in milliseconds, not seconds.
    • Drill: ask for the v6 record
  7. Recap & playground

    • Cheat sheet
    • Playground