| 2 Jun 2025 |
hexa | ok, so your nixos router has a WAN and LAN side | 00:05:36 |
Charles | indeed | 00:05:44 |
hexa | and you probably have a dynamic allocation of IP addresses | 00:06:04 |
Charles | https://gitlab.computer.surgery/charles/servy-fleet/-/blob/charles/dnsmasq/nix/nixos-configuration/green/router/default.nix?ref_type=heads#L155 | 00:07:07 |
hexa | https://gitlab.computer.surgery/charles/servy-fleet/-/blob/charles/dnsmasq/nix/nixos-configuration/green/router/default.nix?ref_type=heads#L135 | 00:07:33 |
hexa | this here does DHCP for IPv4 and IPv6 on WAN | 00:07:42 |
Charles | yeah | 00:07:52 |
hexa | do you get like an IPv6 Prefix? | 00:08:14 |
Charles | i see a global scope ipv6 addr in ip a for en-wan, which is a /128 there | 00:08:13 |
Charles | ip -6 route shows a /64 | 00:08:21 |
hexa | yeah, that is no good 😄 | 00:08:25 |
hexa | for each LAN interface you want an individual /64 ideally | 00:08:38 |
hexa | and for that you need DHCPv6 IA_PD (aka Prefix Delegation) | 00:08:56 |
hexa | so on the WAN side I do
dhcpV6Config = {
WithoutRA = "solicit";
PrefixDelegationHint = "::/56";
};
| 00:09:36 |
hexa | and on the LAN side | 00:10:06 |
hexa | networkConfig.DHCPPrefixDelegation = true;
| 00:10:12 |
hexa | * \networkConfig.DHCPPrefixDelegation = true;
| 00:10:17 |
hexa | * networkConfig.DHCPPrefixDelegation = true;
| 00:10:22 |
hexa | this means it will request a /56 prefix on WAN | 00:10:30 |
hexa | and try to delegate that to the LAN interface | 00:10:37 |
hexa | which means it puts a /64 subnet onto your LAN interface | 00:11:02 |
hexa | when that is in place, all you need is | 00:11:17 |
hexa | networkConfig.IPv6SendRA = true;
| 00:11:23 |
hexa | on the LAN side to send router advertisements | 00:11:34 |
Charles | i see | 00:12:06 |
hexa | this all hinges on your ISP actually delegating you a prefix | 00:12:09 |
Charles | why | 00:12:15 |
Charles | right | 00:12:18 |
hexa | because with autoconfig there is algorithm to generate a collision free host suffix | 00:12:42 |
hexa | * because with autoconfig there is an algorithm to generate a collision free host suffix | 00:12:49 |