Spanning Tree Protocol


Spanning-Tree Verification

Cisco IOS Software Release 12.0

2900#show spanning-tree brief

Displays the spanning-tree table of the switch

Cisco IOS Software Release 12.1

Switch#show spanning-tree

Displays the spanning-tree table of the switch

 

2950#show spanning-tree int fa 0/17

Displays spanning-tree info for port fa 0/17

 

2950#show spanning-tree vlan x

Displays spanning-tree info for the specific VLAN

 

2950#debug spanning-tree {all}

Displays all informational messages about changes in the spanning-tree topology


Change Spanning-Tree Priority of a Switch

Cisco IOS Software Release 12.0

Switch(config)#spanning-tree priority 1

Number can be from 165535. Lower number means better chance of being elected the root bridge. The default is 32768

Cisco IOS Software Release 12.1

Switch(config)#spanning-tree vlan 1 priority 1

Number can be from 165535. Lower number means better chance of being elected the root bridge. The default is 32768

 

Switch#spanning-tree vlan x root

Changes this switch to the root switch for VLAN x by lowering its priority to either 24576 or 100 less than current root bridge, whichever number is lower


Changing the Cost of Spanning Tree on an Interface

Switch#config t

 

Switch(config)#int fa 0/1

 

Switch(config-if)#spanning-tree cost x

Sets spanning-tree cost to specified value of x


Changing the State of Spanning Tree on an Interface

Switch(config)#int fa 0/1

 

Switch(config-if)#spanning-tree portfast

See the Caution that follows


Caution:

The command spanning-tree portfast will force a port to move directly to the Forwarding state, without having to transition through the Blocking, Listening, and Learning states.

This can save up to 50 seconds of wait time. This is an excellent command on access ports that will never be hooked up to another switch. Examples where this would be useful are on ports connected to computers or other end devices, such as printers, servers, and so on. You must exercise caution with this command, however, because if a switch port is plugged into another switch and the portfast command is enabled, then spanning tree will be defeated and a potential switching loop might be created.


Spanning Tree Portfast BPDU Guard Command

Switch#config t

 

Switch(config)#spanning-tree portfast bpduguard

Enables BPDU Guard for all interfaces

Switch(config)#errdisable recovery cause bpduguard

Allows port to re-enable itself by setting a recovery timer

Switch(config)#errdisable recovery interval 400

Sets recovery timer to 400 seconds. Default is 300 seconds

Switch(config)#show spanning-tree summary totals

Verifies if BPDU Guard is enabled or disabled

Switch#show errdisable recovery

Displays errdisable recovery timer information


Note:

There is a feature that has been added to Catalyst IOS called Spanning Tree Portfast BPDU Guard. This feature has been created to maintain stability within the active STP topology. Devices that are attached to ports with Portfast enabled are not allowed to take part in the spanning-tree process. If a port that has Portfast enabled receives a BPDU packet, that port is disabled by the switch. This is done by transitioning the port into the errdisable state. An error message will be sent to the console. Ports disabled by STP BPDU Guard remain in the disabled state unless it is manually enabled with the no shut command or configured to re-enable itself automatically.





CCNA Self-Study(c) CCNA Portable Command Guide
CCNA Portable Command Guide
ISBN: 1587201585
EAN: 2147483647
Year: 2006
Pages: 261
Authors: Scott Empson

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net