OpenBSD Interface Bonding

From NSMWiki
Jump to: navigation, search

The following is used on OpenBSD since version 3.9 to combine two physical interfaces (fxp1, fxp2) into a single virtual interface (trunk0). This method allows one to take the feeds from a traditional two-output tap and present a single virtual interface to NSM applications.

# ifconfig fxp1 up
# ifconfig fxp2 up
# ifconfig trunk0 trunkport fxp1 up
# ifconfig trunk0 trunkport fxp2 up
# ifconfig trunk0 trunkproto roundrobin up

To make this configuration permanent between reboots:

echo "up" > /etc/hostname.fxp1
echo "up" > /etc/hostname.fxp2
echo "trunkproto roundrobin trunkport fxp1 trunkport fxp2" > /etc/hostname.trunk0

Remember to replace fxp1 and fxp2 with the network interfaces on your OpenBSD system (e.g., em0, xl0, rl0, etc.).

OpenBSD 3.8 only supported the round robin trunk protocol.


I believe I first heard of this technique here.