I have a firewall where I have named vlan interfaces and the IP:s directly on the vlan interfaces. All good there...
Now... To use bhyve with vlans in bridge setups I think I have found a bug (This is just a lab as I usually use SR-IOV...)
Now I have struggled a bit, but now know what is wrong.... This is FreeBSD 12.0p3 relese
#### This is my switch port.
description 'MISC TRUNK - LABORATION'
switchport mode trunk
switchport trunk native vlan 2008
switchport trunk allowed vlan 2-4,21,899,2008
vlan participation exclude 1,999
Setting an IP directly on the vlan interface and it works OK
Setting an IP directly on a bridge not connected to a vlan and it works OK (but of course the switch port must be reconfigured for that first to an access port)
But... if I try to set the IP on the bridge that has a named vlan interface attached, it simply did not work to communicate.
I have used this vlan config scheme below a-lot before, but not with bridges. It looks 100% ok with ifconfig. But it does not work.
#### *NOT* WORKING ####
ifconfig_vlan2_descr="Local LAN network interface (vlan 2)"
ifconfig_LAN_BRIDGE="inet 192.168.0.35/24 addm vlan2 up"
Now... I had to try something... :) so I rewrote the config in a different way. This also looks ok with ifconfig. Bu THIS, THIS WORKS.
#### WORKING ####
ifconfig_re0_2_descr="Local LAN network interface (vlan 2)"
ifconfig_bridge2="inet 192.168.0.35/24 addm re0.2 up"
I think there maybe is a bug. Otherwise, please enlighten me of my stupidity :)