5

I know it's possible to assign at least two DNS servers via DHCP. For example:

option domain-name-servers 8.8.8.8, 4.2.2.2;

But I wanted to know if I could also add a third DNS or if this would even make sense? My idea is to have a third DNS as a backup.

Can I do this or should I write my dhcpd.conf via a script that checks if the primary DNS are up.

Thanks!

  • Thanks. Didn't come here for the answer you wanted. I just needed to correct syntax for multiple DNS servers. Thanks for this! – Fiddy Bux Jan 25 '19 at 22:59
6

The spec for option type 6 has variable length and can support more than two entries. The length field is 8 bits and represents the number of bytes. 256 / 4 = 64 IP's. Clearly this is well beyond the number that the client must recognize, but specifying 3 entries is likely supported by many clients. It certainly won't hurt anything. orst-case the client will ignore the third.

Whether it makes sense or not is a function of your own infrastructure and availability. A WAN site might have two redundant servers on site and a third remote, for example. There are a number of mechanisms to improve availability of DNS infrastructure, many of which don't require additional IP's to be configured on the client side (i.e. anycast, load balancers).

| improve this answer | |
0

you can put in as many as you want. 2 is common, 3 is not unreasonable and also somewhat common. 4+ would be edging in to overkill.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.