Is it possible to configure isc-dhcp in a way that it can send different DNS server addresses to different clients in the network?

Let say I have some Macs, PCs with Linux and Windows in the network. My primary DNS server is bind9 under Linux, but I have also a Windows server how also act as a DNS. Now I want that isc-dhcp send to the Windows clients the DNS connection to the Windows server and all other computer in the network get the DNS settings from the dhcp/bind9.

Is that possible?

  • You can provide different settings based on the client. This is done by filtering on vendor-class-identifier. See this mailing list discussion: lists.isc.org/pipermail/dhcp-users/2010-May/011783.html – muru Mar 22 '15 at 12:41
  • @muru: Could you please convert that to an answer so that schmucks like me who go around hunting for unanswered questions don't have to look at this one any more. ;-) (And I'll upvote if you drop me a note and it's a good one too!) – Fabby Mar 25 '15 at 20:32
  • @Fabby it's basically a link-only answer, and I don't know enough to write a decent answer. You can post one. – muru Mar 25 '15 at 20:33

According to the answer I get from muru, I found this workaround out:

For find out the vender-class-identifier from the clients, you need to put this on top from the dhcpd.conf:

set vendor-string = option vendor-class-identifier;

After restarting the dhcp service and a new connection to the dhcp server from a client you can use cat /var/lib/dhcp/dhcpd.leases to see which is your class. For example Windows XP has: "MSFT 5.0"

Now you can clarify the DNS Servers for the Clients like this, inside a subnet block:

# DNS for Windows XP
if substring (option vendor-class-identifier, 0, 9) = "MSFT 5.0"
    option domain-name-servers;
# DNS for all others
    option domain-name-servers,;

I am not sure that we need the 0, 9 variable, maybe not.

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.