I have in my network a main router into the internet with 10.1.1.1. It also contains the DHCP-server providing addresses and the standard-gateway with 10.1.1.1). Works fine… until the power supply died and the one and only access to the internet was off.
To overcome this situation I set up a backup router (10.1.1.2) with DHCP server (providing standard-gateway as 10.1.1.2) to take over in the rare case the main router with DHCP server (10.1.1.1) is not working any more.
In general I do not want that the backup router/DHCP server is assigning addresses to devices, I set the delay threshold to 10 seconds. This did not work properly, some of the addresses had been assigned from the backup server reaching the internet over the backup line. Even increasing the delay threshold to 1 minute does not properly work. There are still addresses assigned from the backup router.
How can I make that the backup router provides only addresses in case the main router does not respond to the requests? Delay threshold is not working.
thanks for the quick answers!
according your points:
I have no vlans in my setup, or I am misunderstanding your answer
This I will work on (idea is to ping the master router, once not reachable the backup router will switch on the DHCP-server, which I will disable while the master-router is pingable)
3 and 4) This is already done manually
according your PS: Is there no possibility to have a backup DHCP-server in standby, which get’s active when the main one is out of order? This is what I understood I can handle easily with the Delay Threshold.
My setup is looking like this (hopefully my ascii art is readable):
Internet
|
+----------------+--------------+
| |
Main router Backup router
(10.1.1.1) (10.1.1.2)
| |
+ ---------------+--------------+
|
network
(10.1.x.x)
If you want only the DHCP server feature on your backup router and have only one subnet then maybe it would be easier to add (on backup router) simple Netwatch rule looking at 10.1.1.1 and enabling DHCP server when it’s down (and disable it when it’s up). Not the “cutest” solution, but simple.
I have found that if you set the dhcp server to use the vrrp interface, instead of the actual interface, then the dhcp server is automatically enabled/disabled with the vrrp interface itself getting enabled/disabled.