Help! DHCP static mappings not working
-
I just replaced a custom router solution with pfSense. I have configured all the important hosts on my local network to have static DHCP mappings and have given them host overrides in the DNS resolver.
The DHCP static mappings are not working for any of my network equipment. The NAS is unreachable under its correct host name and I can't get to the admin screens for my access points because they are getting random IPs.
The system is acting very strangely because from the logs I can tell that many machines on the network are getting leases, however none of them show up in the DHCP leases pages, only in the logs.
For example, take my NAS:
DHCP Static Mapping:
MAC=00:15:17:xx:xx:xx IP=192.168.1.4 Hostname=tankHost Override:
Host=tank Doman=my_domain.net IP=192.168.1.4So, it was happy with the 192.168.1.4 address from the old server, but once it expired, it got 192.168.1.106 from the new pfsense box. The system is online, but the DHCP server happily gives it the wrong IP:
Status->DHCP Leases:
Shows 0 active leases, even though several non-static machines are online.
IP:192.168.1.4 MAC:00:15:17:xx:xx:xx Host:tank Start:n/a End:n/a offline Type:staticNow the log:
Aug 28 15:50:43 dhcpd DHCPREQUEST for 192.168.1.106 from 00:15:17:xx:xx:xx(freenas) via em1
Aug 28 15:50:43 dhcpd DHCPACK on 192.168.1.106 to 00:15:17:xx:xx:xx(freenas) via em1What! On my old system, it didn't matter what the server requested, it got the IP I specified.
So what on earth is going on here??? I have to be able to force servers, printers, and networking equipment to have static IP addresses so they are reachable by DNS name. I have triple-checked that the mac addresses are correct.
By the way, my windows boxes are playing nice and are getting the correct IPs from the server.
Please, if anyone can help, please do so. I'm desperate to get my network back up and running. I can't go back to the old system because it has already been decommissioned.
-
Update: I have not tacked down the root cause yet, but I did get my NAS back online. I was looking at the leases file in /var/dhcpd/var/db, and I noticed that it didn't have a lease for the addresses it was giving out. All it has were old ones that were given out when I was still in the midst of configuring the server. Also, strangely absent was the dhcpd.pid from /var/dhcpd/var/run. I deleted the leases and rebooted both the firewall and the NAS. It came back alive and look:
Aug 28 16:17:12 dhcpd DHCPREQUEST for 192.168.1.106 from 00:15:17:xx:xx:xx via em1: lease 192.168.1.106 unavailable.
Aug 28 16:17:12 dhcpd DHCPNAK on 192.168.1.106 to 00:15:17:xx:xx:xx via em1
Aug 28 16:17:12 dhcpd DHCPDISCOVER from 00:15:17:xx:xx:xx via em1
Aug 28 16:17:12 dhcpd DHCPOFFER on 192.168.1.4 to 00:15:17:xx:xx:xx via em1
Aug 28 16:17:14 dhcpd DHCPREQUEST for 192.168.1.4 (192.168.1.1) from 00:15:17:xx:xx:xx via em1
Aug 28 16:17:14 dhcpd DHCPACK on 192.168.1.4 to 00:15:17:xx:xx:xx via em1It worked exacly as I was suspecting.
So I'm starting to think that there is a bug in pfSense 2.3.2 that somehow causes the dhcpd to chroot to the wrong places when it is reloaded. I reloaded the configuration many times while setting it up. I think the server somehow got itself running without the correct chroot and therefore without access to the dhcpd.conf file with all my static mappings.
Only a guess right now, though.
-
I seem to be having the same issue. Any luck figuring it out?
-
I seem to be having the same issue. Any luck figuring it out?
Basically a reboot.
Above I had been speculating that the chroot was somehow messed up. However, since then I discovered that /var/run is actually a RAMdisk, and I think it's more likely something goofed up with that. Obviously, I can't troubleshoot further until it happens to me again.