TrueNAS-13.0-U6 - Vlan problems.

cradud

Cadet
Joined
Nov 27, 2023
Messages
5
I can't put the same vlan on 2 physical interfaces. I've tried everything here on the forum but I can't. Once I assign the vlan on one physical interface I only manage to put it on the other, it keeps saying that the vlan already has a parent interface. I've tried both from the web interface and from the command line. If I bridge I can't do it with all interfaces because it tells me that one is already assigned to the vlan in question. If I bridge it does loop. How can I tag the same vlan on 2 physical network interfaces? Thank you.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
I can't put the same vlan on 2 physical interfaces. I've tried everything here on the forum but I can't. Once I assign the vlan on one physical interface I only manage to put it on the other, it keeps saying that the vlan already has a parent interface. I've tried both from the web interface and from the command line. If I bridge I can't do it with all interfaces because it tells me that one is already assigned to the vlan in question. If I bridge it does loop. How can I tag the same vlan on 2 physical network interfaces? Thank you.
You need to create the VLANs as interfaces and link them to the physical interface, then create the corresponding bridges and have the VLANs as members.

em0>VLAN10>bridge10

em0>VLAN20>bridge20

etc…

This is assuming your switch is tagging them properly.
 

cradud

Cadet
Joined
Nov 27, 2023
Messages
5
You need to create the VLANs as interfaces and link them to the physical interface, then create the corresponding bridges and have the VLANs as members.

em0>VLAN10>bridge10

em0>VLAN20>bridge20

etc…

This is assuming your switch is tagging them properly.
so i have vlan 100 that i want on ilx01 and ilx02 after i create it and tell it which is the parent interface respectively ilx01 i can't allocate it on ilx02 because it tells me that this vlan is already allocated on the physical interface ilx01, how can i allocate vlan100 on ilx01 and ilx02 ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Name them vlan1100, parent ilx01, tag 100, and vlan2100, parent ilx02, tag 100 - it's the tag that is important, not the name. Different interfaces need different names - TrueNAS is not a switch! Actually just like with any router, these are just tagged subinterfaces. To turn these two into a sort of software switch, create a bridge with both as members.

May I ask what you intend to do with that? If you have one tagged connection to your switch, why a second? If you have two switches, better connect the two switches and only a single TrueNAS interface.
 

cradud

Cadet
Joined
Nov 27, 2023
Messages
5
Name them vlan1100, parent ilx01, tag 100, and vlan2100, parent ilx02, tag 100 - it's the tag that is important, not the name. Different interfaces need different names - TrueNAS is not a switch! Actually just like with any router, these are just tagged subinterfaces. To turn these two into a sort of software switch, create a bridge with both as members.

May I ask what you intend to do with that? If you have one tagged connection to your switch, why a second? If you have two switches, better connect the two switches and only a single TrueNAS interface.
it's about redundant connections, I have two separate switches that both have fiber optic link each on a network card in TrueNas, further I want to use Truenas as storage for Esx machines and add it there. Sw knows vlan, I'm trying to solve the communication problem between truenas network cards and switch then manage to add it in ESX
 

cradud

Cadet
Joined
Nov 27, 2023
Messages
5
now i get this error
The network 192.168.221.0/24 is already in use by another interface.
i have 1 interface vlan 1100 ip 192.168.2.1
second interface vlan 2100 ip 192.168.2.2
.... how i can fix this one ? with other cidr ? /29 or /30 ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
1. Can these switches do multi chassis LACP, sometimes called "stacking"? In that case LACP commonly is a better choice than a bridge.

2. Also do you plan to add more VLANs? If not, why not use the ports untagged and just configure the bridge interface?

3. Make sure to assign the IP address of TrueNAS in that VLAN to the bridge interface and not any of the member interfaces.

4. And last but important: enable spanning tree on the bridge by adding "stp ilx01 stp ilx02" to the Options field in the UI. The default for FreeBSD is STP off, so you can more easily shoot yourself in the foot by connecting a loop, I guess :smile:
 
Last edited:

cradud

Cadet
Joined
Nov 27, 2023
Messages
5
1. Can these switches do multi chassis LACP, sometimes called "stacking"? In that case LACP commonly is a better choice that a bridge.

2. Also do you plan to add more VLANs? If not, why not use the ports untagged and just configure the bridge interface?

3. Male sure to assign the IP address of TrueNAS in that VLAN to the bridge interface and not any of the member interfaces.

4. And last but important: enable spanning tree on the bridge by adding "stp ilx01 stp ilx02" to the Options field in the UI. The default for FreeBSD is STP off, so you can more easily shoot yourself in the foot by connecting a loop, I guess :smile:
Thank you for your answers, the solutions below worked.
2. Also do you plan to add more VLANs? If not, why not use the ports untagged and just configure the bridge interface?
bridge with both 10g interface whitout tag

4. And last but important: enable spanning tree on the bridge by adding "stp ilx01 stp ilx02" to the Options field in the UI. The default for FreeBSD is STP off, so you can more easily shoot yourself in the foot by connecting a loop, I guess
enable spanning tree on the bridge by adding "stp ilx01 stp ilx02" to the Options field in the UI.
 
Top