IPv6 and dhcp_option

I push a special DNS server to some clients:

config tag 'filtered-dns'
list dhcp_option '6,192.168.0.253,192.168.0.253'
option force '1'

config host
option name 'client1'
option dns '1'
option mac 'C0:XX:XX:XX:XX:XX'
option ip '192.168.0.81'
option tag 'filtered-dns'

The problem is now that the clients gets the default IPV6 DNS server and some use that over the IPv4 one.

Is there a way to push a different IPv6 DNS server to the some clients as I did with ipv4 ?

if you leverage odhcpd as DHCPv6 server (and not dnsmasq)

list dns 'ipv6' [1]

DNS servers to announce - accepts IPv4 and IPv6


[1] https://openwrt.org/docs/techref/odhcpd

1 Like