Manually assigned IPv6 DNS server

LostNetSpace

Occasional Visitor
For IPv4 you can enter a device’s MAC address and manually assign a IPv4 address and a IPv4 DNS server address. Useful for handling some special cases.

For a few of my devices that always try IPv6 before IPv4 I would like to be able to assign specific IPv6 DNS server address(es) for them to use. I do not see a way to do that. No particular need to a specific or different IPv6 address than the current logic, just looking for a way that I can set an IPv6 DNS server address for a client based on the client’s MAC address.

Currently running Merlin 386.3_2 which my router says is the latest available for it.

Background: I am running DNS based ad and tracker blocking on my router but there are a couple of devices that I’d like to bypass that and have them directly access a regular DNS server.
 

LostNetSpace

Occasional Visitor
I guess I should expand on the above a bit. . .

I have found I can replicate the GUI setup for specific IPv4 DNS servers using the CLI, specifically setting things like:
dhcp-option=tag:cloudflare4,option:dns-server,1.1.1.1,1.0.0.1
dhcp-host=xx:xx:xx:xx:xx:xx,set:cloudflare4,dev-name,192.168.1.119,12h
But the equivalent for IPv6 does not work for me. I have tried, among other things, the following:
dhcp-option=tag:cloudflare6,option6:dns-server,[2606:4700:4700::1111],[2606:4700:4700::1001]
dhcp-host=xx:xx:xx:xx:xx:xx,set:cloudflare6,dev-name,192.168.1.119,12h
and
dhcp-option=tag:cloudflare4,option:dns-server,1.1.1.1,1.0.0.1
dhcp-option=tag:cloudflare6,option6:dns-server,[2606:4700:4700::1111],[2606:4700:4700::1001]
dhcp-host=xx:xx:xx:xx:xx:xx,set:cloudflare4,set:cloudflare6,dev-name,192.168.1.119,12h
Ideally I’d like to be able to specify both a set of IPv4 and IPv6 addresses. It is not clear to me from the dnsmasq man page if having two set:name values in the dhcp-host line is acceptable but dnsmasq does not give me an error message with I try it so maybe that part is okay. It just seems to do nothing with the IPv6 information.
 

learning_curve

Regular Contributor
~~
Ideally I’d like to be able to specify both a set of IPv4 and IPv6 addresses. It is not clear to me from the dnsmasq man page if having two set:name values in the dhcp-host line is acceptable but dnsmasq does not give me an error message with I try it so maybe that part is okay. It just seems to do nothing with the IPv6 information.
A very simple option for the above, is to use the existing router GUI functionality. You can specify your IPv4 DNS on Internet Connection / Wan DNS Settings and your IPv6 DNS on IPv6 / IPv6 DNS settings plus, your own choice of the other variables as you see fit for your own setup. Can't see it in your posts, but maybe you've tried that and it didn't work? (on your current router / setup) It does work for me FWIW.
 

LostNetSpace

Occasional Visitor
A very simple option for the above, is to use the existing router GUI functionality. You can specify your IPv4 DNS on Internet Connection / Wan DNS Settings and your IPv6 DNS on IPv6 / IPv6 DNS settings plus, your own choice of the other variables as you see fit for your own setup. Can't see it in your posts, but maybe you've tried that and it didn't work? (on your current router / setup) It does work for me FWIW.
The IPv6->IPv6 DNS Setting gives the router the addresses to use when resolving addresses. And that works.

But I don’t see a way there or on any other GUI page to make an exception for specific devices. At present all devices get their IPv6 DNS server set to the router’s IPv6 (public by the looks of it) address. And the router uses the above setting to then go and do its own DNS lookup.

I am looking for a way to do exceptions for specific devices the same as I can do for IPv4. If I can do it through the GUI that is great. But I am not adverse to doing it by modifying the configuration via ssh.
 

learning_curve

Regular Contributor
The IPv6->IPv6 DNS Setting gives the router the addresses to use when resolving addresses. And that works.

But I don’t see a way there or on any other GUI page to make an exception for specific devices. At present all devices get their IPv6 DNS server set to the router’s IPv6 (public by the looks of it) address. And the router uses the above setting to then go and do its own DNS lookup.

I am looking for a way to do exceptions for specific devices the same as I can do for IPv4. If I can do it through the GUI that is great. But I am not adverse to doing it by modifying the configuration via ssh.
Ahh I see. In that case, can you not just specify your chosen DNS on the device itself? You can easily do that on both IPv4 and IPv6 on the devices I use (although I don't, I just use the router's DNS via LAN)
 

LostNetSpace

Occasional Visitor
Ahh I see. In that case, can you not just specify your chosen DNS on the device itself? You can easily do that on both IPv4 and IPv6 on the devices I use (although I don't, I just use the router's DNS via LAN)
Setting it on each device is my current work around. But I would much rather manage my network from one place, in this case the ASUS-Merlin router.

And I have some devices that do not allow you to have that type of control over their network settings. At present those devices (weather station, EV charger, etc.) are fine using my standard DNS configuation with ad and tracker blocking but that may not always be the case.
 

LostNetSpace

Occasional Visitor
I am pretty sure Merlin uses dnsmasq to manage the DHCP for IPv6. At least it populates /etc/dnsmasq.conf with things like:

dhcp-range=lan,::,constructor:br0,ra-stateless,64,600
dhcp-option=lan,option6:23,[::]

Looking at the dnsmasq man page, the syntax for a dchp-host entry is:

dhcp-host=[<hwaddr>][,id:<client_id>|*][,net:<netid>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]

There is no discussion about what types of things can be used for hwaddr in the dnsmasq man page.

For IPv6 apparently the MAC address is not used for DCHP. Apparently the “IPv6 interface id” is used. This can be computed from the MAC address.

But apparently “Dnsmasq supports IPv6 for DNS, but not DHCP” and this seems to be confirmed by my experimenting with various things in the hwaddr field for the dhcp-host entry.

So I guess I am at a dead end on this. At least for the moment. And I will just use the settings on individual devices to override the DNS server settings.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top