How to automate Global Default Route?

I’m looking to automate changing the Global Default Route (GDR) in the event the primary router were to fail running full tunnel mode. To my understanding two simultaneous active GDRs causes routing issues. Manually, when the primary fails I can remove the GDR and point it the secondary router which resumes routing without issue. How can could one use the ZeroTier API to achieve the same results? My goal was to write a Python script that monitors the health of the primary and secondary router. In an unhealthy state it automatically removes the primary GDR and sets it to the secondary. When the primary comes back the secondary GDR remains until it is marked unhealthy.

Any insight would be appreciated!

This topic was automatically closed after 30 days. New replies are no longer allowed.