Solved Ethernet-based Protocol Redundancy with Multiple Switches

Hello everyone,

I know this is an old topic, but I’m in need of a workaround solution.

I have a FreeBSD PC with two network interfaces (eg0 and eg1), both on the same subnet. The setup is intended for UDP redundancy, where eg0 is the main interface used for data transfer. When eg0 fails, eg1 should take over, using logic within a specific application. This setup works perfectly on Windows, but I’m facing issues on FreeBSD.

While FreeBSD supports lagg for interface bonding, both interfaces must be connected to the same device (e.g., a switch). My scenario involves each interface connected to a separate switch before routing to the same device (the device has 2 switched ports).

Is there a solution for this kind of setup on FreeBSD? Like NIC bonding/teaming?

Thanks in advance for your help!
 
While FreeBSD supports lagg for interface bonding, both interfaces must be connected to the same device (e.g., a switch). My scenario involves each interface connected to a separate switch before routing to the same device (the device has 2 switched ports).

Is there a solution for this kind of setup on FreeBSD? Like NIC bonding/teaming?
bridge(4) + STP
 
Hello SirDice,

I really appreciate your recommendation.

Apologies for my ignorant question, as I’m new to this industry. If I use a bridge for two interfaces, em0 and em1, it means I’m trying to bridge them together, which could potentially cause a network storm. Is that why STP comes into play?
 
Is that why STP comes into play?
Correct. STP prevents loops from happening. Care must be taken when setting up STP (or rSTP) though. The root bridge needs to be set up correctly, or else connecting a new switch to your network could take down the entire network for several minutes. So best left to a good network engineer.

 
If your switches support ERPS (Ethernet Ring Protection Switching) you can get a sub 50ms switching from the failed to the working link. STP/RSTP are quite slow in this, compared to ERPS and take a lot of CPU load on the switch. Unfortunately not all switches support ERPS.
The scheme will require link between your two switches and links from your BSD box to each of the two switches. Of course you could have a much larger network of ring-connected switches.
Another option is to use MLAG which is also not available on all switches. The naming of this feature could be different on different vendors. You should check the documentation.
 
Back
Top