!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

913 Members
Declaratively manage your switching, routing, wireless, tunneling and more.264 Servers

Load older messages


SenderMessageTime
2 Jun 2025
@charles:computer.surgeryCharlesISP <-> modem <-> NixOS router <-> client devices00:05:05
@hexa:lossy.networkhexaok, so your nixos router has a WAN and LAN side00:05:36
@charles:computer.surgeryCharlesindeed00:05:44
@hexa:lossy.networkhexaand you probably have a dynamic allocation of IP addresses00:06:04
@charles:computer.surgeryCharleshttps://gitlab.computer.surgery/charles/servy-fleet/-/blob/charles/dnsmasq/nix/nixos-configuration/green/router/default.nix?ref_type=heads#L15500:07:07
@hexa:lossy.networkhexahttps://gitlab.computer.surgery/charles/servy-fleet/-/blob/charles/dnsmasq/nix/nixos-configuration/green/router/default.nix?ref_type=heads#L13500:07:33
@hexa:lossy.networkhexathis here does DHCP for IPv4 and IPv6 on WAN00:07:42
@charles:computer.surgeryCharlesyeah00:07:52
@hexa:lossy.networkhexado you get like an IPv6 Prefix?00:08:14
@charles:computer.surgeryCharles i see a global scope ipv6 addr in ip a for en-wan, which is a /128 there 00:08:13
@charles:computer.surgeryCharles ip -6 route shows a /64 00:08:21
@hexa:lossy.networkhexayeah, that is no good 😄 00:08:25
@hexa:lossy.networkhexafor each LAN interface you want an individual /64 ideally00:08:38
@hexa:lossy.networkhexaand for that you need DHCPv6 IA_PD (aka Prefix Delegation)00:08:56
@hexa:lossy.networkhexa

so on the WAN side I do

        dhcpV6Config = {
          WithoutRA = "solicit";
          PrefixDelegationHint = "::/56";
        };
00:09:36
@hexa:lossy.networkhexaand on the LAN side00:10:06
@hexa:lossy.networkhexa
          networkConfig.DHCPPrefixDelegation = true;
00:10:12
@hexa:lossy.networkhexa *
        \networkConfig.DHCPPrefixDelegation = true;
00:10:17
@hexa:lossy.networkhexa *
        networkConfig.DHCPPrefixDelegation = true;
00:10:22
@hexa:lossy.networkhexathis means it will request a /56 prefix on WAN00:10:30
@hexa:lossy.networkhexaand try to delegate that to the LAN interface00:10:37
@hexa:lossy.networkhexawhich means it puts a /64 subnet onto your LAN interface00:11:02
@hexa:lossy.networkhexawhen that is in place, all you need is 00:11:17
@hexa:lossy.networkhexa
          networkConfig.IPv6SendRA = true;
00:11:23
@hexa:lossy.networkhexaon the LAN side to send router advertisements00:11:34
@charles:computer.surgeryCharlesi see00:12:06
@hexa:lossy.networkhexathis all hinges on your ISP actually delegating you a prefix00:12:09
@charles:computer.surgeryCharleswhy00:12:15
@charles:computer.surgeryCharlesright00:12:18
@hexa:lossy.networkhexabecause with autoconfig there is algorithm to generate a collision free host suffix00:12:42

Show newer messages


Back to Room ListRoom Version: 6