Skip to content

feat(ipv6): SLAAC, DHCPv6, NAT66 and netboot - #4

Open
phaus wants to merge 7 commits into
mainfrom
feature/ipv6
Open

feat(ipv6): SLAAC, DHCPv6, NAT66 and netboot#4
phaus wants to merge 7 commits into
mainfrom
feature/ipv6

Conversation

@phaus

@phaus phaus commented Aug 6, 2026

Copy link
Copy Markdown
Member

IPv6 gateway across LAN/VLAN/WiFi scopes:

  • built-in RA server (mdlayher/ndp): SLAAC + RDNSS, M/O flags
  • stateful/stateless DHCPv6: IA_NA leases, DUID, lease reaper
  • RFC 5970 netboot: option 61 client arch -> option 59 bootfile URL, legacy BIOS vs UEFI selection
  • NAT66 masquerade, IPv6 forwarding, WAN mode6 auto/static/disabled
  • dual-stack per-client traffic counters (ip6 field in status API)
  • VLAN address6 overrides + global dns6 in runtime extras

phaus added 7 commits August 6, 2026 09:00
IPv6 gateway across LAN/VLAN/WiFi scopes:
- built-in RA server (mdlayher/ndp): SLAAC + RDNSS, M/O flags
- stateful/stateless DHCPv6: IA_NA leases, DUID, lease reaper
- RFC 5970 netboot: option 61 client arch -> option 59 bootfile URL,
  legacy BIOS vs UEFI selection
- NAT66 masquerade, IPv6 forwarding, WAN mode6 auto/static/disabled
- dual-stack per-client traffic counters (ip6 field in status API)
- VLAN address6 overrides + global dns6 in runtime extras
addrconf generates fe80:: asynchronously after a global address is
assigned, so ndp.Listen raced it and failed on every interface.
Wait up to 2s for the kernel link-local, then install fe80::1.
A tentative link-local address (DAD in progress) cannot be bound,
so ndp.Listen failed even after ensureLinkLocal found fe80::.
Poll for a non-tentative link-local address before listening.
DAD state could not be read reliably (custom kernel may omit the
IFA_FLAGS attribute), so tentative addresses were handed to the NDP
listener and bind failed. fe80::1 with IFA_F_NODAD is usable
immediately and independent of addrconf timing.
ndp.ParseAddr parses the zone from a zoned literal, then compares
against the unzoned interface address, so 'fe80::1%br-vlan1' never
matched. Pass the unzoned string; ndp re-adds the zone itself.
iPXE clients already chain-load their boot script via IPv4 DHCP. The
option 59 bootfile URL (undionly.kpxe for legacy) pointed at IPv6 TFTP,
which the server does not listen on, so iPXE hung on OACK and the
Lenovo boot-looped between DHCP and TFTP.
Inherit global dns6 only when scope DNS6 is nil; an explicit empty list
advertises no IPv6 DNS (RDNSS + DHCPv6 option 23). Fixes netboot
regression: iPXE on br-vlan31 got v6 DNS, resolved AAAA, tried IPv6
HTTP from a ULA address and failed (no NAT66). vlan31 is now
SLAAC-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant