I have a system using 2 redundant point-to-point wireless links to access the internet, and I'm trying to find the fastest way to switch between them if one goes down.
We need to switch within 1 second, with a goal of 100mS.
In the network diagram below:
Each "bridge" is a wireless radio. The radios themselves run ubuntu and have an ethernet interface and a wireless interface which are both added to a network bridge (using the "brctl" module).
Each router is a ubiquity edgerouter which includes a built-in switch.
In the current configuration, all the connections to router 2 are plugged into ports assigned to the built-in switch, meaning router 2 is currently only acting as a switch. All 4 bridges and both laptops are on the same LAN, getting IP addresses from the DHCP server running on router 1.
If both links are active at the same time, I get a network loop, which causes a broadcast storm.
What I've tried so far:
1) Enable spanning tree on the bridges, using the command "brctl stp dev on". Unfortunately, brctl only supports original STP, not RSTP, and this takes 45 seconds to respond to a link failure.
2) Replace router 2 with a switch that supports RSTP. This is an improvement, but still takes about 6 seconds to respond when a wireless link breaks.
What I plan to try next:
1) Adjust RSTP parameters on the switch. I'm not sure how much flexibility there is here, and whether there's any way to get close to the speed goal.
2) Try using OSPF routing. This makes things a bit more complicated since I can't just have everything on the same LAN, and I'm not sure how to set things up for this.
3) Some custom solution, possibly running on the radio linux kernels?
What's the best option for optimizing the switching time between these two links?