How can I setup multiple static routes for a specific subnet for failover purposes?
Background: We have a high-speed radio wireless link which we’d like to use to carry the IP traffic most of the time, but when it fails (due to weather & distance) we need traffic to traverse our slower, much more stable link.
Looking at the config it seemed like you should be able to put in two routes to the same subnet with different gateways and distances, however I can’t get this to work for the life of me!
route 192.168.15.0/24 {
next-hop 192.168.1.5 { <---- gateway over faster, less stable link
distance 1
}
next-hop 192.168.2.5 { <---- gateway over slower, stable link
distance 2
}
}
At first I thought it was because the physical interface was up (since the link to the wireless equipment was good, but the RF link would go down) . . . but after a firmware updat on the wireless P2P link they added an option to down the ethernet link if the RF link went down. Recently the RF link went down and sure enough the Vyatta router showed the interface as u/D but still wouldn’t route traffic for 192.168.15.0/24 to 192.168.2.5 like it should:
Interface IP Address S/L Description
eth2 192.168.1.4/29 u/D P2P_fast_link
eth4 192.168.2.4/29 u/u P2P_slow_link
I’ve been running Vyatta CE for almost 2 years and know my way around pretty well but can’t seem to find a simple way to accomplish this.
We have some other routers that will check the remote gateway and automatically disable the static route if that gateway is unreachable but I can’t find an equivalent command in Vyatta/VyOS.
I can’t belive it’s that hard! Why have the distance metric in there if it can only use the one??? It feels like I’m missing something easy and obvious, but after hours of searching I can’t find much on it.
Thanks in advance for any help you can offfer!
–Andrew