Chapter 10 · Hands-on labs
Six short labs that turn the slides into commands you actually run — find your own IPv6 addresses, compress them by the rules, ping over IPv6, meet multicast (the broadcast replacement), and watch Neighbor Discovery stand in for ARP. Each maps to a Chapter 10 topic.
iproute2 (ip), iputils-ping, ndisc6, ipv6calc, tcpdump. Install missing ones: sudo apt install -y ndisc6 ipv6calc tcpdump. Most machines have IPv6 on the loopback and a link-local address even without an IPv6 internet connection. The ❯ is just the prompt.List your IPv6 addresses:
ip -6 addr
lo inet6 ::1/128 scope host eth0 inet6 2001:db8:acad:1:20d:56ff:fe77:52a3/64 scope global eth0 inet6 fe80::20d:56ff:fe77:52a3/64 scope link
Read the scope: link = your link-local (fe80::, every interface has one); global = a routable GUA (2xxx::). ::1 is the IPv6 loopback.
Just the link-local of each interface:
ip -6 addr show scope link
Expand a compressed address to all 32 digits:
ipv6calc --in ipv6addr --out ipv6addr --printfull 2001:db8::1
2001:0db8:0000:0000:0000:0000:0000:0001
Compress it back to shortest form:
ipv6calc --in ipv6addr --out ipv6addr --printcompressed 2001:0db8:0000:0000:0000:0000:0000:0001
2001:db8::1
:: (once).2001::db8::1 illegal? Compress fe80:0:0:0:0:0:0:1 by hand, then check it. (answer below)Ping the IPv6 loopback:
ping -6 -c 3 ::1
Ping a link-local address — it needs the interface (zone) after a %:
ping -6 -c 3 fe80::1%eth0
fe80:: is the SAME range on every link, so the OS must be told WHICH interface to send out.
Ping a global v6 host (if your network has IPv6 Internet):
ping -6 -c 3 ipv6.google.com
%interface zone index tells the kernel which link to use. GUAs need no zone.::1 need no % but fe80::… does? (answer below)Ping the all-nodes multicast — every IPv6 host on the link answers:
ping -6 -c 3 ff02::1%eth0
64 bytes from fe80::1%eth0: icmp_seq=1 ... 64 bytes from fe80::a11:22ff:fe33:4455%eth0 (DUP!) ...
That single packet reached many destinations — one-to-many multicast doing the job IPv4 needed a broadcast for.
Find routers on the link with router discovery:
rdisc6 eth0
ff02::1 is the all-nodes multicast group from the slide — IPv6’s efficient replacement for broadcast. Every node joins it, so one ping finds them all.Your on-link IPv6 prefixes (the network side):
ip -6 route show
2001:db8:acad:1::/64 dev eth0 proto kernel ... fe80::/64 dev eth0 proto kernel ...
Split an address at /64 — first 64 bits = network, last 64 = interface ID:
ipv6calc --showinfo 2001:db8:acad:1:20d:56ff:fe77:52a3 2>/dev/null | grep -iE "prefix|interface|EUI"
An interface ID containing ff:fe in the middle was built from the MAC via EUI-64 — a form of SLAAC auto-configuration.
Capture IPv6 & ICMPv6 in Terminal A:
sudo tcpdump -i any -n -vv ip6
Trigger neighbor discovery in Terminal B (ping a link neighbour), then read the capture:
ping -6 -c 2 ff02::1%eth0 ip -6 neigh
IP6 (hlim 255, next-header ICMPv6) fe80::... > ff02::1:
ICMP6, neighbor solicitation, who has 2001:db8::1
IP6 fe80::a1... > fe80::...: ICMP6, neighbor advertisement, tgt is 2001:db8::1Read the header live: hlim = the Hop Limit field, next-header = the Next Header field pointing to ICMPv6. And Neighbor Solicitation / Advertisement is ICMPv6 doing exactly what ARP did in IPv4.
Lab 1. The global (GUA, 2xxx::) address is Internet-reachable; the link-local (fe80::) is confined to your link and can’t be routed.
Lab 2. 2001::db8::1 is illegal because :: may appear only once — two of them make the number of zero-groups ambiguous. fe80:0:0:0:0:0:0:1 → fe80::1.
Lab 3. ::1 is unique (loopback, one interface), so no zone is needed. fe80:: repeats on every link, so the %interface zone index says which link to use.
Lab 4. Multicast means only interested/joined hosts process the packet, and switches can limit where it floods — far less wasted work than a broadcast every host must inspect.
Lab 5. SLAAC builds a 64-bit interface ID, so it needs a 64-bit host portion → a /64 network. A /100 leaves only 28 host bits, so SLAAC (and easy subnetting) break.
Lab 6. ICMPv6 Neighbor Discovery — specifically Neighbor Solicitation and Neighbor Advertisement messages — replaces ARP.
| This lab’s tool | Connects to… |
|---|---|
| ip -6 addr / route (Labs 1, 5) | Chapter 6 — subnetting, now with a 128-bit address |
| AAAA / DNS names (Lab 3) | Chapter 7 — DNS AAAA records for IPv6 |
| ICMPv6 Neighbor Discovery (Lab 6) | Chapter 3 — ARP, and Chapter 5 — ICMP |
| multicast ff02::1 (Lab 4) | Address types — one-to-many delivery |