Reboot causes jail bridge network to fail

blake7

Cadet
Joined
Oct 1, 2019
Messages
2
For my current setup all my jails are configured to use vnet0 interfaces. Under the network settings I specifically set them to "vnet0:bridge0". When I look at ifconfig this causes them to have the name vnet0:1, vnet0:2 ... vnet0:n for each jail. My VMs are configured with tap interfaces listed as tap1, tap2 ... tapn. When I reboot my primary network interface igb1 used to be assigned to bridge0 every time. When I ran ifconfig I could see my system had 1 bridge named bridge0 and it contained igb1 as well as all the vnet0:n and the tapn interfaces. Recently I've had an issue after rebooting that igb1 and all the tapn are listed under bridge1 while all the vnet0:n are listed under bridge0. This causes my VMs to have network access but not my jails. If I use "sudo iocage console jailname" I can see the jail is running, that it can ping other jail IPs, but not google.com or my laptop IP on the LAN. If I manually change the interface for each jail to vnet0:bridge1 they gain network access and work as expected. But as soon as I reboot they lose access again. I tried changing a few jails to use vnet0:bridge1, then rebooted. My primary interface igb1 went back to the bridge0 interface along with all of my VM tapn interfaces and all of my vnet0:bridge0 jails but not my vnet0:bridge1 jails. I tried creating a blank jail to occupy bridge0 to force igb1 to bridge1 where I configured all my jails but I then realized that igb1 went back to bridge0 while my jails were on bridge1. After playing around it seems to attach igb1 to bridge1 if vnet0:1 is already on bridge0. This suggests the order matters or that igb1 is avoiding being on the same network as certain jails.

So my question is what determines which bridge interface igb1 connects to on boot and how can I reliably get it to attach to bridge0 every boot? I tried running a command on boot but it doesn't work (ifconfig bridge0 addm igb1 up).

Thanks for any help! I'm running 11.2-U5 currently.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You can do it with a tunable...

1570790911657.png
 

blake7

Cadet
Joined
Oct 1, 2019
Messages
2
This worked perfectly! Thank you! I just learned about the tunable section of FreeNAS and what it does from the manual. Thanks!
 
Top