Command Palette

Search for a command to run...

Hectal
PHASE 1Beginner ~7 min· topic 4 of 4

Topic 1.4

IPv6 Essentials

In one line

IPv6 uses 128-bit addresses written in hex, removes the need for NAT, and is increasingly required in cloud and mobile networks — you should be able to read and reason about it.

0/4 · 0%

Key ideas

  1. 01

    IPv6 addresses are 128 bits, written as eight groups of four hex digits: 2001:0db8:0000:0000:0000:ff00:0042:8329. Shorten by dropping leading zeros in each group and replacing ONE run of all-zero groups with ::: 2001:db8::ff00:42:8329.

  2. 02

    The address space is effectively unlimited (3.4 × 10^38), so every device can have a globally routable address and NAT isn't needed. Security comes from firewalls, not from being hidden behind NAT.

  3. 03

    Common prefixes: a typical site gets a /48 or /56, and each subnet is a /64 (by convention, 64 bits of host space). ::1 is loopback; fe80::/10 is link-local (every interface has one); fc00::/7 (usually fd00::/8) is unique local (the IPv6 'private' range); 2000::/3 is global unicast.

  4. 04

    No broadcast in IPv6: it uses MULTICAST and NEIGHBOR DISCOVERY (NDP, replacing ARP). Addresses can be auto-configured (SLAAC) or assigned by DHCPv6.

  5. 05

    Practical DevOps notes: dual-stack means both IPv4 and IPv6 at once. AWS supports IPv6 VPCs, and charges for public IPv4 addresses since 2024, which pushes adoption. Kubernetes supports dual-stack pods and services. Remember to allow IPv6 in security groups and firewall rules (::/0 is IPv6 'everything').

Code & diagrams

ipv6.shbash
ip -6 addr show            # your IPv6 addresses (look for fe80:: link-local and global ones)
ping -6 -c 3 google.com    # IPv6 connectivity
curl -6 https://ifconfig.co # your public IPv6 address
python3 -c 'import ipaddress; print(ipaddress.ip_address("2001:0db8:0000:0000:0000:ff00:0042:8329").compressed)'

Explain it without notes

01

Why doesn't IPv6 need NAT, and what replaces the 'protection' people assumed NAT provided?

Practice

01

Compress 2001:0db8:0000:0000:0001:0000:0000:0001.

Trade-offs

  • ↔

    IPv6 removes address scarcity and NAT complexity, but dual-stack operations double some work (two sets of firewall rules, two address families to monitor), and some older tools and libraries still handle it poorly.

Done when you can

  • I can read and compress IPv6 addresses.

  • I know the IPv6 loopback, link-local, unique-local, and global ranges.

  • I remember to allow ::/0 where IPv6 applies.