This seems to be repeatable with NOT recently plugged in devices.
I just added a raspberry pi RPI3B+ that has not been on the network in a month (maybe more). The RPI3B+ grabbed a DHCP’d IP address as expected.
I quickly see the new lease info on the dhcp.cgi
:
And I quickly see the new lease in the /var/state/dhcp/dhcpd.leases
file:
ls -al /var/state/dhcp/dhcpd.leases
-rw-r--r-- 1 root root 17907 Oct 17 14:40 /var/state/dhcp/dhcpd.leases
lease 192.168.60.120 {
starts 0 2021/10/17 19:40:48;
ends 1 2021/10/18 01:40:48;
cltt 0 2021/10/17 19:40:48;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet xx:xx:xx:x8:03:08;
uid "\000\000\000\000\200\003\000";
set vendor-class-identifier = "dhcpcd-6.11.5:Linux-4.19.66-v7+:armv7l:BCM2835";
client-hostname "raspberrypi";
}
But there has been no change to the /etc/unbound/dhcp-leases.conf
file:
[root@ipfire]# ls -al /var/state/dhcp/dhcpd.leases /var/ipfire/dhcp/fixleases /etc/unbound/dhcp-leases.conf /var/ipfire/main/hosts
-rw-r--r-- 1 root root 3880 Oct 16 21:52 /etc/unbound/dhcp-leases.conf
-rw-r--r-- 1 nobody nobody 1019 Oct 16 21:52 /var/ipfire/dhcp/fixleases
-rw-r--r-- 1 nobody nobody 177 Oct 16 21:32 /var/ipfire/main/hosts
-rw-r--r-- 1 root root 12405 Oct 17 14:56 /var/state/dhcp/dhcpd.leases
[root@ipfire]#
EDIT: FYI -
If I add a new host via the hosts.cgi
WebGUI page I see the /etc/unbound/dhcp-leases.conf
file get updated instantly.
If I change a DHCP leased address to a DHCP fixed lease I see the /etc/unbound/dhcp-leases.conf
file get updated instantly.
So it appear to be an issue with a new DHCP leased address only…
EDIT2: small item - arp is a ?
and missing its hostname.
[root@ipfire monit]# arp -a | grep 03:08
? (192.168.60.120) at xx:xx:xx:x8:03:08 [ether] on green0
EDIT3: And if I do a simple /etc/rc.d/init.d/dhcp stop
& start
(as mentioned in earlier posts) then all my missing hostnames re-appear - included the raspberrypi
one added earlier today.
diff --changed-group-format='%>' --unchanged-group-format='' /root/monit/dhcp-leases.conf.last /etc/unbound/dhcp-leases.conf
local-data: "ecobee.localdomain 60 IN A 192.168.65.110"
local-data: "110.65.168.192.in-addr.arpa 60 IN PTR ecobee.localdomain"
<1 REDACTED>
local-data: "iPhone.localdomain 60 IN A 192.168.65.109"
local-data: "109.65.168.192.in-addr.arpa 60 IN PTR iPhone.localdomain"
local-data: "KiPhone.localdomain 60 IN A 192.168.65.117"
local-data: "117.65.168.192.in-addr.arpa 60 IN PTR KiPhone.localdomain"
local-data: "JiPad5.localdomain 60 IN A 192.168.65.113"
local-data: "113.65.168.192.in-addr.arpa 60 IN PTR JiPad5.localdomain"
local-data: "MBP2.localdomain 60 IN A 192.168.65.139"
local-data: "139.65.168.192.in-addr.arpa 60 IN PTR MBP2.localdomain"
local-data: "SiPad.localdomain 60 IN A 192.168.65.108"
local-data: "108.65.168.192.in-addr.arpa 60 IN PTR SiPad.localdomain"
local-data: "raspberrypi.localdomain 60 IN A 192.168.60.120"
local-data: "120.60.168.192.in-addr.arpa 60 IN PTR raspberrypi.localdomain"