How can I utilize a Gif/GRE tunnel to reach a VLAN from a bridge when only having WiFi?

I am using vm-bhyve to manage VM's, I create a switch with something like vm switch create -i igb0 public all works fine as expected but now I would like to create VM's in another network segment the one I can only access via VLAN, the problem is that I have only Wi-Fi and can't send the vlan id.

For now, I am trying to create a bridge between a gif tunnel (can't make it with GRE maybe is not supported in the bridge) and vlan, something like this:
Code:
ifconfig gif0 create tunnel 192.168.1.10 172.16.1.1 mtu 1500 up
ifconfig igb0.20 create vlan 20

ifconfig bridge create name vm-test
ifconfig vm-test addm igb0.20 addm gif0

I add the IP of the VLAN to the bridge: ifconfig vm-test inet 172.16.1.2/24 but can't reach it.

Any ideas?
 
Last edited by a moderator:
Yes, but the access point that I am using doesn't support VLANS: here is a picture of the setup:
download-1.png
 
Code:
ifconfig igb0.20 create vlan 20
I'm assuming igb0 is connected to the switch. Did you enable VLAN 20 on the switch port? You're creating an interface that will encapsulate traffic on igb0.20 with a VLAN header and send it out on igb0. If your switch is not aware of this the traffic will go nowhere. Note that you will have tagged and untagged traffic on that port now.
 
I'm assuming igb0 is connected to the switch. Did you enable VLAN 20 on the switch port? You're creating an interface that will encapsulate traffic on igb0.20 with a VLAN header and send it out on igb0. If your switch is not aware of this the traffic will go nowhere. Note that you will have tagged and untagged traffic on that port now.
No, it is connected to the AP, the switch is allowing all traffic, as you properly mention tagged and untagged traffic currently.
 
Back
Top