bridge vlan on LACP laggs

jlmasterson

Cadet
Joined
Nov 7, 2021
Messages
2
I find myself struggling with TrueNAS network setup. I've read through the FreeBSD and TrueNAS forums, I think it should work, but alas it's not.

My setup:

I have 2x dual-port 10GB Intel cards connected to two Cisco 4500X switches running rapid-pvst. Port 0 of each 10GB card (ql0 & ql2) go to switch 4500X-A and Port 1 of each 10GB card (ql1 & ql3) go to 4500X-B. On each switch I have the same configuration: Te1/5 & Te1/5 associated with port-channel 25, trunk mode, allowed VLANs 150 (general use) & 250 (NAS traffic). On the TrueNAS side I have 2 LAGGs setup, lagg1 (ql0,ql2) & lagg2, (ql1,ql3) both using LACP enabled. I then created VLANs for the general use network, vlan10150 with a parent interface of lagg1 and vlan20150 with a parent interface of lagg2. I then created bridge150 with bridge members vlan10150 and vlan20150 and gave bridge150 an appropriate IP address. I have not setup the VLAN 250 interfaces on the TrueNAS server yet. Also, switch 4500X-A is configured as the primary root bridge for VLANs 150 & 250 while 4500X-B is configured as the secondary.

1636279048955.png


4500X-A: spanning-tree mode rapid-pvst spanning-tree extend system-id spanning-tree vlan 110,130,150,250 priority 24576 spanning-tree vlan 120,135,160 priority 28672 interface Port-channel25 switchport switchport trunk allowed vlan 150,250 switchport mode trunk end interface TenGigabitEthernet1/5 switchport trunk allowed vlan 150,250 switchport mode trunk channel-protocol lacp channel-group 25 mode active end interface TenGigabitEthernet1/6 switchport trunk allowed vlan 150,250 switchport mode trunk channel-protocol lacp channel-group 25 mode active end 4500X-B: spanning-tree mode rapid-pvst spanning-tree extend system-id spanning-tree vlan 110,130,150,250 priority 28672 spanning-tree vlan 120,135,160 priority 24576 interface Port-channel25 switchport switchport trunk allowed vlan 150,250 switchport mode trunk end interface TenGigabitEthernet1/5 switchport trunk allowed vlan 150,250 switchport mode trunk channel-protocol lacp channel-group 25 mode active end interface TenGigabitEthernet1/6 switchport trunk allowed vlan 150,250 switchport mode trunk channel-protocol lacp channel-group 25 mode active end

Results:

Enabling the "A" side network ports works,the port-channels come up and I can do a "tcpdump -i bridge150" on the TrustNAS server and see STP traffic (among other things). I can ping and traceroute to the general use router and everything is OK. However, when I look at ifconfig bridge150 I don't see a STP root id and when I enable the "B" side of the network everything goes awry, a layer 2 loop is created and the network loses its mind. Obviously STP is not functioning within TrueNAS. To resolve the loop I have the "B" side network ports shutdown.


1636276707942.png


Any help is greatly appreciated.

J
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yes, the FreeBSD bridge has STP set to off by default. You can enable it by putting the appropriate options into the "Options" field.

Documentation is here:

You might need to set spanning-tree mode to pvst instead of rapid-pvst - I don't know how compatible Cisco proprietary rapid-pvst is with standard implementations. Apart from that you did everything correct, IMHO. Specifically don't try to put a bridge on laggX and VLANs on top of that - the FreeBSD stack does not work that way.
 
Last edited:

jlmasterson

Cadet
Joined
Nov 7, 2021
Messages
2
Thank you. I read that and I assumed, based on ifconfig output that, since stp-rstp was listed, that it was already enabled. We have been using rapid-pvst because of the rstp support shown in the ifconfig output for TrueNAS.

So this presents a dilemma based on the docs:

"
STP can be enabled on member interfaces using ifconfig(8). For a bridge with fxp0 and fxp1 as the current interfaces, enable STP with:

# ifconfig bridge0 stp fxp0 stp fxp1
"

TrueNAS doesn't allow one to specify options "per member", the bridge interface has one Options field for "additional parameters", but nothing that states it's applied on each bridge member.

I tried issuing the following on the command line:

ifconfig bridge150 stp vlan10150 stp vlan20150

and I get the message

ifconfig: unable to set bridge flags: Invalid argument

Is there some place I can see the raw configuration and examine if stp is applied to each vlan?


J
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Top