Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Different DNS servers for different DHCP clients

    Scheduled Pinned Locked Moved DHCP and DNS
    8 Posts 6 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tucansam
      last edited by tucansam

      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.

      SammyWooS 1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        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.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • T
          tucansam
          last edited by tucansam

          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.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            @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.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • SammyWooS
              SammyWoo @tucansam
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • K
                kpa
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  @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.

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • T
                    tucansam
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.