What's new

DHCP server - how to specify the 2nd DNS Server?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Rici

Regular Contributor
Hi,

When assigning clients an IP address in the DHCP section, Merlin allows me to specify one the 1st DNS server there. What about the 2nd DNS Server that's usually provided to DHCP clients?

For example, I have two Pi-Holes, and if the primary goes down my DHCP clients should use the secondary Pi-Hole instead. For doing so, I need to let DHCP clients of my Asus router know what the 2nd DNS Server is.

How to do that?

Thanks a lot!
 
Hi,

When assigning clients an IP address in the DHCP section, Merlin allows me to specify one the 1st DNS server there. What about the 2nd DNS Server that's usually provided to DHCP clients?

For example, I have two Pi-Holes, and if the primary goes down my DHCP clients should use the secondary Pi-Hole instead. For doing so, I need to let DHCP clients of my Asus router know what the 2nd DNS Server is.

How to do that?

Thanks a lot!

Mine allows 2 DNS servers (plus optionally the router IP). Are you looking at the DNS Filter/DNS Director tab? That is something different.
 
Hmm, I can only assign a single DNS server - the Default one (circled in red in the screenshot below).

Where / how to assign the 2nd DNS Server that the Asus DHCP server should hand out to clients?


Asus-DNS.jpg
 
DNS Server 1 and DNS Server 2 is what is offered to all clients. What you have circled is DNS Server for individual clients and you can assign one only.
 
Strange, another weird Asus limitation. For all those individual clients that I assign a DNS server manually to, they get only 1 DNS Server handed out via DHCP.

Do you mean the Asus router then _cannot_ send DHCP clients a second DNS server ??
 
Do you mean the Asus router then _cannot_ send DHCP clients a second DNS server ??

For your 2x Pi-holes you need to use DNS Server 1 and DNS Server 2. Both will be offered to your clients. I don't know why do you have 1.1.1.3 set as DNS Server 2. I don't know why you have removed private IP addresses from your screen shot either.
 
No, they are not. None of the clients that I assigned a DNS Server in the "DNS Server (optional)" column receive a 2nd DNS Server. Unfortunately, they only got 1 DNS Server handed out by the Asus DHCP Server.

That's exactly my issue: How to fix that?
 
If you want your network clients to use both pinholes. Input the pihole ip addresses in the DNS 1 and DNS 2 fields. Example:
1676513928132.png


More here:

And here:
 
Avoiding a Single-Point-of-Failure: For not creating a configuration where both of my Pi-Hole devices must be available, I alaways assign a non-local DNS server (such as 1.1.1.1) as secondary DNS Server. Kinda Best Practice, if you will.

That does NOT work with the Asus DHCP Server for all clients that I manually assign a DNS Server: Unfortunately, those DHCP Clients only receive 1 single DNS Server information from the Asus router.
In other words: Asus DHCP Server does not hand out 2nd DNS Server to all DHCP client that I manually assign a primary DNS Server.

Is this a known bug?
How to fix it?
 
Yes, they are. You don't even need to touch Optional in DHCP reservations.
No, they are not, unfortunately. All of my my DHCP clients only get 1 DNS Server handed out by the Asus router, when I manually assign a DNS Server. I checked that, and all clients are affected. Allowing me so manually specify a 2nd DNS Server would solve that issue, but there's no option for it.

Since I can't see Optional / DHCP Reservations in the screenshot above: What are you referring to? Is there a particular setting in Merlin FW 388.1 that I need to enable or disable?
 
With both my piholes in dns server 1 and dns server 2 fields all my network clients get both as dns servers.
 
With both my piholes in dns server 1 and dns server 2 fields all my network clients get both as dns servers.
Then you don't have and manually assigned DNS Servers - in the section circled red in above screen - correct?

The bug with the Asus router seem to affect only those clients.
They don't get DNS Server #2, as configured in the field above.
 
No, I don't think so.

Because you still don't understand what Optional is for. It doesn't append to DNS1 and DNS2. It replaces them.
 
Then you don't have and manually assigned DNS Servers - in the section circled red in above screen - correct?

The bug with the Asus router seem to affect only those clients.
They don't get DNS Server #2, as configured in the field above.
This is not a bug, it's a design choice. This limitation is exactly the same in stock Asus firmware. In fact the "DNS Server (Optional)" field didn't even exist in older firmwares.

If you want to assign more than one DNS server to specific clients you would have to use Merlin's custom config files.
 
Last edited:
Then you don't have and manually assigned DNS Servers - in the section circled red in above screen - correct?

The bug with the Asus router seem to affect only those clients.
They don't get DNS Server #2, as configured in the field above.
There is no bug. If you want your network clients to use both Pi-Holes you input their IP addresses in DNS Server 1 and DNS Server 2 fields under the DNS and WINS Server Setting section. In your example, by having 1.1.1.3 as a DNS address, DNS requests potentially bypass the Pi-Hole. Normally one uses the DNS Server (Optional) optional field if they want to set the specific network client's DNS address to something other than what is listed in DNS Server 1 and DNS Server 2 fields.
Here is another example. Two Pi-Hole's have their IP addresses in DNS Server 1 & DNS Server 2 fields. The Windows computer accurately reflects this by listing both as DNS servers.
asusrouter.jpg

pc.jpg
 
Last edited:
Hi,

When assigning clients an IP address in the DHCP section, Merlin allows me to specify one the 1st DNS server there. What about the 2nd DNS Server that's usually provided to DHCP clients?

For example, I have two Pi-Holes, and if the primary goes down my DHCP clients should use the secondary Pi-Hole instead. For doing so, I need to let DHCP clients of my Asus router know what the 2nd DNS Server is.

How to do that?

Thanks a lot!

As numerous others have said, just to be clear:

REMOVE everything from the "OPTIONAL" DNS fields under your manual reservations at the bottom. Leave them blank.

Input your two pi-hole IPs in the top part under DNS1 and DNS2. Set advertise router IP to "NO".

Done, your clients (whether reserved or not) will all receive 2 DNS servers.
 
While I fully understand that DHCP clients geht both configured DNS Server: This is ONLY the case when there is no Manually assigned DNS Server, meaning that the "DNS Server (optional)" field is empty or filled with the entry "Default".

But when I ENTER a DNS Server there, so that it is not default, then the bug is there: In that case, only 1 single DNS Server is handed out to clients, so not two. Try for yourself.
Every client should get two DNS servers - but a client gets only one DNS Server when I manually configure a DNS Server and by doing so turn off the "default" setting.

In my understanding, this is clearly another bug in the Asus firmware.
 

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