DHCP problem with static ip

Hi, I have pihole installed on my proxmox in CT container. I'm facing issue that my static config is not always taken. For example i had new esp8266 device. I installed WLED on it and before connecting to my wifi i added static config for mac address. I see that connecting to wifi takes lot of time and in result ip from DHCP range instead of static config.

Aug 17 10:57:50 dnsmasq-dhcp[164]: DHCPDISCOVER(eth0) cc:50:e3:0b:9b:18 
Aug 17 10:57:50 dnsmasq-dhcp[164]: DHCPOFFER(eth0) 192.168.1.184 cc:50:e3:0b:9b:18 
Aug 17 10:57:50 dnsmasq-dhcp[164]: DHCPDISCOVER(eth0) cc:50:e3:0b:9b:18 
Aug 17 10:57:50 dnsmasq-dhcp[164]: DHCPOFFER(eth0) 192.168.1.184 cc:50:e3:0b:9b:18 
Aug 17 10:57:50 dnsmasq-dhcp[164]: DHCPREQUEST(eth0) 192.168.1.184 cc:50:e3:0b:9b:18 
Aug 17 10:57:50 dnsmasq-dhcp[164]: DHCPACK(eth0) 192.168.1.184 cc:50:e3:0b:9b:18 wled-WLED

Config:

dhcp-authoritative
dhcp-range=192.168.1.150,192.168.1.220,10h
dhcp-option=option:router,192.168.1.1
dhcp-leasefile=/etc/pihole/dhcp.leases
#quiet-dhcp

domain=local

dhcp-host=CC:50:E3:0B:9B:18,192.168.1.21,agatka-lampka2

Do you know what might be an issue? On CC:50:E3:0B:9B:18 dhcp is on. Should i change it to static config? I thought that with static config dhcp server should offer static ip.

PS: other DHCP servers, for example on router, are disabled.

Update: after lease removal and pihole restart proper IP were assigned

Aug 17 11:29:08 dnsmasq-dhcp[165]: DHCPDISCOVER(eth0) cc:50:e3:0b:9b:18 
Aug 17 11:29:08 dnsmasq-dhcp[165]: DHCPOFFER(eth0) 192.168.1.21 cc:50:e3:0b:9b:18 
Aug 17 11:29:08 dnsmasq-dhcp[165]: DHCPREQUEST(eth0) 192.168.1.21 cc:50:e3:0b:9b:18 
Aug 17 11:29:08 dnsmasq-dhcp[165]: DHCPACK(eth0) 192.168.1.21 cc:50:e3:0b:9b:18 agatka-lampka2

Do i need to restart pihole on static ip config change?

The issue seems that Pi-hole's DHCP server does not hand out the dhcp-host defined 192.168.1.21, but an IPv4 address from its dynamic range.

One notable difference here is that the MAC address from the logs is all lower case, while the dhcp-host definition is all upper case.

Despite expecting that to be case-insensitive:
Did you try to change that dhcp-host to lower case yet?

I'm managing pihole via GUI. I did a test and put manually static ip with mac address with lower case. It was converted to upper case. So i think that it is not case sensitive. Interesting thing is that after pihole restart ip were properly assigned.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.