Greetings all,
For my NixOS powered router I would like to migrate the networking to
systemd, but no matter what I do, I can't get IPv6 to work. I have
disabled the firewall, IPv4 is working fine, but IPv6 is not.
The following relevant portion in my working networking config.
----------
networking.dhcpcd = {
IPv6rs = true;
allowInterfaces = [ "enp1s0" ];
wait = "both";
extraConfig = ''
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, host_name
nooption interface_mtu
slaac private
nohook lookup-hostname
noipv4ll
interface enp1s0
nooption interface_mtu
ipv6rs
ia_pd 1/::/48
'';
};
----------
The ISP gives me a /48. With these settings the router gets a
defaultroute set to `default via fe80::2 dev enp1s0 proto ra metric 1006
pref high`, i can manually assign the address 2001:db8:effe:ffff::fe/128
to the enp1s0 interface and there is connectivity, and I can delegate
/64s to the various interfaces in my LAN, for example, br10 (vlan 10)
gets 2001:db8:effe:10::1/64 and radvd does the rest. Here is the
relevant part of radvd's config: ----------
interface vbr10 { AdvSendAdvert on; prefix 2001:db8:effe:10::/64 {
AdvAutonomous on; AdvOnLink on; AdvPreferredLifetime 54800; # 18 hours
AdvValidLifetime 604800; # 7 days }; RDNSS fe80::76:35ff:fefb:1001 {
AdvRDNSSLifetime 14400; # 4 hours }; };
---------- Now I want to migrate this config to systemd's networkd
settings, and while IPv4 works, IPv6 does not. I have tried a host of
things, most recently as follows:
----------
systemd.network.networks."enp1s0" = {
"enp1s0" = {
matchConfig.Name = "enp1s0";
linkConfig = {
RequiredForOnline = true;
};
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
DHCPPrefixDelegation = true;
LinkLocalAddressing = "ipv6";
};
address = [
"2001:db8:effe:ffff::fe/128"
];
dhcpV4Config = {
RapidCommit = true;
UseMTU = false;
ClientIdentifier = "mac";
UseHostname = false;
};
dhcpV6Config = {
RapidCommit = true;
PrefixDelegationHint = "::/48";
#UseDNS = false;
#UseHostname = false;
};
ipv6AcceptRAConfig = {
UseAutonomousPrefix = false;
UseDNS = false;
Token = "static:::ffff:0:0:fe";
};
};
};
----------
I know that I'm setting Token and the address explicitly, it doesn't
really matter, neither work, but I'll admit that my understanding of
IPv6 is too limited to know what I should do. What happens with this
config is that the device gets the address 2001:db8::3:78c3 (not
something from 2001:db8:effe::/48 as it got with the old config); and
there is no IPv6 connectivity. I can try to ping with either 2001:..
address, but to no avail.
I'd really appreciate some help.
Mark