BHYVE briges wrong. Set ifconfig manually?

Dunuin

Contributor
Joined
Mar 7, 2013
Messages
110
Hi,

I've got 2 NICs. 'igb0' with DHCP which is connected to my DMZ subnet and 'em0' without DHCP which is connected to my private subnet.
The jails vnet0:1 to vnet0:7 are bridged via 'bridge0' to 'igb0'. That works fine.

If I create a VM and attach it to the 'em0' interface FreeNAS first does it right and creates a second bridge 'bridge1' which bridges 'em0' and 'tap0'.

But as soon as I reboot FreeNAS the network config gets changed and there is no 'bridge1'. But 'bridge0' also bridges 'em0' and 'tap0' to 'igb0' and all that 'vnet0:X' and it totally destroys the idea of my DMZ.

Is there any way to configure FreeNAS to prevent it? Some fusables to force BHYVE to create and use bridge1 or something?
Or is there a way to tell FreeNAS not no change my ifconfig so I can change it manually without freenas overwriting it?
 

silverback

Contributor
Joined
Jun 26, 2016
Messages
134
Hi,

I've got 2 NICs. 'igb0' with DHCP which is connected to my DMZ subnet and 'em0' without DHCP which is connected to my private subnet.
The jails vnet0:1 to vnet0:7 are bridged via 'bridge0' to 'igb0'. That works fine.

If I create a VM and attach it to the 'em0' interface FreeNAS first does it right and creates a second bridge 'bridge1' which bridges 'em0' and 'tap0'.

But as soon as I reboot FreeNAS the network config gets changed and there is no 'bridge1'. But 'bridge0' also bridges 'em0' and 'tap0' to 'igb0' and all that 'vnet0:X' and it totally destroys the idea of my DMZ.

Is there any way to configure FreeNAS to prevent it? Some fusables to force BHYVE to create and use bridge1 or something?
Or is there a way to tell FreeNAS not no change my ifconfig so I can change it manually without freenas overwriting it?
https://www.ixsystems.com/community/threads/correctly-using-iocage-with-vnet-and-bridge.60181/
This helped me with bridging.
 

Dunuin

Contributor
Joined
Mar 7, 2013
Messages
110
Thank you very much. I think it works now.

I just needed to create bridge1 myself and add 'em0' to it via tunables...

Variable: cloned_interfaces
Value: bridge1
Type: rc

...and...

Variable: ifconfig_bridge1
Value: addm em0 up
Type: rc

BHYVE then creates tap0 and adds it to bridge1 after starting the VM.
 
Top