Ahoy friends.
I'm almost done with my VRRP setup, and in a few days i'll be ready to share my experience on the wiki.
Unfortunately there is still one single issue.
Is there a way to disable DHCP on a device through the CLI?
I want to execute it through a notify_master and notify_backup script.
It's being executed, but i can't see any change in the DHCP behaviour.
Is there something i'm missing?
The script will disable handing out dhcpv4 and stop odhcpd. If the router restarts RA and dhcpv6 will start working again. Also it will stop nameserver from working, not sure if you want that.
What is not working exactly?
What i want to achieve with my script, is to only disable the distribution of DHCP leases, DNS should keep running.
Unfortunately dnsmasq keeps handing out DHCP leases.
Another thing to realize is that disabling the DHCP server does not revoke existing DHCP leases. It simply stops the server from allocating new leases. Therefore, the clients that already have leases will continue to use their assigned IP addresses until the lease expires. By default, the lease time is 12 hours. You can obviously force the issue by releasing/renewing the leases on the client machines.
When a client tries to renew, it'll offer its ciaddr (current address). The server can extend the lease or refuse to renew that lease and offer a new one. In both cases the server assignment table should be updated.
By default clients will start trying to renew leases with the original server at T1 (0.5 * duration_of_lease). At T2 (0.875 * duration_of_lease) it will start sending broadcasts.
You could have the servers offer different ranges. One could do 192.168.10.100-149, the other can do 192.168.10.150-199, etc.