Troubleshooting Spanning-Tree

Hello team,

There is a tiny typo in the topologies in the following scenarios: “Spanning-Tree Disabled”, “BPDUs Blocked” and “VLAN Inactive on Interface”. Interfaces between SW1 and SW3 should be Fast Ethernet instead Ethernet.
image

Thanks

1 Like

Thanks Boris, just fixed this.

Rene

Hi all, I’m new here so I’m not sure if the following has been answered.
Say if I were to have a HPE core switch on vlan 5, and my Cisco switch is configured like below:

interface GigabitEthernetX/X
  switchport trunk allow vlan 5
  switchport trunk native vlan 5
  switchport mode trunk
end

I’m not getting the spanning-tree on vlan 5 though. shouldn’t it be auto?
my spanning-tree mode is rapid-pvst

Hello Genesis

First of all, you have to make sure that the HP switches you are using support rapid-pvst. I am not familiar with HP equipment, but doing a quick search revealed that some HP platforms support it and some do not.

Secondly, I’m not quite sure what you mean when you say: “I’m not getting the spanning-tree on vlan 5”. In any case, it’s good to know about how PVST behaves when the native VLANs are changed:

Specifically, if the native VLAN is VLAN 1, then:

  • VLAN 1 standard STP BPDUs are sent untagged
  • VLAN 1 PVST and RPVST BPDUs are sent untagged
  • all other VLAN’s BPDUs are sent tagged with the VLAN to which they belong

If the native VLAN is different from VLAN 1, which is your case:

  • VLAN1 standard STP BPDUs are sent untagged
  • VLAN1 RPVST PBDUs are sent tagged with a tag of VLAN1
  • Other VLAN RPVST BPDUs are sent tagged except for the BPDUs corresponding to the native VLAN.

So in your case, you should see BPDUs on VLAN5 being sent on the trunk untagged since you have defined VLAN5 as the native VLAN.

Hopefully, this will help you in your troubleshooting… If you have any more specific questions, please let us know…

I hope this has been helpful!

Laz

Hi,

"A scenario I encountered before is a customer that was told by their wireless vendor to disable spanning-tree for the interfaces that connect to the wireless access point. This is what the customer typed in on the switch:

SW3(config)#interface fa0/1
SW3(config-if)#no spanning-tree vlan 10

"

In the above case, would the correct solution be to configure Portfast on the Interface?

Hello Samad

This configuration is correct. If you want to completely disable spanning tree you must use the no spanning-tree command. Enabling portfast on the interface will not disable spanning tree.

Take a look at this lesson to learn more about the difference:

I hope this has been helpful!

Laz

Hi dears Rene, Lazaros and all wonder networklesson team.
I have a big question that i will appreciate so much your help.
I have 4 cores switches that connect my two offices. These Core Switches are distributed two in the headquarters 1 and also two in headquarters 2. In both headquarters the switches are connected by HSRP. And the switches are on through a dark fiber that interconnects as follows: Eth 1/37 of Swichcore1-Plaza connects to Eth1/37 of Switchcore1-Che and Eth 1/37 of Switchcore2-Plaza that connects to Eth 1/37 of Switchcore2-Che. It is worth noting that Plaza corresponds to headquarters 2 and Che corresponds to the headquarters 1. However, in these interconnection interfaces of these Switches I am transporting vlans, according to the configurations below:

  1. Switch-Core1 - Plaza:
interface Ethernet1/37
  description *** Fibra Escura TvCabo swbnicoreche01 Eth1/37 ***
  switchport mode trunk
  switchport trunk allowed vlan 1-2,4,6,32,104,144-145,150,187,190,192-193,204,2
47,250,402-408,413,450-451,500,999
  spanning-tree vlan 104 port-priority 32
  1. Switch-core2 - Plaza
interface Ethernet1/37
  description *** Fibra Escura Connectis swbnicoreche02 Eth1/37 ***
  switchport mode trunk
  switchport trunk allowed vlan 1-2,4,6,32,104,144-145,150,187,190,192-193,204,2
47,249-250,402-408,413,450-451,500,999
  spanning-tree vlan 104 port-priority 64
  speed 1000
  duplex full
  1. Switch-core1 - Che.
interface Ethernet1/37
  description *** Fibra Escura TvCabo swbnicoreplaza01 Eth1/37 ***
  switchport mode trunk
  switchport trunk allowed vlan 1-2,4,6,32,104,144-145,150,187,190,192-193,204,2
47,250,402-408,413,450-451,500,999
  spanning-tree vlan 104 port-priority 64
interface Ethernet1/37
  description *** Fibra Escura Connectis swbnicoreplaza02 Eth1/37 ***
  switchport mode trunk
  switchport trunk allowed vlan 1-2,4,6,32,104,144-145,150,187,190,192-193,204,2
47,249-250,402-408,413,450-451,500,999
  spanning-tree vlan 104 port-priority 96
  speed 1000
  duplex full

But I did tests and noticed that the traffic of the networks of these vlans are not going through the desired path that is through Layer 2, through these trunk links.
Then, I made the command “Show int eth 1/37 trunk” on all Switches and I noticed the output as shown in the image below:

--------------------------------------------------------------------------------
Port          Native  Status        Port
              Vlan                  Channel
--------------------------------------------------------------------------------
Eth1/37       1       trunking      --

--------------------------------------------------------------------------------
Port          Vlans Allowed on Trunk
--------------------------------------------------------------------------------
Eth1/37       1-2,4,6,32,104,144-145,150,187,190,192-193,204,247,250,402-408,413
,450-451,500,999

--------------------------------------------------------------------------------
Port          Vlans Err-disabled on Trunk
--------------------------------------------------------------------------------
Eth1/37       none

