When devices catch all remaining IPv4 addresses
The problem
After a while I had problems connecting my devices to my local network via IPv4. I had some connections form devices which supported IPv6 but there I was not able to reach all internet services. I restarted the router and everything worked like a charm, but only for the rest of the day. The next day, I got the same problem again.
The cause
I run Proxmox and everything worked fine at the beginning but after I got previously mentioned problems I chcked the containers and in the network tab of my PiHole, I saw that it snatched all remaining IPv4 Adresses, causing the trouble. After some investigation I found out that my router was not able to assign the static IP to PiHole and gave out all remaining ones. The static assignment happens with help of the MAC Address and hands out the defined IP address (see the WIKI Article about ARP), so I had to find out what happened.
The solution
There are two tools which helped finding the problem. The first is ARP the second is ip neighbour. Both got commands / options to display IP assignments: – apr -a – ip neigh with help of grep you can reduce the list to the static IP which should be assigned to PiHole. In my case it looks like this:
arp -a | grep 192.168.1.24
192.168.1.24 0x1 0x2 00:00:00:00:00:00 * br-lan
ip neigh | grep 192.168.1.24
192.168.1.24 dev br-lan lladdr 00:00:00:00:00:00 REACHABLE
Here you can see that the IP is assigned to the Mac Address 00:00:00:00:00:00 but of course the PiHole container does have a Mac Address which is not zero.
To resolve this, you need to delete the cached assignment.
Therefore you have two options:
– delete the whole cache
– delete only that single entry
Whole cache deletion:
– ip -s -s neigh flush all (the s options are for verbose output and can be removed)
– for e in $(arp -a | sed -n 's/.(([^()])).*/\1/p'); do arp -d $e; done ( found here )
Single entry deletion:
– ip neigh del 192.168.1.24 lladdr 00:00:00:00:00:00 dev br-lan
– arp -d 192.168.1.24
With this commands the arp cached is free again and the router can newly assign the IP to the mapped Mac Adress and my PiHile server won't snatch all remaining IP addresses anymore.