DHCP DNS hostname cache
My question is in regards to the "Register DHCP static mappings in DNS forwarder".
Everything is working as desired, in that my local network hosts are registering, and can be resolved forward and backwards just how I want. However the names seem to age off when the device is turned off for some amount of time. For example, my smart TV shows up as LGsmartTV when on, and I can do an nslookup on its name forward and reverse. However the next day I can see the lease is still in the DHCP cache, but the hostname is blank. If I turn the TV back on, it re-ACKS and populates.
Is there a setting or a TTL on that hostname associated with a lease? I wish for the name to persist for several days in the local DNS.
JKnott last edited by
Yes, it's that DHCP Static Mappings for this Interface on the DHCP server tab. You assign an IP address to a MAC address and then assign a host name to it. You could also separate that by using the DCHP server tab to assign an IP address and then on the Forwarder or Resolver tab, creating a separate entry for the DNS to IP mapping.
Thank you for your reply, I must not have been clear enough. I am referring to the way the DHCP server and DNS work together.
Lan client grabs DHCP lease from pfsense. PFsense registers the client name in DNS. If you look at DHCP leases you can see the IP address, mac address, and hostname. You can perform an nslookup against the pfsense DNS and get return of both A and PTR. You turn off the LAN client. You can still see the ip, mac, and hostname, you can still perform an nslookup. At some point the hostname gets stripped from the stale DHCP lease.
I know I can add a static mapping, but I'd prefer to not to maintain it in that fashion.
This setting is working:
Register DHCP leases in DNS forwarder If this option is set, then machines that specify their hostname when requesting a DHCP lease will be registered in the DNS forwarder, so that their name can be resolved. The domain in System: General Setup should also be set to the proper value.
The hostname just gets stale and drops out of DNS if the host is turned off for something like 12 hours. (I'm guessing I'm not sure exactly how much time has to pass.)
I am going to try and increase the lease time on DHCP, found it was set to 2 hours.