Thursday, May 27, 2010

Making an OpenBSD Bridge

There's no shortage of documentation showing how to set up a bridge on OpenBSD, but it all assumes you're using a full-blown OpenBSD, where you edit some files in /etc/rc.* and the rc.conf automagically takes care of it for you. When you're using the cut-down environment on a flashdist OpenBSD, none of this magic is done for you - all config is done in a simple /etc/rc file, which is just a shell script. So: what are the *manual* commands to summon a bridge into existence?

The answer is:

# create the bridge interface
ifconfig bridge0 create
# add the network interfaces that are part of the bridge
# these interfaces were already configured to be UP
brconfig bridge0 add vr1
brconfig bridge0 add vr2
# most important: bring the bridge interface up too
# it took me a while to figure this out
ifconfig bridge0 up

No comments:

Post a Comment