Word of caution: Bridge Interfaces and Jails

TempleHasFallen

Dabbler
Joined
Jan 27, 2022
Messages
34
Hello fellow users,

After countless hours of troubleshooting I am here to hopefully save someone from wasting the same amount of time as me trying to find out what is wrong.

What happened to me was that after a reboot, all my jails were no longer able to communicate with the network at all, without any related configuration having been changed. Somewhere along the ~90 days uptime, I created a bridge interface for a VM to communicate internally with the host.

By default, when adding a bridge interface, all jails cease to communicate and have to be restarted. I added bridge0 and restarted the jails and everything was fine.
However, by default jail vnets bridge to bridge0 (Jail -> Network Properties -> interfaces -> "vnet0:bridge0")

The twist is, if you were to add a bridge interface as bridge0, it will get added as bridge1, until reboot where it is applied bridge0. Therefore all jails were connected to the wrong bridge interface as the default bridge interface seems to always have the lowest possible value after use configured bridges (if you were to have two bridges (bridge0, bridge1), the vnet bridge interface would be bridge2.

It would be nice if a warning could be added or this could be documented somewhere as I feel I'm not the only one who has faced this issue before.
TrueNAS-12.0-U7

So for people that are using jails/plugins with VNET and also want to use bridges:
Do not use bridge0 as your interface name - use bridge1, bridge2, bridge50... as jails use bridge0 by default.
 

Phil1295

Explorer
Joined
Sep 20, 2020
Messages
79
You should file a bug with steps to reproduce
I never thought of using bridge0 hopefully, as I generally use the VLAN tag as bridge ID
 

TempleHasFallen

Dabbler
Joined
Jan 27, 2022
Messages
34
Top