Vlan not working

What do I miss in my rc.conf ?
Code:
ifconfig_re0="up"
ifconfig_re0_2100="inet 10.212.100.14 netmask 255.255.252.0"
ifconfig_bridge0="addm re0.2100 up"
defaultrouter="10.212.100.254"
and after a reboot of the host I need to run:
ifconfig bridge0 addm re0.2100 up
to obtain contact with the vms
 
Sorry I missed one line. My rc.conf looks like this:

vlans_re0="2100"
ifconfig_re0="up"
ifconfig_re0_2100="inet 10.212.100.14 netmask 255.255.252.0"
ifconfig_bridge0="addm re0.2100 up"
defaultrouter="10.212.100.254"

Is the order wrong?
 
Is the order wrong?
Order in rc.conf is irrelevant.

Replace this:
Code:
ifconfig_bridge0="addm re0.2100 up"
With this:
Code:
autobridge_interfaces="bridge0"
autobridge_bridge0="re0.2100"
 
Sadly that didn't work either.
rc.conf:

vlans_re0="2100"
ifconfig_re0="up"
ifconfig_re0_2100="inet 10.212.100.14 netmask 255.255.252.0"
autobridge_interfaces="bridge0"
autobridge_bridge0="re0.2100"
defaultrouter="10.212.100.254"

I still need to manually enter:
ifconfig bridge0 addm re0.2100 up
 
I started to look at this problem yesterday again and now I finally got it working like I wanted. First I had to set all the vlan on the sw to tagged and treat the re0 as an uplink.
The server runs several vm's that i manage with vm-bhyve. The main problem was that my vm's on the same vlan as the host did not work on that net. My rc.conf got a little simpler:

vlans_re0="2100"
ifconfig_re0="up"
ifconfig_re0_2100="inet 10.212.100.14 netmask 255.255.252.0"
defaultrouter="10.212.100.1"

To get the vm's to access the same vlan as the host I only had to add the re0.2100 to the vm bridge:
vm sw create public

The bridge got the name vm-public (bridge0).

ifconfig vm-public addm re0.2100 up

and it worked :)

The rest of the vlan net was straigth forward
vm sw create adm-net
vm sw vlan adm-net 200
vm sw add adm-net re0
 
Back
Top