Bug #7329
closedDHCP Not Updating DNS
0%
Description
The DHCP server setting "Register DHCP leases in DNS forwarder" does register the host in the DNS server. However, if the server gets a new IP Address from the DHCP server the DHCP server does not update the DNS records correctly. It either adds the second IP address to the DNS record so now the same name returns two IP addresses or it doesn't update DNS records at all. The DHCP lease page shows the correct name to IP records but the DNS lookup returns the wrong values. I am not sure if this has anything to do with it, but the workstations in question are virtual machines that come out of a saved state.
Updated by Kris Phillips over 3 years ago
I've never run into this issue because the DHCP server in pfSense tries to hand the same IP to the host. Is your virtual host's MAC address changing when it comes out of it's saved state or roaming between hypervisors in a cluster? The only other time this should happen is if your IP space is suffering from near exhaustion and the address was recycled, but DNS should still get updated.
Updated by Jon Noren over 3 years ago
No, the MAC address is static. The IP Space in this case was approximately 50, and there were only 2-3 clients on the network. Honestly, this may be a solved issue by now. The system in question is no longer available for testing.
Updated by Garry Page almost 3 years ago
Related, may be...
Windows 10 PC has DHCP enabled, IP address: 10.0.0.164 (preferred), Default Gateway: 10.0.0.1, DHCP Server: 10.0.0.1, DNS Server: 10.0.1.1
As there is no 10.0.1.0 subnet all DNS queries from the PC fail. Problem report is there is no internet access. A manual /release /renew sequence or power cycle of the PC does not correct the invalid DNS server address. This is a dynamic address allocation from the DHCP pool for tha LAN interface. By design it is not possible to delete the lease from the pfSense 'Status/DHCP Leases' page.
There have been a number of comments elsewhere that deleting a DHCP lease would prevent a device from using an old pool address. In these circumstances that is exactly what will be required. An option may be to shrink the DHCP address pool, generate/force an IP address lease request then expand the DHCP address pool. If there is no option to delete a DHCP lease then the documentation in the 'The pfSense Documentation' document, 33.12.5 should include a check for a valid DNS server address plus how to resolve the issue. May be this will require documenting the manual deletion of entries from the two DHCP files.
Updated by Garry Page almost 3 years ago
pfSense version is Community Edition 2.6.0-Release with DNS Resolver enabled.
Updated by Marcos M almost 3 years ago
- Status changed from New to Closed
Given the affected version here is 2.3.3, I'm going to close this out. If anyone can reproduce this on 2.6/2.7, feel free to leave feedback.
Regarding the comment with the invalid DNS server address leading to no internet, I don't see how this relates to this (nor how it's a bug). As for the comment mentioning that DHCP leases cannot be removed, that is not correct. The option to remove the lease will show only when the device is considered to be offline - this is to prevent IP conflicts. All leases can be cleared regardless with the button at the bottom of the page.
Updated by Will Chevdor about 1 year ago
I am running into this issue with 2.7.2-RELEASE (amd64).
I did restart both unbound and DHCP (ICS) and the DNS sticks with an OLD IP.
The DHCP leaases does show the right new IP. The device I am watching is however for now shown as idle/offline.
Should the DNS not report the right IP, even if the device is seen idle/offline ?
Updated by Brenden Walker 4 months ago
I'm running into what seems to be the same issue, PFSense+ on a Netgate 3100. 23.09-RELEASE (arm)
built on Tue Oct 31 12:56:00 PDT 2023
I have 2 hosts that resolve incorrectly, even though there is only one DHCP lease for both hosts with the correct IP address associated. There are no static entries in DHCP and no aliases related in the DNS configuration. DNS resolver is configured to register DHCP leases.
nslookup <hostname> <pfsense DNS resolver IP> returns incorrect IP. nslookup from SSH session to Netgate box also returns incorrect IP address.
Restarting DNS resolver does not change behaviour. Even tried a reboot, no change.
What I find really odd is that this system hasn't had any updates applied (nothing to update) and the configuration has been pretty much static for years.
I'm on the box grepping for the host name in /var/unbound to see what I can see there..if I find anything interesting I'll post here.
edit: found one in hosts file in the 'dhcpleases automatically entered' so sounds like my specific issue may be unrelated to DNS.
HOWEVER, removing the hosts entry and restarting DNS resolver did not fix the issue.
final edit: okay, turned out I had 'show active and static leases only' enabled.. pebkak..