DHCP clients lose IPs after default-lease-time
Hi,
I use a DHCP and radvd server on my Proxmox server for automatic IP allocation.
Unfortunately I noticed that the clients lose their IPv4 address after a while.
The IPv6 remains the same but the IPv4 disappears. A reboot helps here, but after some time the IP will be gone as well.
In the first place I missed the entry "max-lease-time" in the DHCP config, I just added it and created 4 VMs as a test.
All of them successfully received an IP, but after about 10 minutes the IP was gone for all VMs.
The 10min correspond to my default-lease-time, apparently the VMs don't renew the lease somehow?
Does anyone here have an idea what this could be due to? Unfortunately I am currently quite helpless.
Greetings and thanks a lot!
Ian
/etc/dhcp/dhcpd.conf:
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 0.0.0.0 netmask 0.0.0.0 {
range 5.9.xxx.56 5.9.xxx.63;
option subnet-mask 255.255.255.255;
option routers 116.202.xxx.226;
option domain-name-servers 1.1.1.1;
}
Comments
Subnet + Netmask looks invalid configured, fix that first.
Free NAT KVM | Free NAT LXC
That’s the only way i found to hand out the subnet even tho the IP of the bridge (IP of my hostnode) is different than the subnet.
But that seems to work since they get the correct IP in the first place.
https://v6node.com
So you got yourself a few public ip adresses at (Hetzner) and trying to assign them with a DHCP server?
Or what else are you trying to build?
Free NAT KVM | Free NAT LXC
Right, I‘ve got an IP subnet and I‘m handing those out with the DHCP server.
I‘m using a routed setup, therefore that’s possible.
It works without a problem until the default-lease-time is over, then the VM loses the IP until I reboot it.
https://v6node.com