# Creating and Bridging Connections on Startup



## johnpeeb (Mar 15, 2011)

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


```
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.


```
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.


----------



## johnpeeb (Mar 16, 2011)

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.


----------



## SirDice (Mar 16, 2011)

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:

```
cloned_interfaces="tap0 bridge0"
```


----------



## johnpeeb (Mar 16, 2011)

Thanks. That makes sense, and it worked.


----------

