Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spanning-tree root bridge selection problem...

Status
Not open for further replies.

saharac

Technical User
Apr 6, 2011
5
0
0
US
Hey Guys, I am setting up a lab exercise and came across this unusual problem when implementing the lab...
The lab is for a simple illustration of STP and its a simple setup with 3 switches: Switch1(3560), Switch2(3550) and Switch3(3560 PoE) connected in a full mesh that looks like a triangle..
I have not made any configurations, all switch ports are in access mode and am using cross-over cables to connect the switches to each other. The switch ports are auto-negotiating to 100/full.

The problem is: Switch2 has the lowest MAC and becomes the Root Bridge and this is acknowledged by Switch3. But Switch1 has a higher MAC than Switch2, and it still claims to be the Root Bridge. Because of this there is a loop and I get a flapping MAC address message.
I tried forcing the root priority values on Switch1 and Switch2, so as to make Switch2 the root, but that does not work and am having the same issue.
I also noticed that Switch1 was not receiving any BPDU messages, only sending them. Switch2 is reciveing and sending BPDU messages, and is correctly neglecting the Switch1 BPDU claims to be root.

I replaced Switch1 with a 4948 switch, and STP works correctly.
I don't know if the problem is with the physical switch itself or if there is some configuration on 3560 switches that I am unaware of.

Appreciate your replies.

Thanks.
 
Sounds like a config problem . Never have any issue with any of those switches . On the switch you want as the the root use the "spanning-tree vlan X root primary command. Verify your trunking is setup correctly across the setup . As they are all IOS switches all trunking parameters should be the same. Verify your layer 2 vlans are setup across all switches.
 
How have you confirmed that Switch1 is not receiving BPDUs? If that's true, it would explain the root conflict (Switch1 declares itself root until told otherwise, and if no BPDUs are coming in it'll never hear otherwise). Can you post the configuration of Switch1, and whatever diagnostic info you used to confirm that it could not receive BPDUs?

CCNP, CCDP, CCIP
Core Network Planner, ISP
 
Switch1:

Switch1#sh run
hostname Switch1
!
no aaa new-model
system mtu routing 1500
ip subnet-zero
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!

Switch1#sh spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 001e.794e.2a00
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 001e.794e.2a00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------

Fa0/2 Desg FWD 19 128.4 P2p
Fa0/3 Desg FWD 19 128.5 P2p

Switch1#sh spanning-tree detail

VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 001e.794e.2a00
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set
Number of topology changes 1 last change occurred 00:10:04 ago
from FastEthernet0/2
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 1, topology change 0, notification 0, aging 300

Port 4 (FastEthernet0/2) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.4.
Designated root has priority 32769, address 001e.794e.2a00
Designated bridge has priority 32769, address 001e.794e.2a00
Designated port id is 128.4, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 316, received 0

Port 5 (FastEthernet0/3) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.5.
Designated root has priority 32769, address 001e.794e.2a00
Designated bridge has priority 32769, address 001e.794e.2a00
Designated port id is 128.5, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 308, received 0



Switch1#sh vtp status
VTP Version : running VTP1 (VTP2 capable)
Configuration Revision : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
VTP Operating Mode : Server
VTP Domain Name :


On Switch2:

hostname Switch2
!
no aaa new-model
ip subnet-zero
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface FastEthernet0/1
switchport mode access
!
interface FastEthernet0/3
switchport mode access


Switch2#sh spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000e.843a.c780
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000e.843a.c780
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Desg FWD 19 128.3 P2p


Switch2#sh spanning-tree detail

VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 000e.843a.c780
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set
Number of topology changes 1 last change occurred 00:06:24 ago
from FastEthernet0/1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300

Port 1 (FastEthernet0/1) of VLAN0001 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 000e.843a.c780
Designated bridge has priority 32769, address 000e.843a.c780
Designated port id is 128.1, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 208, received 1

Port 3 (FastEthernet0/3) of VLAN0001 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.3.
Designated root has priority 32769, address 000e.843a.c780
Designated bridge has priority 32769, address 000e.843a.c780
Designated port id is 128.3, designated path cost 0 Hello is pending
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 394, received 197


Switch2#sh vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
VTP Operating Mode : Server


On Switch3:

hostname Switch3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
!
power redundancy-mode redundant
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface GigabitEthernet1/3


Switch3#sh spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000e.843a.c780
Cost 19
Port 1 (GigabitEthernet1/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0017.9444.f8c0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi1/1 Root FWD 19 128.1 P2p
Gi1/3 Desg FWD 19 128.3 P2p

Switch3#sh spanning-tree detail

VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 0017.9444.f8c0
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32769, address 000e.843a.c780
Root port is 1 (GigabitEthernet1/1), cost of root path is 19
Topology change flag not set, detected flag not set
Number of topology changes 1 last change occurred 00:08:18 ago
from GigabitEthernet1/3
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300

Port 1 (GigabitEthernet1/1) of VLAN0001 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 000e.843a.c780
Designated bridge has priority 32769, address 000e.843a.c780
Designated port id is 128.1, designated path cost 0
Timers: message age 1, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 1, received 278

Port 3 (GigabitEthernet1/3) of VLAN0001 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.3.
Designated root has priority 32769, address 000e.843a.c780
Designated bridge has priority 32769, address 0017.9444.f8c0
Designated port id is 128.3, designated path cost 19
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
BPDU: sent 521, received 257


Switch3#sh vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
VTP Operating Mode : Server


IOS on the switches:

Switch1: c3560-advipservicesk9-mz.122-44.SE6.bin

Switch2: c3550-ipbasek9-mz.122-25.SEE.bin

Switch3: Cat4500-ipbasek9-mz.122-25.SG.bin



There isn't much on the switches configuration wise..

Switch1 is not VTP trnsparent, VTP is not configured at all.


I am thinking some IOS issue.

I dont have this problem when I replace the 3560 switch with a 4948...

I am no longer working on this issue, but it would still be good to know what was wrong.
 
Switch1 isn't receiving BPDUs on either port, which is definitely the problem and it tends to rule out physical issues. I also notice that Switch2 is hard-coding its links as access ports - is there a reason for that? You're running per-vlan spanning tree, you've got VTP configured, but your switch interconnects are access ports? That's unusual, though it should be causing this specific problem.

Could you post the full config file of Switch1 and Switch2? One is rejecting the other's BPDUs and there aren't many things that would typically cause that.

CCNP, CCDP, CCIP
Core Network Planner, ISP
 
I am not running VTP and although it is set up for per-vlan STP there are no VLANs configured. All ports are in VLAN 1 and are access ports.

Switch2 links are hard coded to access because the default for that switch is to negotiate trunk and I didnt want to use trunk ports.
None of this should cause a problem with STP.

One thing that just clicked while you brought up the per-vlan STP thing is, maybe Switch1 does not support per-vlan STP with the IOS it is running and if I can run just the basic STP it might work.. Will have to test that theory...
 
PVST is cross-compatible with CST, even if that were the case. It should still be receiving the BPDUs. My first thought was a native vlan conflict, though with the posted configuration one side is auto desirable and the other access, which would result in an untagged access link on both sides.

The reason I wanted the full config is to see if there are other reasons the BPDU isn't getting read. If not, the next step for me would be to check the syslog and maybe run a few STP debugs. I've seen BPDUs get rejected due to MTU before too, though that was an odd case.

CCNP, CCDP, CCIP
Core Network Planner, ISP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top