Well, but the DHCP client (your LTAP) can remove its own address (release) and ask for a new one, like:
but I don’t understand, you should have (from what I have understood of your intended setup) two or more WAN ports, each one running its own DHCP client, and connected to a separate router and DHCP server.
So you have two (or more) DHCP clients:
- running on ether1 connected to router1 and getting its IP address (as an example) 192.168.1.2 from the DHCP server 1 running on router1
- running on ether2 connected to router2 and getting its IP address (as an example) 192.168.2.2 from the DHCP server 2 running on router2
- running on …
Each of these DHCP client will have a DHCP script adding to the route table a “narrow” route to a DIFFERENT endpoint:
- route through gateway address 1 (192.168.1.1) to 1.1.1.1/32
- route through gateway address 2 (192.168.2.1) to (say) 9.9.9.9/32
- route through …
Then you will have several netwatch scripts:
- Netwatch probing 1.1.1.1/32
- Netwatch probing 9.9.9.9/32
- Netwatch probing …
Each Netwatch down script should with the “down” script “promote” the “next” route (or “demote” its own corresponding “wide” 0.0.0.0/0 route) and with the “up” script “promote” its own corresponding “wide” 0.0.0.0/0 route (or demote the “next” one).
With two routers/WAN ports you need only one of these, with three you need two, and so on (when you have reached the last one it makes no sense to probe it, as you have not any alternative left).