VLAN help with TrueNAS Core VMs

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
I'm beginning to understand I have really no concept how VMs work inside TrueNAS (and I thought I did).

I have two physical network interfaces I'm dealing with: igb0 (1Gb) and sfxge0 (10Gb) networking card. I'm also working with pfsense router and unifi switches.

I have following VLANs declared within pfsense and Unifi (VLAN1=LAN, VLAN20=iOT, VLAN30=Entertainment, VLAN40=Management).

What I'd like to have is:
sfxge0 be associated with VLAN1, VLAN20, VLAN30
igb0 be associated with VLAN40.
truenas GUI should be reachable on the management network at 10.0.40.197

Through a bunch of trial and error and unplugging network cables to various cards, I confirmed there isn't a hardware issue with a broken network card.

So Here is what I've tried to get the setup running (truenas setup):

For VLAN1/20/30 networks:
Within TrueNAS->Network->Interfaces, I've defined 3 VLAN interfaces (labeled vlan1, vlan20, vlan30) and I've associated each VLAN with the sfxge0 parent interface
Within TrueNAS->Network->Interfaces, I've defined 3 separate bridges (labeled bridge0, bridge20, bride30) and associated each with the following members:
bridge0 --> VLAN1
bridge20 --> VLAN20
bridge30 ---> VLAN30


For VLAN 40 network
Within TrueNAS->Network->Interfaces, I've defined 1 VLAN interfaces (labeled vlan40) and I've associated this with the igb0 interface
Within TrueNAS->Network->Interfaces, I've defined 1 bridge (labeled bridge40) and associated with bridge with VLAN40.
Because I want to access the TrueNAS GUI via this network, I actually assigned with igb0, and IP address of 10.0.40.197/24. I actually tried to use an address of 10.0.40.197/32 however this didn't work. Here is a snippet
Screen Shot 2021-09-23 at 5.51.07 PM.png


For the VMs
I have 6 VMs, however for testing purposes initially I set each VM's NIC to be associated to with bridge 0. Here is an example from one of the VMs:
Screen Shot 2021-09-23 at 5.45.16 PM.png



On the Unifi switch I have ports for the sfxge0 and igb0 interfaces
For sfxge0 - I created a trunk port where all information is Tagged (there is no tagged VLAN)
For igb0 - I created a Access port for only VLAN40
Perhaps this is the step I'm failing with since I'm not exactly sure how to configure the switch ports. I thought for a trunk port I would tag everything and then the tag information would be filtered by the various bridges/vlans).

Anyway when I start things up - TrueNAS gets assigned an IP address of 10.0.40.197 (as I wanted), but the VMs all have an IP address within the 10.0.40.x network -- which makes absolutely no sense to me -- since each jail is associated with bridge0/vlan1/sfxge0 -- which has absolutely no association with the 10.0.40.x network.
Here is a view inside one of my running VMs assigned to bridge0.

Screen Shot 2021-09-23 at 6.15.07 PM.png


Honestly I'm kind of stuck where to start here since things aren't making a lot of sense, or I'm not totally understanding what I'm doing.
 
Top