TrueNAS Core, VMs, and VLANs

I’ve been playing around with TrueNAS Core and bhyve VMs lately. I’m trying to get the network stack working correctly. It seems to work fine when I attach the VMs to the untagged interface. The VMs can talk out to the rest of the network and even the truenas host with no issues. The problem happens when I try to use VLANs. When I put VMs on a VLAN network, they can talk to other VMs (and the host) on that VLAN fine, but they can’t talk to the rest of the network. Even stranger, a physical machine on that same VLAN can receive pings from the VMs, but the replies never seem to arrive back at the VMs. I even port mirrored the interface on the TrueNAS to make sure. They’re coming out of the switch tagged correctly, but FreeBSD doesn’t seem to be passing them to the VMs.

Wondering if anyone has any clues for this? Thanks.

After much digging and experimentation I figured out the answer. Apparently I can have tagged VM traffic, or untagged traffic, but not both on one interface. I’m not sure if that’s intentional, or a limitation, or actually a bug, but that’s what’s going on.

2 Likes