siconic
Explorer
- Joined
- Oct 12, 2016
- Messages
- 95
I have been using Freenas for a few years now, and love a lot of the new features, especially bhyve. I was able to take down all of my other VM servers (3 of them), and consolidate everything into one server because of it.
My problem is however, and the one thing I cant seem to figure out, how do I get the tap interfaces to bridge automatically?
When the server reboots, the tap interfaces show up in ifconfig, and are reporting "up", but are not in my "bridge0" group. bridge0 is created by FreeNAS for the Jails. I have to manually add the bhyve (iohyve) tap interfaces with "ifconfig addm tap0..." and then stop and start each iohyve machine to obtain an IP, and then everything works like it should.
I have tried everything I can think of. I modified the /etc/rc.conf by adding ifconfig_bridge0="addm tap0...", I tried adding tunables, I tried this:
etc. No method I have tried works.
Any ideas?
I did consider a script, but I don't really want to do that if there is a better or simpler way. I suspect it has something to do with the timing of the bridge interface being created by freenas for the jails and if I could add the tap interfaces AFTER the bridge interface is created then it would work. But I am not sure how to do that in FreeBSD, or at what point FreeNAS creates the bridge interface. Maybe create the bridge interface from rc.conf?
My problem is however, and the one thing I cant seem to figure out, how do I get the tap interfaces to bridge automatically?
When the server reboots, the tap interfaces show up in ifconfig, and are reporting "up", but are not in my "bridge0" group. bridge0 is created by FreeNAS for the Jails. I have to manually add the bhyve (iohyve) tap interfaces with "ifconfig addm tap0..." and then stop and start each iohyve machine to obtain an IP, and then everything works like it should.
I have tried everything I can think of. I modified the /etc/rc.conf by adding ifconfig_bridge0="addm tap0...", I tried adding tunables, I tried this:
- /conf/base/etc/sysctl.conf
net.link.tap.up_on_open=1
- /boot/loader.conf
vmm_load="YES"
nmdm_load="YES"
if_bridge_load="YES"
if_tap_load="YES"
- /conf/base/etc/rc.conf
cloned_interfaces="tap0"
ifconfig_bridge0="addm tap0"
etc. No method I have tried works.
Any ideas?
I did consider a script, but I don't really want to do that if there is a better or simpler way. I suspect it has something to do with the timing of the bridge interface being created by freenas for the jails and if I could add the tap interfaces AFTER the bridge interface is created then it would work. But I am not sure how to do that in FreeBSD, or at what point FreeNAS creates the bridge interface. Maybe create the bridge interface from rc.conf?