Hostnames of devices missing when static mapping
-
All the devices on my network that are statically mapped in the DHCP server are all missing hostnames. When they weren't statically mapped, their hostnames were there. I do not want to manually type in their hostnames, I want pfsense to automatically read them.
-
In Services->DNS Forwarder, have you checked both of:
Register DHCP leases in DNS forwarder
Register DHCP static mappings in DNS forwarder
? -
Yes, both are checked. Just to make sure: I unchecked them, saved, then checked them again, and saved. Still no change.
-
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.
-
I am running the latest version: 2.1.5-RELEASE (i386).
Here is the static mapping:
-
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. -
ok I am running
2.1.5-RELEASE (i386)
built on Mon Aug 25 07:44:26 EDT 2014
FreeBSD 8.3-RELEASE-p16I 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
-
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?
-
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.
-
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
-
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 RegisteredMAC Address = 00-0C-29-55-4F-95