[UTILITY] - Conditional configuration script

I made this, but I don’t think it really fits as a full feature in VyOS, but figured others may find it useful:

The helper offers multiple connectivity checks (ping, DNS, HTTP). If connectivity fails, it can configure something on VyOS.

My usage (check the example on the github)

My internet connection has a default route learned via DHCP. I then advertise a default into my L3 core via BGP. The script runs every minute, and if pings to the internet fail, the default is withdrawn towards my core, allowing my backup 5G internet to take over via a less preferred default route on a secondary router. The default is regenerated once connectivity is restored to my primary ISP.

That’s my use case, but the helpers can be used to conditionally configure anything (VRRP failover, shutdown an IGP, send log message, etc…)

5 Likes