Route My World!

A CCNA/CCNP Blog

Archive for May 28th, 2009

BCMSN: Types of STP and Configuration

Posted by Aragoen Celtdra on 28th May 2009

Types of STP

Common Spanning Tree (IEEE version)

  • The IEEE 802.1Q maintains a single instance of STP for all VLANs allowed in the trunk.
    • This instance is referred to as the Common Spanning Tree (CST).
  • CST usually describes 802.1Q implementation on non-Cisco switches
  • All CST BPDUs are transmitted over trunk links using the native VLAN with untagged frames.

 

Per-VLAN Spanning Tree (PVST)

  • Cisco-proprietary version of STP.
  • Operates a separate instance of STP per individual VLAN.
  • Requires use of Cisco Inter-Switch Link (ISL) trunking encapsulation.
  • BPDUs are never exchanged between PVST and CST.

 

Per-VLAN Spaning Tree Plus (PVST+)

  • Also Cisco-proprietary.
  • Interoperates with switches running PVST and CST, as well as other switches also running PVST+
    • Communicates with PVST by using ISL trunks.
    • To communicate with CST:
      • PVST+ exchanges BPDUs with CST as untagged frames over the native VLAN.
      • BPDUs from other instances of STP (other VLANs) are propagated across the CST portions of the network by tunnelling – using unique multicast address so that the CST switches forward them on to the downstream neighbors without interpreting them first.

 

Configuring Basic Parameters of PVST+

  • By default, STP is enabled for all active VLANs and on all ports of a switch.
  • If it was somehow disabled, ues the following global configuration command to enable it:

SW01(config)# spanning-tree vlan vlan-id

  • It can also be re-enabled on for specific VLAN on a specific port by using the following interface configuration command:

SW01(config-if)# spanning-tree vlan vlan-id

 

Configuring the Root Bridge

There are 2 ways to configure a root bridge:

  • Manually setting the bridge priority:
    • This is the preferred method.
    • The recommended priority value for primary is 4096 – assuming default values for everything else.
    • The recommended priority value for secondary is 8192 – assuming default values for everthing else.
      • More than one switch can act as backup root bridge.

SW01(config)# spanning-tree vlan vlan-id|vlan-list priority value

  • Using a macro command:
    • Primary Root
    • When all else have default settings, using the macro sets the primary root priority value to 8192.
      • If the current root is configured with a value other than the default, the macro uses a value that is a step lower than the defaul value.
      • For example,  if current root switch is 4096, the root macro sets the priority at 4095.
    • On Catalyst switches that have the extended system-id enabled (bridge priority + VLAN ID) and all else are default, the primary root is assigned a value of 24,576.
      • If a current root has a priority value of less than 24,576, the switch sets a value of the priority to be 4096 less than the current priority value.
    • Secondary Root (Backup Root Bridge)
      • For Catalyst 3550 switches without the extended system ID support (software before Release 12.1(8)EA1), the switch priority is changed to 16384.
      • A Catalyst 3550 switch that supports the extended system ID as the secondary root, the STP switch priority is modified from the default value (32768) to 28672.
      • Can be configured on more than one switch – backup root bridge.

SW01(config)#spanning-tree vlan vlan-id root {primary | secondary}

 

Configuring Port Cost 

  • To make STP choose a certain port over another for forwarding frames, assign a lower cost value to the niterface to make spanning tree select that first.
  • Conversely, assign higher costs to interfaces that are less preferrable.
  • The range of possible values:
    • 1 to 200,000,000 for interfaces that are configured as access ports
    • 1 to 65,535 for VLAN cost for an interface that is a trunk port.
  • STP uses the port cost value when the interface is an access port.

spanning-tree cost port-cost

  • STP uses VLAN port cost values when the interface is a trunk port.

spanning-tree vlan vlan-id cost port-cost

STP Timers

  • Hello Time
    • 2 seconds
    • Time interval between configuration BPDUs sent by the Root Bridge.
  • Forward Delay
    • 15 seconds
    • Time interval that a switch port spends in each of the Listening and Learning states.
  • Max (maximum) age
    • 20 seconds
    • The length of time before a switch descards its stored BPDU.

Manually Configure STP Timers

SW01(config)#spanning -tree [vlan vlan-id] hello-time seconds
SW01(config)#spanning -tree [vlan vlan-id] forward-time seconds
SW01(config)#spanning -tree [vlan vlan-id] max-age seconds

  • The timers can be change for a singe instance (VLAN) of STP on the switch by using the vlan vlan-id paramaters.
  • By omiting the vlan keyword, the timer values are configured for all instances (all VLANs) of STP on the switch.
  • The hello-time keyword can have a value of 1 to 10 seconds. Default is 2 secs.
  • The forward-time keyword can have a value of 4 to 30 seconds. Default is 15 secs.
  • The max-age keyword can have a value of 6 to 40 seconds. Default is 20 secs.

References:

  1. Configuring Basic STP Features – Catalyst 3550 Configuration Guide 12.1(8)EA1
  2. Configuring Root Switch – Catalyst 3550 Configuration Guide 12.1(8)EA1
  3. Configuring Secondary Root Switch – Catalyst 3550 Config Guide 12.1(8)EA1

This entry is not an authoritative guide. These are merely notes and rehash of the primary text materials and resources that I use. For a thorough guide of the BCMSN course, consider purchasing Building Cisco Multilayer Switched Networks (BCMSN) (Authorized Self-Study Guide) (4th Edition) by Richard Froom, Balaji Sivasubramanian, and Erum Frahim and CCNP BCMSN Official Exam Certification Guide (4th Edition) by Dave Hucaby ; as well as following the links on the reference section of this entry.

Posted in BCMSN Prep, CCNP, Spanning Tree | 3 Comments » | Print This Post

 

Route My World! is Digg proof thanks to caching by WP Super Cache