@Kennyvb8: I think I recently ran into and fixed the problem that you were experiencing, locking yourself out. The issue shows up when you use a non-physical interface, such as a lagg (in fact, I believe that the lagg interfaces are the only type of enumerated interfaces that FN supports in their rewrite of the rc.conf variables). Here's what's going on:
During boot, sysrc sources /etc/defaults/rc.conf, which includes the /etc/rc.conf and /etc/rc.conf.local files. The /etc/rc.conf.local file has been rewritten by FN to query the database for its persistent configuration and echo them into rc.conf-style formats. In that file, in the "interface_config" function, at line 251 in v11-2U5, there is the only mention of "cloned_interfaces":
Code:
251 if [ -n "${lagg_id}" ]; then
252 cloned_interfaces="${cloned_interfaces} ${interface}"
253 echo "cloned_interfaces=\"${cloned_interfaces}\""
254 fi
Here, is where it creates the first (only) instance of the "cloned_interfaces" keypair.
The problem comes in when you attempt to create a tunable with the same name as something important, as the code doesn't check if there is already a keypair existing (really, it would be very hard to do this sort of check). It happens at line 873 of the same file:
Code:
873 local tun_var tun_value
874 ${FREENAS_SQLITE_CMD} ${FREENAS_CONFIG} "SELECT tun_var, tun_value FROM system_tunable WHERE tun_enabled = 1 AND tun_type = 'rc' ORDER BY id" | \
875 while read -r tun_var tun_value; do
876 echo "${tun_var}=\"${tun_value}\""
877 done
If you create an rc-type tunable that creates another instance of the "cloned_interfaces" keypair, then as sysrc sources this file, it overwrites the first instance of it, which inhibits the enumeration of the lagg interface, and ultimately breaks the networking on your system during boot.
To work around this, you can set the "cloned_interfaces" keypair equal to itself before adding the non-physical interfaces you wish to enumerate:
Code:
Name: cloned_interfaces
Value: ${cloned_interfaces} bridge41 bridge99
I see that some are using the ifconfig_* options for the bridges to manually add interfaces during boot. While searching for how to get what I was trying to do working, I ran into the autobridge_* options. Some may want to look into them as well. You specify the bridge interfaces that you want it to look for, and when it is enumerated, it will automatically put the interfaces you need into it:
Code:
autobridge_interfaces="bridge41 bridge99"
autobridge_bridge41="vlan41"
autobridge_bridge99="vlan99"
I used these tunables to help build bridges that I know will always be connected to the VLANs that I want. I've had mixes results leaving it up to warden and iocage to set the correct VLANs, and when I upgraded from 11-1U6 to 11-2U5, the bridges got swapped. Now with those manually set bridges above, I set my jails, both warden and iocage, to use those specified bridges:
Code:
iocage set interfaces="vnet0:bridge99" cage1
warden set bridge-ipv4 wardenjail1 bridge41
Hope some or all of this helps someone.
xDan0maNx