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

    Hostnames of devices missing when static mapping

    DHCP and DNS
    4
    11
    3.0k
    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.
    • P
      phil.davis
      last edited by

      In Services->DNS Forwarder, have you checked both of:
      Register DHCP leases in DNS forwarder
      Register DHCP static mappings in DNS forwarder
      ?

      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

      1 Reply Last reply Reply Quote 0
      • J
        JacktheSmack
        last edited by

        Yes, both are checked. Just to make sure: I unchecked them, saved, then checked them again, and saved. Still no change.

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

          what version of pfsense are you using..  I checked all my static mappings and they resolve and are listed on pfsense /etc/hosts

          I don't have them listed in dns over rides.  Just the static mapping in dhcp.

          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.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • J
            JacktheSmack
            last edited by

            I am running the latest version: 2.1.5-RELEASE (i386).

            Here is the static mapping:

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis
              last edited by

              Now I read more carefully - it is the same for me if I do not put any host name in the static mapping. For static-mapped clients the host names go into /etc/hosts at startup/when added in the GUI. When the static-mapped client connects it never gets its host name learned in Status->DHCP Leases, and certainly never gets to /etc/hosts.
              Not sure if this is something in dhcpd that could be switched on, to let dhcpd learn/accept static-mapped client names as they come online.

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

                ok I am running

                2.1.5-RELEASE (i386)
                built on Mon Aug 25 07:44:26 EDT 2014
                FreeBSD 8.3-RELEASE-p16

                I am not seeing this problem.. So my directv dvrs are static leases.  From the attached images they have static lease set, its not currently active even in the dhcp table.  I deleted them from the current /etc/hosts file.  Validated that they are not in dns overrides.

                And restarted both dhcp server and dns overrides, etc.

                I then look in /etc/hosts and they are there.  And they are listed when I do a dns query to pfsense be it with and without domain even.

                So if you have the checkbox to register static, they should be listed in your host file on pfsense /etc/hosts

                statics.png
                statics.png_thumb
                staticlease.png
                staticlease.png_thumb
                hostsfile.png
                hostsfile.png_thumb
                dns.png
                dns.png_thumb

                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.7.2, 24.11

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

                  ok new test.  Created a new staticlease, it then queries via dns - and you can see it added to the host file

                  then removed staticlease and now it no longer queries

                  edit:  So why would you create static map and not know the host name?  Just put in the host name..  I can not see how something with the same mac is going to come up and have to give the dhcp server is hostname.. Wouldn't it be the same very single time - when would it ever change?

                  statictestlease.png
                  statictestlease.png_thumb
                  sthostfile.png
                  sthostfile.png_thumb
                  stdns.png
                  stdns.png_thumb
                  removedstaticlease.png
                  removedstaticlease.png_thumb

                  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.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • C
                    cmb
                    last edited by

                    ISC dhcpd keeps no record of hostname for static mappings, so as others mentioned previously, you have to define the hostname in the static mapping entry for it to resolve.

                    1 Reply Last reply Reply Quote 0
                    • J
                      JacktheSmack
                      last edited by

                      Any way to get the hostname of each device without going to each one?

                      Edit: In Windows CMD Prompt, ping -a 10.10.10.10

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

                        that doesn't give you host name unless their is a PTR record for the device.

                        -a            Resolve addresses to hostnames.

                        In windows your prob better off doing a nbtstat to the box for its hostname

                        C:>nbtstat -A 192.168.1.8

                        Local:
                        Node IpAddress: [192.168.1.100] Scope Id: []

                        NetBIOS Remote Machine Name Table

                        Name              Type        Status
                            –-------------------------------------------
                            STORAGE        <00>  UNIQUE      Registered
                            LOCAL          <00>  GROUP      Registered
                            STORAGE        <20>  UNIQUE      Registered
                            LOCAL          <1E>  GROUP      Registered

                        MAC Address = 00-0C-29-55-4F-95

                        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.7.2, 24.11

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