STP: UNDERSTANDING COMMAND LINE


COMMANDS

SH SPANNING-TREE SUMMARY

SH SPANNING-TREE ROOT

SH SPANNING-TREE ACTIVE

SH SPANNING-TREE BLOCKED PORTS

SH SPANNING-TREE DETAIL


 

SH SPANNING-TREE SUMMARY

OUTPUT

switchA#sh spanning-tree summary

Switch is in rapid-pvst mode

Root bridge for: VLAN0001

EtherChannel misconfig guard is enabled

Extended system ID           is enabled

Portfast Default             is disabled

PortFast BPDU Guard Default is disabled

Portfast BPDU Filter Default is disabled

Loopguard Default           is disabled

UplinkFast                   is disabled

BackboneFast                 is disabled

Pathcost method used is short

Name                   Blocking Listening Learning Forwarding STP Active


VLAN1300                     0         0       0         1        1

VLAN1310                     0         0       0         1         1

VLAN1500                     0         0       0         1         1


24 vlans                     0         0       0       1300       1300

COMMENTS

:: Mode is Rapid PVST.

:: Currently, logged in switch is Root Bridge, only for vlan 0001

:: List of all the enabled features

:: Here, total number of vlan for which STP is running is 24

:: Total number of active instances is 1300


 

SH SPANNING-TREE ROOT

OUTPUT

switchA#sh spanning-tree root

Root   Hello Max Fwd

Vlan                   Root ID                          Cost   Time Age Dly Root Port


VLAN0001         32769 0006.527b.4400         0   2   20 15

VLAN0202       20682 0023.04ee.be1f         2   2   20 15 Po200

VLAN0203         20683 0023.04ee.be1f         2   2   20 15 Po200

 

COMMENTS

:: For every vlan, Root id is shown. Root id means the bridge id of the root bridge.

Bridge id = Priority + Mac address

:: Output shows the Timers values like Hello timer, Max age, Fwd delay

:: For VLAN0001, Root id is 32769. Check the bridge id of switchA, if bridge id=32769. It means switchA itself is the root bridge for VLAN0001.

:: Root port shows the root port on switchA for different vlan’s.

 

HOW TO ANALYZE

For VLAN0001, there is no root port given. As we know, root port lies on the non-root bridge.

Root port is the port having minimum cost to reach from non-root bridge to root-bridge.

On Root bridge, root port cannot lie.

So, here, for VLAN0001, switchA itself is the root-bridge

******************************

 

SH SPANNING-TREE ACTIVE

OUTPUT

switchA#sh spanning-tree active

VLAN0001

Spanning tree enabled protocol rstp

Root ID   Priority   32769

Address     0006.527b.4400

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     0006.527b.4400

Hello Time   2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 14400

Interface       Role Sts Cost     Prio.Nbr Type


Gi10/1           Desg FWD 4        128.1153 Edge P2p

Gi10/2           Desg FWD 4         128.1154 Edge P2p

Gi10/3           Desg FWD 4         128.1155 Edge P2p

 

COMMENTS

:: Here, we will get the details of instances running for every vlan separately

:: For VLAN0001, Root ID = Bridge ID. It means switchA itself is the root-bridge.

:: Every port plays different role for different vlan instances.

For VLAN0001, Gi10/1 is the designated port . Cost & Port identifier( 128.1153) is also given. It might be possible that Gi10/1 is playing some other role for some another vlan instance.

:: For a particular vlan instance, Bridge id= priority + sys extended id

Here, sys extended id = vlan number

For VLAN0001, sys extended id = vlan number = 1

32768 is the default priority


 

SH SPANNING-TREE BLOCKED PORTS

OUTPUT

switchA#sh spanning-tree blockedports

Name                 Blocked Interfaces List


Number of blocked ports (segments) in the system : 0


 

SH SPANNING-TREE DETAIL

OUTPUT

switchA#sh spanning-tree detail

VLAN0001 is executing the rstp compatible Spanning Tree protocol

Bridge Identifier has priority 32768, sysid 1, address 0006.527b.4400

Configured hello time 2, max age 20, forward delay 15, tranmsit hold-count 6

We are the root of the spanning tree

Topology change flag not set, detected flag not set

Number of topology changes 28 last change occurred 41w3d ago

from Port-channel9A

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 14400

 

COMMENTS

:: Here, point to note is the topology change, when STP loop occurs, this field changes frequently

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

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