Different DNS servers for different DHCP clients



  • Gang,

    Is it possible to tell the DHCP server to assign different DNS servers for different hosts? For example, 10.0.0.1 gets 192.168.0.1 as its DNS server while 10.0.0.2 gets 192.168.0.2 and so on. Specifying different DNS servers in each host's individual DHCP entry is not working.

    Thanks.



  • Why would you want to do that? As far as I know, there's no means in a DHCP server to do that. What you could do is manually configure the DNS server in each client.



  • Raspberry Pi, every couple of weeks, suffers an "update" to one of the dozens of lists that I use that nukes some of the streaming media services my wife uses. Its an easy fix, usually, but its a PITA and results in a wee bit of downtime if I don't get to it right away.

    So now the streaming devices use my VPN provider's DNS servers, and not the pi (I got it to work, the fields inside each host's DHCP setting worked, after a reboot). Its a minor beef, but an easy fix.


  • Netgate

    @tucansam said in Different DNS servers for different DHCP clients:

    Gang,

    Is it possible to tell the DHCP server to assign different DNS servers for different hosts? For example, 10.0.0.1 gets 192.168.0.1 as its DNS server while 10.0.0.2 gets 192.168.0.2 and so on. Specifying different DNS servers in each host's individual DHCP entry is not working.

    What do you mean it isn't working? DHCP static mappings work fine.

    Still unclear what problem you are trying to solve with such a scheme.



  • @tucansam if pfsense allows you at all, u will be running multiple instances of DHCP. If pfsense if unable, am almost certain u will find third party DHCP servers that will do that, u just have to run it on a separate box.

    Am thinking, a DHCP RANGE with its own settings.



  • This post is deleted!

  • Rebel Alliance Global Moderator

    @derelict said in Different DNS servers for different DHCP clients:

    10.0.0.1 gets 192.168.0.1 as its DNS server while 10.0.0.2 gets 192.168.0.2 and so on. Specifying different DNS servers in each host’s individual DHCP entry is not working.

    Yeah it works just fine as Derelict stated - I use this feature all the time since I hand out pi-hole to devices like roku and such via dhcp reservations. While other clients without reservations get pfsense for dns, etc.

    Simple enough to check - post up your rservations, and then do a simple sniff on the offer pfsense sends so you can validate what you put in the reservation is there.



  • Right. So, like I said in a reply near the top, my Pi Hole nukes streaming media regularly, so I put my regular clients on the Pi Hole for DNS, and my streaming clients on my provider's DNS servers. And it worked, but only after a reboot, which was strange, but oh well.

    Thanks to all.