Hello folks,
first post and an avid fan of the Lawrence Systems YT channel.
TL:DR: I have too many NICs and VLANs on my TrueNAS server…
The long story is:
Yesterday evening I successfully setup a lot of TrueNAS vlan interfaces and bridges etc. And now it came down to my storrage vlan. I guess this is more of a best practice question, but let me lay down the setup real quick.
I have the following VLANs
VLAN10 - Servers
VLAN11 - Workstations
VLAN12 - IoT Devices
and the following NICs
eno1
eno2
eno3
I setup a vlan interface and bridge on eno 2 for a Syncthing app container for VLAN12 (to sync some things from phones and tablets) and I setup another vlan interface and bridge on eno 3 for Jellyfin for VLAN12.
Now I wanted to have my storage connection on eno1 in VLAN10 and VLAN11. And this is where my lack of knowledge showed regarding bridges. I thought they kind of act like a switch and I can have several vlan interfaces as members under the same bridge. Meaning tagged traffic comes into the bridge…and then the bridge routes and says“ah that’s VLAN10…there you go”. But I learned that I have to have a bridge per vlan interface and also a separate IP per vlan ON the bridge (and not the vlan interface).
So now I have two ways to go:
- Let my unifi switch do the routing between vlans. Means on the port on the switch that runs to eno1, I only allow traffic from vlan10 and vlan11 (native = none) and I don’t have vlan and bridges on TrueNAS at all.
- I create a vlan and bridge for each vlan id and every NIC on TrueNAS, set the tagged traffic on the switch port to the vlans.
Does that make sense? Did I get this right?
Advantage of 1 feels like it’s way easier to setup and maintain, because I only handle switch ports and vlans on the switch. But I also route every storage traffic through the switch and the firewall, correct?
Advantage of 2 is, that I have a little TrueNAS connection sitting in every VLAN and devices have storage access without much traffic on the firewall. But I will have about 5 pairs of vlan interfaces and bridges and additional ip addresses and all that mumbo jumbo stuff happening on TrueNAS.
Also my mind kind of blocks the fact that there is a NIC in truenas that has 3 bridges on it all with their own IP. How does that look like on the switch? Which device will be shown on my layer 2 USW-24-G2 unifi switch in the port view? I am baffled.
So what would you do? Go with option one and let the switch do all the lifting…or go with option two? And what happens if ….tadaaaa… I pull eno4 out of my NIC-hat and I want to bond it with eno1 for redundancy and capacity? More vlan interfaces and bridges?
Awful complicated stuff for my little brain ^^
Thanks for any advice and opinions and help.