--------------------------------------------------------------------------------
Port          STP Forwarding
--------------------------------------------------------------------------------
Eth1/37       1-2,4,6,32,104,144,187,190,192,204,247,250,402-404,406,408,413,451

--------------------------------------------------------------------------------
Port          Vlans in spanning tree forwarding state and not pruned
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Port          Vlans Forwarding on FabricPath
--------------------------------------------------------------------------------

In this case I would really like to get your help to understand why “Vlans in spanning tree forwarding state and not pruned” is empty. is this the reason
traffic does not go through the trunk link? How can I reverse this? Thanks in advance.

Hello Zovo

I think I got most of the situation, but there are still a few questions I have before I can give a definitive answer. From your description, this is the topology I get:

Here are my questions:

  1. First of all, is this topology correct?
  2. Please give additional information about whether or not the cores at each site are interconnected with a trunk link between them or not, and what VLANs are allowed there. I didn’t add that in, because it wasn’t mentioned.
  3. The output you see from the show interface ethernet 1/37 trunk is the same on all four core switches? None of the switches are forwarding any VLANs on these trunks?
  4. You mention that:

What is the actual path that traffic is going through? Is there another link between these two HQ sites?

Let us know these details so that we can continue to help you in your troubleshooting process.

I hope this has been helpful!

Laz

Hi dear @lagapidis Thanks for your attention.

  1. Yes. The topology is correct.

  2. To interconnect the Cores in each sites I´m using the portchannel.
    image
    image
    The output of “Sho running int eth1/51 and 1/52”
    image
    The output of “sho int eth 1/51 or 52 trunk”


    This is the same cenario for the four all cores Switches.

  3. yes. I´m pasting all output.
    HQ 1 - Swcore 1

HQ 1 - Swcore 2

HQ2 - Swcore 1

HQ2 - Swcore 2
image

  1. Yes, between these two sites I have another path that is through Layer 3, that is, it goes through the Router. But if I’m loading the Vlans on the trunk links, it’s supposed to not go through the router, but through the trunk link, which is not happening. But before that it was already going through the trunk link.

Hello Zovo

It looks like all the VLANs are forwarding, but all of them are also being pruned. Pruning takes place when one switch has no active ports on a particular VLAN. That switch informs its neighboring switch of this, and thus the neighboring switch “prunes” that VLAN such that no traffic from that VLAN traverses the link. This is done to preserve bandwidth, especially for broadcast traffic. More on pruing can be found in the following lesson:

Note that pruning takes place only when you have VTP enabled. Now, having said that, I don’t know more about your particular topology to verify that this is indeed the issue here, but it may help you in your troubleshooting process.

I see that all of your VLANs are also pruned across your vPC connection between the two switches, which is unusual. Hopefully, the above information will help you to further investigate.

I hope this has been helpful!

Laz

Many Thanks dear @lagapidis for your inputs. it has been very helpfull.

1 Like

Hello Laz ,

i Have two Switches A and B are connected on Interfaces A/g1/0/50 - B/1/0/49 the link is Trunk native Vlan is 2331 . The Inetrface 1/0/50 on Switch A flaps up/down , on Switch B the Message has been received :

%SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 2 on GigabitEthernet1/0/49 VLAN2331.
%SPANTREE-2-BLOCK_PVID_PEER: Blocking GigabitEthernet1/0/49 on VLAN0002. Inconsistent peer vlan.
: %SPANTREE-2-BLOCK_PVID_LOCAL: Blocking GigabitEthernet1/0/49 on VLAN2331. Inconsistent local vlan.
%SPANTREE-2-BLOCK_PVID_PEER: Blocking GigabitEthernet1/0/49 on VLAN1306. Inconsistent peer vlan.
%SPANTREE-5-ROOTCHANGE: Root Changed for vlan 1329: New Root Port is GigabitEthernet1/0/50. New Root Mac Address is 7cad.4fde.2b00

after that Switch B has blocked all Vlan on Port g1/0/49 and then Spanning Tree on Switch B selected another Port as root Port to Switch A .
can You explain me what happened on Switch B and why Spanning Tree on Switch B has blocked all Vlans on Port g1/0/49 ?
Thanks in Advanced .

Hello Mohammad

The “Received BPDU with inconsistent peer VLAN id 2” error message indicates that the specified interface has received a BPDU that is tagged with a VLAN ID that does not match the VLAN ID on which the BPDU was received. This happens when the native VLAN is inconsistent on both ends. It seems that switch A has VLAN 2 set up as the native VLAN. Take a look at your configuration on both ends once again to verify.

For more information, take a look at this Cisco community thread:

I hope this has been helpful!

Laz

Hello Laz ,
Thank you very much for your Replay , The native Vlan on both Switches are the same " 2331 "but the Interface g1/0/50 in Switch A as i already mentioned flapped up/down and that what has caused the Blocking on all Vlans on Interface G1/0/49 . ! is there any other reason for this except the false native Configured Vlan on The Trunk ??

Hello Mohammad

Why is Gi1/0/50 on Swich A flapping? Is there a reason for that? If we know the reason, then we can better understand why we are getting these messages on Switch B.

As for the error messages, note the following:

%SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 2 on GigabitEthernet1/0/49 VLAN2331.

This message says that the BPDU received had a peer VLAN of 2. This should not be 2, but should be 2331. This message occurs whenever the BPDU is tagged with a VLAN ID that does not match the VLAN ID on which the BPDU was received. This happens when the native VLAN is incorrectly configured. Could it be that the flapping of the port on Switch A is due to an inconsistent configuration? Let us know about that so we can help you further with your troubleshooting.

I hope this has been helpful!

Laz