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.

enter image description here

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?

  • 1
    Extending layer-2 across something like that can be problematic. We live in a layer-3 world, and very few (mostly old or poorly implemented things) need to be on the same layer-2 network anymore. You could set this up as two separate routed links between the two routers and use OSPF, possibly with BFD, to switch quickly. The configuration is pretty simple to do that. I really do not see any advantage to layer-2 over layer-3 in your diagram, but I see plenty of downside to layer-2.
    – Ron Maupin
    Apr 15, 2020 at 18:13
  • Thanks. I'm sure the layer-3 setup isn't too complicated, but to a non-network-engineer like myself, there are a few sticking points which is why I haven't tried it yet (do I need DHCP servers on both routers? How about DNS servers for local host names? Does the second subnet need a statically assigned 3rd octet [192.168.???.0/24] or is that assigned via DHCP?)
    – Selvek
    Apr 15, 2020 at 19:32
  • You can use DHCP relay to do DHCP on multiple networks. DNS server can be anywhere, for example, many people use the Google, which is certainly not local. Octets are simply to make it easier for humans to read, and have nothing to do with addressing or DHCP. If you separate things by routers, you simply have two different networks with separate networks addresses.
    – Ron Maupin
    Apr 16, 2020 at 0:23
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Dec 17, 2020 at 16:47

1 Answer 1


You're trying to detect a link failure by missing BPDUs but that takes at least two hello intervals.

The best option is to make the bridges drop their Ethernet link as soon as they detect carrier loss on the wireless side. Then, use RSTP on the router (apparently, there's a bridge group). RSTP can fail over in less than 1 ms on link failure, it all depends on the wireless bridges.

Alternatively, the drop-Ethernet-link-on-carrier-loss should also work very well with L2 link aggregation or L3 routed interfaces.

  • "Dropping the ethernet link" is equivalent to physically unplugging one of the ethernet cables, right? Unfortunately, the 6 second time remains in the case of unplugging the ethernet cable from router 2 to [whichever radio RSTP is currently using]. Any idea why this isn't giving me the fast fail over?
    – Selvek
    Apr 15, 2020 at 19:25
  • With drop the Ethernet link I mean deactivate the port/NIC in software - yes, you can simulate that by unplugging. If the router isn't failing over to the other port immediately, RSTP isn't working correctly. If the Ubiquity can't do it right try a decent switch - it's always better to use a switch for a bridging job.
    – Zac67
    Apr 15, 2020 at 20:34
  • The edgerouter doesn't support RSTP - all the RSTP tests I've done are with a UniFy switch, US-8, in its default configuration. Not sure why it's not acting right.
    – Selvek
    Apr 15, 2020 at 21:06
  • It's essential that the STP bridge has the failing port connected directly - not sure if you had that.
    – Zac67
    Apr 16, 2020 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.