Hi,
I like to point all of my clients DNS at the dnsmasq instance on my EdgeRouter Lite 3. I also want all my DNS lookups to go over IPv6 (as my provider has native IPv6 + PD)
I disable picking up the IPv4 DNS servers from my WAN, and I give out the local router IP as the DNS server to my LAN clients:
interfaces { ethernet eth0 { address dhcp description Internet dhcp-options { name-server no-update } } service { dhcp-server { disabled false hostfile-update disable shared-network-name Guestnet { authoritative disable subnet 192.168.x.0/24 { default-router 192.168.x.1 dns-server 192.168.x.1 } } } dns { forwarding { cache-size 2000 listen-on eth1.x listen-on eth1.xx } } }
This all works fine.
However, I cannot do the same trick with IPv6 and prefix-delegation.
I can set the router-advert name-server to my local router:
interfaces { ethernet eth0 { dhcpv6-pd { pd 0 { interface eth1.x { host-address ::1 prefix-id :0 service dhcpv6-stateless } interface eth1.xx { host-address ::1 prefix-id :1 service dhcpv6-stateless } prefix-length 60 } rapid-commit disable } } ethernet eth1 { vif xx { address 192.168.xx.1/24 address fd82:xxx:xxx:xx::1/64 ipv6 { router-advert { name-server fd82:xxx:xxx:xx::1 other-config-flag true } } }
Running DHCPv6-PD, then correctly sets my router /etc/resolv.conf to my ISPs IPv6 DNS servers (this is what I want), but the generated configs for the stateless DHCPv6 for my downstream LANs look like:
# cat /var/run/dhcpv6-eth1.xx-pd.conf shared-network eth1.xx-pd { option dhcp6.name-servers 2001:xxx:xxx::53, 2001:xxx:xxx:x::53; subnet6 2A02:xxx:xxx:xxx:0:0:0:0/64 { } }
These are my ISPs name servers, but they are being directly handed out to my LAN clients, so those clients bypass the local cache.
Actually, my clients end up with several available name servers
1) the ipv4 one from DHCPv4 (my router)
2) the ipv6 one from router-advert name-server (my router)
3) the two IPv6 ones that are handed out by my ISP
Example (ubuntu 16.04):
Jun 5 12:35:02 host dnsmasq[2114]: using nameserver fd82:xxx:xxx:xx::1#53 Jun 5 12:35:02 host dnsmasq[2114]: using nameserver 2001:xx:xx::53#53 Jun 5 12:35:02 host dnsmasq[2114]: using nameserver 2001:xx:xx:xx::53#53 Jun 5 12:35:02 host dnsmasq[2114]: using nameserver 192.168.xx.1#53
There is no option to override the name servers like we can do in IPv4.
It would be great if this could be added as a feature.
Maybe with an option that looks like:
interfaces { ethernet eth0 { dhcpv6-pd { pd 0 { interface eth1.xx { host-address ::1 prefix-id :0 service dhcpv6-stateless dns-server fd82:xxx:xxx:xxx::1 } interface eth1.xx { host-address ::1 prefix-id :1 service dhcpv6-stateless dns-server fd82:xxx:xxx:xxx::1 } prefix-length 60 } rapid-commit disable } }
Additionally, at the moment I can disable IPv4 DHCP from updating the router resolv.conf, but I can't do the same in IPv6 DHCPv6-PD on the WAN. It always adds to resolv.conf. Now in my case, that's what I want, but maybe someone else doesn't, and would like a similar flag.
So:
set interfaces ethernet eth0 dhcp-options name-server no-update set interfaces ethernet eth0 dhcpv6-options name-server update
or:
set interfaces ethernet eth0 dhcp-options name-server update set interfaces ethernet eth0 dhcpv6-options name-server no-update
Depending on the desired behaviour.
It would be great if we could make the behaviour consistent.
Every little step we have to make IPv6 equal feature parity with IPv4 is a bonus!!