Creating and Bridging Connections on Startup

I want to execute the equivalent of the following on startup (in this specific order).

Code:
ifconfig tap0 create up
ifconfig bridge0 create addm re0 addm tap0 up

This works and correctly when run from the terminal. I tried the following in my rc.conf.

Code:
cloned_interfaces="tap0"
ifconfig_tap0="up"

cloned_interfaces="bridge0"
ifconfig_bridge0="addm re0 addm tap0 up"
However, with this, tap0 is not created and bridge0 has no interfaces added to it. I think the issue might be the order in which these interfaces are created and configured.

Thanks.
 
I ended up just creating a new rc.d script to create the bridge after tap0 and re0 were initialized. If anybody knows how to do it purely through rc.conf, though, I'd still be interested in knowing.
 
Your second cloned_interfaces overrules the first. Keep in mind they are just variables, defining them again will overwrite the previous. Try something like this:
Code:
cloned_interfaces="tap0 bridge0"
 
Back
Top