# iocage and vnet using wrong interface



## Farhan Khan (Jan 28, 2019)

Hi all,
I am trying to setup iocage to create a vnet jail and cannot figure out the right series of commands. I have em0 and re0. I want the vnet to bridge to re0, not em0. However, it keeps adding em0 to the bridge. My setup is as follows:

In /etc/rc.conf:

```
cloned_interfaces="bridge0"
# plumb interface re0 into bridge0
ifconfig_bridge0="addm re0 up"
ifconfig_re0="up"
```

I am creating the jail as follows:

```
sudo iocage create -r LATEST vnet=on ip4_addr="vnet0|192.168.2.6/24" -n examplejail1
```
I have also tried using ip4_addr="re0|192.168.2.6/24", but this doesn't add an interface at all in the jail.

Note: em0 is not specified anywhere. But when I do this, it will add em0 to the bridge which seems to DOS attack the entire network. I have read through the documentation, but do not see anywhere where it specifies em0 or re0.

Please assist.


----------



## Farhan Khan (Feb 2, 2019)

Is this a bug? I have not been able to figure this out, thus making iocage's vnet essentially broken.


----------



## monsted (May 26, 2019)

Confirmed. My iocage does the same. I found it in the source code and it appears that 'iocage set vnet_default_interface=none $jail' stops it happening.


----------

