Configuring IPv6 on operating systems
Configure static, SLAAC and DHCPv6 addressing on Linux (iproute2, systemd-networkd, Netplan, NetworkManager), Windows and macOS. Control RA acceptance, address generation and privacy settings on each platform. Verify a host against the main RFC 8504 node requirements. Write a host IPv6 runbook for an ictNetworks VPS.
Take the quiz · pass mark 70% · 9 questions
Explanation
Earlier lessons explained what hosts should do. This one is practical: where the settings live on each operating system, how to make them persistent, and how to check the result. Commands and option names change between releases, so each section names the tool and you should confirm against your version's documentation (man systemd.network, nmcli --help, Get-Help, man networksetup).
What every host must support (RFC 8504)
RFC 8504, the IPv6 node requirements, is a useful checklist when you evaluate an operating system, an appliance or an IoT device:
| Requirement | Level |
|---|---|
| Neighbor Discovery, Router and Prefix Discovery, DAD, SLAAC | MUST |
| ICMPv6, the addressing architecture, default address selection | MUST |
| MLDv2, for nodes that join multicast groups | MUST |
| Router preferences and Route Information (RFC 4191) | MUST implement, SHOULD be type C |
| RDNSS in RAs (RFC 8106) | MUST |
| DHCPv6 address configuration | SHOULD |
| DNS options, if DHCPv6 is implemented | MUST |
| Path MTU Discovery | SHOULD |
| Temporary addresses (now RFC 8981) | SHOULD |
| Stable opaque IIDs (RFC 7217) instead of EUI-64 | RECOMMENDED |
A device that cannot do RDNSS or ignores RFC 4191 will cause support tickets in the designs used in this course.
Linux
Runtime (iproute2). Changes are lost on reboot:
ip -6 addr add 3fff:a00:1003:12c::1/64 dev eth0
ip -6 route add default via fe80::1 dev eth0
ip -6 addr show dev eth0
ip -6 route show
sysctl net.ipv6.conf.eth0.accept_ra net.ipv6.conf.eth0.autoconf net.ipv6.conf.eth0.use_tempaddr
A link-local next hop always needs the interface (dev eth0), because fe80::1 exists on every link.
systemd-networkd (common on servers and cloud images). /etc/systemd/network/10-eth0.network for a statically configured VPS:
[Match]
Name=eth0
[Network]
Address=3fff:a00:1003:12c::1/64
Gateway=fe80::1
DNS=3fff:a00::53
IPv6AcceptRA=no
For SLAAC instead, set IPv6AcceptRA=yes. The [IPv6AcceptRA] section then controls Token= (for example Token=prefixstable for RFC 7217-style addresses, systemd 250 and later), UseDNS= and DHCPv6Client=, which starts the DHCPv6 client when the RA's M or O flag is set. Without Token=, networkd forms SLAAC addresses with EUI-64 on Ethernet. IPv6PrivacyExtensions= controls temporary addresses. networkd handles RAs itself in user space.
Netplan (Ubuntu) generates networkd or NetworkManager configuration:
network:
version: 2
ethernets:
eth0:
accept-ra: false
addresses: ["3fff:a00:1003:12c::1/64"]
routes:
- to: default
via: "fe80::1"
nameservers:
addresses: ["3fff:a00::53"]
Use dhcp6: true, ipv6-privacy: true and ipv6-address-generation: stable-privacy for client machines. The older gateway6: key is deprecated in favour of routes.
NetworkManager (desktops, RHEL-family servers):
nmcli con mod eth0 ipv6.method manual ipv6.addresses 2001:db8:3000:20::25/64 \
ipv6.gateway 2001:db8:3000:20::1 ipv6.dns 2001:db8:3000:f00::53
nmcli con mod eth0 ipv6.method auto ipv6.addr-gen-mode stable-privacy ipv6.ip6-privacy 2
nmcli con up eth0
ipv6.method values include auto (SLAAC, plus DHCPv6 if the RA asks), dhcp, manual, link-local, ignore and disabled.
Windows
PowerShell (Windows 10/11 and Server 2016 and later):
Get-NetIPConfiguration -InterfaceAlias "Ethernet"
New-NetIPAddress -InterfaceAlias "Ethernet" -AddressFamily IPv6 `
-IPAddress 2001:db8:3000:20::30 -PrefixLength 64
New-NetRoute -InterfaceAlias "Ethernet" -DestinationPrefix "::/0" -NextHop fe80::1
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 2001:db8:3000:f00::53
Set-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv6 -RouterDiscovery Disabled -Dhcp Disabled
Set-NetIPv6Protocol -UseTemporaryAddresses Disabled -RandomizeIdentifiers Disabled
The last two lines are for servers that need fixed addresses and must ignore RAs. Leave them at their defaults on clients. The older netsh interface ipv6 ... commands still work and are handy on Server Core.
Microsoft does not recommend disabling IPv6 by unchecking it on the adapter. If IPv4 must be preferred, set the DisabledComponents registry value under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters to 0x20, which changes the prefix policy table so IPv4 is preferred, and keep IPv6 running. Many Windows components (for example failover clustering and DirectAccess) expect IPv6 to be present.
macOS
networksetup works on network services (names such as "Ethernet" or "Wi-Fi"):
networksetup -listallnetworkservices
networksetup -setv6automatic "Ethernet"
networksetup -setv6manual "Ethernet" 2001:db8:3000:20::40 64 2001:db8:3000:20::1
networksetup -setdnsservers "Ethernet" 2001:db8:3000:f00::53
networksetup -setv6off "Wi-Fi"
ifconfig en0 inet6
netstat -rn -f inet6
ndp -an
scutil --dns
Temporary addresses are controlled by the net.inet6.ip6.use_tempaddr sysctl.
ictNetworks VPS pattern
On the Proxmox clusters from Level 2, each VPS gets a routed /64, with the host as gateway fe80::1 and the VPS link-local address derived from the VPS ID (VPS 300 → ID 0x12c → fe80::12c and 3fff:a00:1003:12c::/64). Inside the VPS:
- a static address from the /64 (for example
::1), gatewayfe80::1, RAs off, so the configuration does not depend on the hypervisor's RA daemon - DNS servers from the infrastructure block
- extra addresses for services added from the same /64
On the Proxmox host, the route for the /64 points at the VPS's link-local address on its tap or bridge interface. Level 4 covers that routing side.
A host runbook
For each host type you support, keep a one-page runbook:
| Section | Content |
|---|---|
| Expected state | Addresses (stable, temporary), default route, DNS, MTU |
| Commands to show it | The commands above for that OS |
| Settings that matter | RA acceptance, privacy, address generation, DHCPv6 client |
| Known quirks | For example "Android: no DHCPv6 IA_NA", "Linux: RIOs ignored by default" |
| Persistence | Which file or tool owns the configuration |
Drawing diagram…
Worked examples
Example 1: EUI-64 SLAAC address
A VM with MAC 52:54:00:ab:cd:ef on 3fff:a00:1003:12c::/64 with Linux defaults (addr_gen_mode 0) forms: flip the U/L bit (52 → 50), insert ff:fe: 3fff:a00:1003:12c:5054:ff:feab:cdef.
Example 2: VPS numbering
VPS 1000 is ID 0x3e8, so it gets fe80::3e8 and 3fff:a00:1003:3e8::/64, with service address 3fff:a00:1003:3e8::1.
Example 3: DisabledComponents
The value to prefer IPv4 over IPv6 is 0x20 = 32 decimal. 0xff (255) disables all IPv6 components except loopback, which Microsoft does not recommend.
Lab
Goal: Configure the same IPv6 design on Linux, Windows and macOS, and write a runbook.
You need: The L3.02 LAN (radvd on 2001:db8:3000:20::/64 with RDNSS), plus a Linux VM with systemd-networkd or NetworkManager, a Windows VM, and, if available, a macOS machine or VM. Record OS versions.
Step 1: SLAAC (client mode)
On each OS, configure SLAAC with temporary addresses and RFC 7217-style or randomised stable addresses. Record addresses, default route, DNS servers (from RDNSS) and how you made it persistent.
Step 2: DHCPv6
Set AdvManagedFlag on and AdvAutonomous off in radvd and run the Kea server from L3.03 on the LAN (a subnet for 2001:db8:3000:20::/64 with a pool and the DNS option). Show each OS's DHCPv6 address (a /128), its default route (still from the RA) and its DUID (on Windows, ipconfig /all shows the DHCPv6 client DUID).
Step 3: Static (server mode)
Configure a static address (::25 on Linux, ::30 on Windows, ::40 on macOS), a static default route, a static DNS server, and RA acceptance off where the OS allows it. Reboot and verify.
Step 4: RFC 8504 spot checks
For one OS, test: SLAAC, DAD (add a duplicate address), RDNSS, RFC 4191 router preference (from L3.02) and DHCPv6. Fill in the RFC 8504 table with pass or fail.
Step 5: Runbook
Write the runbook page for one OS, following the table above.
What to submit
Configuration files or commands, verification outputs per OS for each of the three methods, the RFC 8504 table and the runbook.
Summary
- RFC 8504 is the checklist: ND, SLAAC, DAD, MLDv2, address selection and RDNSS are MUSTs, DHCPv6 and PMTUD SHOULDs, and RFC 7217 IIDs are recommended.
- Linux: iproute2 at runtime, persistence in systemd-networkd, Netplan or NetworkManager. Link-local gateways need the interface.
- Windows:
New-NetIPAddress,New-NetRoute,Set-NetIPInterface,Set-NetIPv6Protocol. Prefer IPv4 withDisabledComponents0x20 rather than unbinding IPv6. - macOS:
networksetup -setv6automatic,-setv6manual,-setv6off, andndp,netstat -rn -f inet6. - ictNetworks VPS: static address in the routed /64, gateway
fe80::1, RAs off. - Next lesson (L3.07): DNS for IPv6 clients and servers.
Quiz imported · 9 questions · pass mark 70%. Lab questions are not auto-marked.