Cincinnerdi Tech Stuff

A mind-numbing read if ever there was one

STP tuning

leave a comment »

After wading through reams of packets shoved out a Cisco 3550 just for STP / PVST+, I have a bit more knowledge about this loop preventing protocol.

A brief aside: Sniffing STP ain’t much fun when you have a bunch of VLANs configured. For some reason, the switches came up with VLANs 1, 2, 3, 4, 5, 6, 7, 8 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 60, 70, 95, 96, 1002, 1003, 1004, 1005. Except for VLAN1, I zapped them with no vlan # and that helped (though Cisco doesn’t allow the deletion of the last 4.) I only had to do this on one of the switches!?

Sw2 was the root bridge. I wanted to make sw1 the root and have sw3 as the backup root bridge. Note that there is no actual status of secondary, there is just the next larger bridge ID.

Last time I changed the bridge priorities manually, but this lab I used the global config commands:

2950sw1(config)#span vlan 1 root primary

3550sw3(config)#span vlan 1 root secondary

These are macro commands which change the priorities of the switches. Now they are:

sw1 is now 24576+1
sw3 is now 28762+1
sw2 is now 32768+1

The +1 is for the vlan number, in this case 1.

BEFORE I executed this command, the switches had setup this STP tree:

==========
2950sw1#sho span
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0011.5c4b.4b00
Cost 19
Port 12 (FastEthernet0/12)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0011.bbd0.4340
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——-
Fa0/12 Root FWD 19 128.12 P2p
Fa0/13 Altn BLK 19 128.13 P2p

==========
3550sw2#sho span

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0011.5c4b.4b00
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 0011.5c4b.4b00
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/12 Desg FWD 19 128.12 P2p
Fa0/13 Desg FWD 19 128.13 P2p==========
3550sw3#sho span

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0011.5c4b.4b00
Cost 19
Port 13 (FastEthernet0/13)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

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

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

——-
Fa0/12 Desg FWD 19 128.12 P2p
Fa0/13 Root FWD 19 128.13 P2p

AFTER I used the span vlan 1 root primary | secondary, they were:

==========
2950sw1#sho spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0011.bbd0.4340
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Address 0011.bbd0.4340
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

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

——-
Fa0/12 Desg FWD 19 128.12 P2p
Fa0/13 Desg FWD 19 128.13 P2p==========
3550sw2#sho spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0011.bbd0.4340
Cost 19
Port 13 (FastEthernet0/13)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0011.5c4b.4b00
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/12 Altn BLK 19 128.12 P2p
Fa0/13 Root FWD 19 128.13 P2p==========
3550sw3#sho spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0011.bbd0.4340
Cost 19
Port 12 (FastEthernet0/12)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 28673 (priority 28672 sys-id-ext 1)
Address 0011.5c4b.4d80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

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

——-
Fa0/12 Root FWD 19 128.12 P2p
Fa0/13 Desg FWD 19 128.13 P2p

For posterity, I used debug to watch STP do its thing, once for a cable disconnected and once after the span primary command. Here’s the results:

3550sw3#debug spanning-tree config
Spanning Tree configuration debugging is on
3550sw3#
00:50:11: STP: VLAN0001 sent Topology Change Notice on Fa0/13
3550sw3#
00:50:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, chan
ged state to down
3550sw3#
00:50:13: %LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to down
3550sw3#
00:50:30: %LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to up
00:50:31: set portid: VLAN0001 Fa0/12: new port id 800C
00:50:31: STP: VLAN0001 Fa0/12 -> listening
3550sw3#
00:50:32: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, chan
ged state to up
3550sw3#
00:50:46: STP: VLAN0001 Fa0/12 -> learning
3550sw3#
00:51:01: STP: VLAN0001 sent Topology Change Notice on Fa0/13
00:51:01: STP: VLAN0001 Fa0/12 -> forwarding
3550sw3#=======================
This is after sw1 was made root primary and sw3 was made root secondary

3550sw3(config)#span vlan 1 root sec
01:57:50: SPANTREE: configuration is not present
3550sw3(config)#span vlan 1 root sec
3550sw3(config)#
01:57:53: SPANTREE: configuration is not present
01:57:53: SPANTREETYPE: getting tree type vlan for parameter 1 value 1
01:57:53: SPANTREE: set tree parms vlan 1 which 3 param 28672
01:57:53: %VLAN0001: update priority to 28672 uplinkfast off
01:57:53: setting bridge id (which=1) prio 28673 prio cfg 28672 sysid 1 (on) id
7001.0011.5c4b.4d80
01:57:53: STP: VLAN0001 Fa0/13 -> listening
01:57:53: SPANTREE: update tree params vlan 1prio: 28672

01:58:08: STP: VLAN0001 Fa0/13 -> learning

01:58:23: STP: VLAN0001 sent Topology Change Notice on Fa0/12
01:58:23: STP: VLAN0001 Fa0/13 -> forwarding
3550sw3(config)#

Advertisements

Written by scottledyard

2007, March 3rd at 8:26 pm

Posted in Cisco, Cisco Switches, STP

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: