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

    DNS not working for computers using DHCP

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 3 Posters 4.1k 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.
    • B Offline
      bozrdang
      last edited by

      Forgive this newb question, but I just started using pfSense.  My problem is that the computers on my LAN that are set for a dynamic IP cannot navigate to other local computers by their name.  They can navigate to them fine if I enter their IP address instead.  To my, admittedly limited, knowledge this sounds like a DNS problem.

      Conversely, the computers that are set to a static IP have no problem navigating to other computers via their name.  What would cause the difference?

      FYI.  All the computers I am talking about here are win7 computers and I am running pfsense 2.0.2.

      1 Reply Last reply Reply Quote 0
      • M Offline
        Metu69salemi
        last edited by

        Is dhcp giving same dns server than static-ip machines have?

        1 Reply Last reply Reply Quote 0
        • B Offline
          bozrdang
          last edited by

          When I run ipconfig I get:

          DYNAMIC IP COMPUTER

          Wireless LAN adapter Wireless Network Connection:
          
             Connection-specific DNS Suffix  . : localdomain
             Link-local IPv6 Address . . . . . : fe80::1962:919c:b33c:3220%13
             IPv4 Address. . . . . . . . . . . : 192.168.1.122
             Subnet Mask . . . . . . . . . . . : 255.255.255.0
             Default Gateway . . . . . . . . . : 192.168.1.1
          

          STATIC IP COMPUTER

          Ethernet adapter Local Area Connection:
          
             Connection-specific DNS Suffix  . :
             Link-local IPv6 Address . . . . . : fe80::40a6:fa93:af56:26cd%10
             IPv4 Address. . . . . . . . . . . : 192.168.1.7
             Subnet Mask . . . . . . . . . . . : 255.255.255.0
             Default Gateway . . . . . . . . . : 192.168.1.1
          

          EDIT:  My bad.  I forgot to run /all.  ipconfig /all shows both have the DNS Server as 192.168.1.1

          1 Reply Last reply Reply Quote 0
          • stephenw10S Offline
            stephenw10 Netgate Administrator
            last edited by

            You may be able to get this working by going to Services: DNS Forwarder: and check the box 'Register DHCP leases in DNS forwarder'.
            Like it says you will have to have a name set the network domain. I'm not sure if it will work instantly or only when the dhcp leases renew.

            Steve

            1 Reply Last reply Reply Quote 0
            • B Offline
              bozrdang
              last edited by

              Thanks for the reply.  I checked that option, but what do I set as the name of my domain?  It's currently set to localdomain, but the tip says not to set it to local.  Wouldn't that be the same?  Mine is just a small home network so I don't have mysite.com or anything.

              1 Reply Last reply Reply Quote 0
              • stephenw10S Offline
                stephenw10 Netgate Administrator
                last edited by

                Do your clients have a WINS server set? When you look for a machine by a single host name, not an FQDN, you can be using Netbios not DNS.

                This should work via DNS though as long as your hosts are all using the same domain suffix, which they will be if you set it via dhcp in pfSense. It has to be a correctly formatted domain, ie not .localdomain, but it doesn't have to be real as far as I'm aware.

                Steve

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bozrdang
                  last edited by

                  @stephenw10:

                  Do your clients have a WINS server set?

                  I'm not sure.  How do I check?  I've never done much beyond basic "set it and forget it" home networking so I'm not very knowledgeable on this, but I'd like to learn.

                  I've done some more testing and I have more specific info on my problem. If I am in Windows Explorer I am able to navigate to other local computers via their computer name by typing it into the address bar at the top.  My problem seems to be specific to using a web browser.  For example… I have a NAS that has a webgui.  It should be reachable by entering it's computer name in the address bar, but that doesn't work and I have to enter the IP address instead.  Again, this problem is only on my laptops using a dynamic IP whereas my desktops using a static IP are able to get to the webgui with the computer name.

                  Does that change things?

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S Offline
                    stephenw10 Netgate Administrator
                    last edited by

                    For example if I run 'ipconfig /all' on this machine, WinXP home set to get it's details via dhcp from pfSense:

                    C:\Documents and Settings\Steve>ipconfig /all
                    
                    Windows IP Configuration
                    
                            Host Name . . . . . . . . . . . . : NewTuring
                            Primary Dns Suffix  . . . . . . . :
                            Node Type . . . . . . . . . . . . : Mixed
                            IP Routing Enabled. . . . . . . . : No
                            WINS Proxy Enabled. . . . . . . . : No
                            DNS Suffix Search List. . . . . . : fire.box
                    
                    Ethernet adapter Local Area Connection:
                    
                            Connection-specific DNS Suffix  . : fire.box
                            Description . . . . . . . . . . . : Realtek RTL8139/810X
                            Physical Address. . . . . . . . . : 00-30-1B-AB-18-C3
                            Dhcp Enabled. . . . . . . . . . . : Yes
                            Autoconfiguration Enabled . . . . : Yes
                            IP Address. . . . . . . . . . . . : 192.168.2.10
                            Subnet Mask . . . . . . . . . . . : 255.255.255.0
                            Default Gateway . . . . . . . . . : 192.168.2.1
                            DHCP Server . . . . . . . . . . . : 192.168.2.1
                            DNS Servers . . . . . . . . . . . : 192.168.2.1
                            Lease Obtained. . . . . . . . . . : 16 June 2013 11:16:05
                            Lease Expires . . . . . . . . . . : 16 June 2013 13:16:05
                    

                    I am then able to ping other machines by their hostname:

                    C:\Documents and Settings\Steve>ping NewBabbage
                    
                    Pinging NewBabbage.fire.box [192.168.2.2] with 32 bytes of data:
                    
                    Reply from 192.168.2.2: bytes=32 time<1ms TTL=128
                    Reply from 192.168.2.2: bytes=32 time<1ms TTL=128
                    Reply from 192.168.2.2: bytes=32 time<1ms TTL=128
                    Reply from 192.168.2.2: bytes=32 time<1ms TTL=128
                    
                    Ping statistics for 192.168.2.2:
                        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
                    Approximate round trip times in milli-seconds:
                        Minimum = 0ms, Maximum = 0ms, Average = 0ms
                    

                    This works even though 'fire.box' is not a real domain, or at least it's not my domain.

                    Interestingly this works even though I don't have 'Register DHCP leases in DNS forwarder' set in pfSense.  :-\

                    Steve

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