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

    DNS Resolver ignores DHCP domain

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 2 Posters 2.2k 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.
    • D Offline
      dpsi
      last edited by

      So I have 2 networks. Under system I have the domain aaa.bbb, under the DHCP server settings for network 2 I have ccc.ddd. Under DNS resolver I have enabled register DHCP clients. For some reason it will resolve clients from both network 1 and 2, but will only resolve it with clienthostname.aaa.bbb (the system domain) on both networks. How can I make it to resolve the specified DHCP domain?

      1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator
        last edited by

        I really don't think it works that way.

        You can see on the resolver register dhcp clients it states
        The domain in System: General Setup should also be set to the proper value.

        The client registers their hostname and resolver uses the default domain with it..

        I don't think the domain you hand out with dhcp comes into play.  I would have to do some testing.  But when you look at your client does he actually show his full name as the domain you handed out with your dhcp? Why exactly do you need/want 2 different domains?

        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 25.07.1 | Lab VMs 2.8.1, 25.07.1

        1 Reply Last reply Reply Quote 0
        • D Offline
          dpsi
          last edited by

          @johnpoz:

          The client registers their hostname and resolver uses the default domain with it..

          I don't think the domain you hand out with dhcp comes into play.  I would have to do some testing.  But when you look at your client does he actually show his full name as the domain you handed out with your dhcp? Why exactly do you need/want 2 different domains?

          Yes, the clients receive the correct domain name as specified under the DHCP server settings as seen in the attachment.

          I use 2 different domains to divide 2 networks that share a WAN. Users on one network should be getting aaa.bb and users on the other should be getting ccc.aaa.bb

          The clients get the correct domains but doing DNS lookups to the DNS resolver resolves all clients to $client.aaa.bb instead of $client.ccc.aaa.bb

          Screenshot_451.png
          Screenshot_451.png_thumb
          Screenshot_453.png
          Screenshot_453.png_thumb

          1 Reply Last reply Reply Quote 0
          • johnpozJ Offline
            johnpoz LAYER 8 Global Moderator
            last edited by

            Again if you have the dhcp server register their names, its going to just use its domain, ie the one you put pfsense in.

            Now you could have your client register his name in dns. And it would use the domain it got from dhcp.  But I don't think you can set that up with unbound.  I think the bind package can do that.

            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 25.07.1 | Lab VMs 2.8.1, 25.07.1

            1 Reply Last reply Reply Quote 0
            • D Offline
              dpsi
              last edited by

              @johnpoz:

              Again if you have the dhcp server register their names, its going to just use its domain, ie the one you put pfsense in.

              Now you could have your client register his name in dns. And it would use the domain it got from dhcp.  But I don't think you can set that up with unbound.  I think the bind package can do that.

              Thanks for clarifying. I guess I'll live with it now. Only wanted different domains so It'd be easier to too see which host was on what network but the IP scheme is different so I'll just rely on that.

              1 Reply Last reply Reply Quote 0
              • johnpozJ Offline
                johnpoz LAYER 8 Global Moderator
                last edited by

                If you really want them to use different domain.. You could setup reservations for dhcp and set their domains to be different that way.

                To me if they are on my network and connecting to my pfsense, then they are all part of my network ;)  Don't really see the need for subdomain or different domains.  Now saying that I did setup subdomains for my pfsense different IPs..  So for example

                user@ubuntu:~$ dig -x 192.168.2.253 +short
                pfsense.wlan.local.lan.
                user@ubuntu:~$ dig -x 192.168.3.253 +short
                pfsense.dmz.local.lan.
                user@ubuntu:~$ dig -x 192.168.4.253 +short
                pfsense.wlanpsk.local.lan.

                Which I can query real quick to remind me which network is which vlan ;) hehehe

                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 25.07.1 | Lab VMs 2.8.1, 25.07.1

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