Hi
I had reserved static up address via PI hole to the smart devices that I cannot change on the device itself.
All said lease was infinite, I had to power down pi hole today but when the devices reconnects it’s grabs another address from the dhcp pool not the one I had reserved for it.
PI Hole
Core 6.0.5
Is it something I have misconfigured ?
TIA
Please share your configuration and exact goal for us to know if this is caused by a miscofiguration.
pi-hole_pihole1_teleporter_2025-03-27_21-09-11_GMT.zip (29.2 KB)
Above is my config, below is all the static address i had assisgned to devices thtere are more but thought you would justwant an example
| device name |
IP address |
MAC,IP,hostname,leasetime |
| Tapo Xbox Plug |
192.168.0.21 |
5C:62:8B:6E:40:5A,192.168.0.21,xboxplug,infinite |
| Tapo Attic Unit |
192.168.0.20 |
5C:62:8B:C5:39:10,192.168.0.20,atticunit,infinite |
| Tapo Carols Desk |
192.168.0.19 |
5C:62:8B:6E:4F:C3,192.168.0.19,carolsdesk,infinite |
| Tapo Banister Lights |
192.168.0.18 |
24:2F:D0:2F:1A:DD,192.168.0.18,banisterlight,infinite |
| Tapo Stairs Lights |
192.168.0.17 |
30:DE:4B:D0:CA:8F,192.168.0.17,stairlights,infinite |
| Tapo Computer Plug |
192.168.0.16 |
b0:19:21:f1:16:cc,192.168.0.16,computerplug,infinite |
| Tapo Wax Melt 2 |
192.168.0.15 |
48:22:54:62:d2:40,192.168.0.15,waxmelt2,infinite |
| Tapo Wax Melt 1 |
192.168.0.14 |
48:22:54:62:dc:94,192.168.0.14,waxmelt1,infinite |
| Tapo Wax Melt 3 |
192.168.0.13 |
98:25:4a:7e:ad:39,192.168.0.13,waxmelt3,infinite |
| Tapo Hall Porch Light Bulb |
192.168.0.12 |
b0:19:21:8a:80:0c,192.168.0.12,hallporchlight,infinite |
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
pihole -d
or if you run your Pi-hole as a Docker container:
docker exec -it <pihole-container-name-or-id> pihole -d
where you substitute <pihole-container-name-or-id> as required.
Your debug log shows just under 90 Local DNS records.
Those records are intended to assign local hostnames to IP addresses.
Doing so would only be sensible if devices would be configured for a static IP on device, or if they acquire the same, fixed IP address on every DHCP request, i.e. you have to configure such a fixed IP address for each device in your DHCP server.
Setting the leasetime to infinite is neither required to have a DHCP assign static IPs to a device's MAC address, nor is it sufficient.
An infinite lease only means that a DHCP client won't try to renew its lease as long as that client is actively connected to your network.
Once it has to reconnect, it may be assigned a new IP address, unless you have configured a fixed IP for it in your DHCP server,
Your debug log shows that to be the case for just 6 fixed IP DHCP lease reservations, all of them for names of kitchenbulbX.
Instead of configuring Local DNS records, you should add those entries to your Pi-hole's Static DHCP configuration.
And as that would allow to assign hostnames along with IP addresses, you won't need the respective Local DNS records any longer.
Hi
So i am using the Pi Hole as my DHCP server i am wanting that to assign smart devices the same ip address even if they disconnect from the network and reconnect.
It may only show 6 but as on the ticket i gave you a snip of what was set as i had 35 set as static but i had to shutdown pihole and wifi access point to move stuff and that is what has come back up
Kind Regards Stuart
That table snip doesn't look like it would have been copied from Pi-hole's DHCP screen?
Where did you source that table from?
Hi
I have it all documented on an excel spreadsheet so I don’t duplicate address assignment.
Thanks
From that sheet, you should be able to copy the values in your third column (MAC,IP,hostname,leasetime) into Pi-hole's Static DHCP configuration under Settings|DHCP, and then hit Save & Apply.
You also should match your hostnames from those DHCP leases against those from your Local DNS records and remove redundant or conflicting definitions from the latter.
Hi
Thats what i had done, i entered the static leases then added local dns.
Should i just clear all local dns, assign static leases again and let the names populate and leave the local dns
Kind Regards Stuart
With ~90 Local DNS records and ~35 static lease definitions, you probably would still need some of the former, so pruning them for the IPs that already have a static lease seems preferable.
Local DNS records and static leases can coexist, but Pi-hole won't assign lease hostnames that are already taken.
In such a case, you may not be able to access some devices by their expected name.
Your debug log only shows those 6 kitchenbulb static leases and 90 DNS records I mentioned.
Would you run your system in read-only mode, or would you map certain paths to RAM drives?