DHCP-v6 PD broken when track interface enabled on wirguard interface
-
Hello,
i got a new internet connection with IPv6, and had an issue where the WAN interface was configured with DHCPv6 and should receive an address and a prefix.
The interface was receiving an address but no prefix, and there was just an error in the dhcpv6c log: dhcp6c failed to parse configuration file.
This was fixed when i removed IPV6 configuration for wireguard interface that was track interface. Then all worked as expected.I guess IPv6 track interface should be blocked for wireguard interface ?
Or can we have an IPV6 network with a prefix from dhcp for wireguard interface ? -
Hmm, interesting. Since that's the default setting I'd expect to have seen a lot of threads if it was a problem.
Are you getting a valid prefix?
Is it working on other internal interfaces?
-
@stephenw10 If I remove "track interface" on wireguard interface (i have 2 wireguard interfaces), then yes, the other internal interface get a prefix, otherwise no interface has an IPV6 addresse except WAN (which uses SLAAC). The router before is a mikrotik that distribute the prefix with DHCPv6.
-
Hmm, can you replicate it?
If so can you check the dhcp6c conf file it's choking on at:
/var/etc/dhcp6c.conf
-
This would be the dhcp6c.conf when wireguard is configured with track interface, and interface don't get an ipv6 address:
interface igb0 { send ia-na 0; # request stateful address send ia-pd 0; # request prefix delegation request domain-name-servers; request domain-name; script "/var/etc/dhcp6c_wan_script.sh"; # we'd like some nameservers please }; id-assoc na 0 { }; id-assoc pd 0 { prefix-interface tun_wg0 { sla-id 0; sla-len 8; }; prefix-interface igb2 { sla-id 10; sla-len 8; }; prefix-interface igb1 { sla-id 4; sla-len 8; }; prefix-interface tun_wg1 { sla-id 1; sla-len 8; }; };
and the log:
May 8 21:13:38 dhcp6c 51900 failed to parse configuration file May 8 21:13:38 dhcp6c 51900 failed to get default IF ID for tun_wg0 May 8 21:13:38 dhcp6c 51900 link layer address is too short (tun_wg0) May 8 21:13:38 dhcp6c 51900 skip opening control port May 8 21:13:38 dhcp6c 51900 failed initialize control message authentication May 8 21:13:38 dhcp6c 51900 failed to open /usr/local/etc/dhcp6cctlkey: No such file or directory
-
Ah, because it has no link-layer. Hmm, in that case it always seems invalid.
-
Will this be fixed ?
-
The fix here seems to be to prevent, or at least default to, not setting trackv6 on assigned wireguard interfaces.
You haven't seen any ongoing problems since disabling that I'm assuming?
-
since disabling trackv6 all good.
I now put a static address in Wireguard interface and all is working.But i guess that interface with NOARP needs a special treatment !