Spanning-Tree

Spanning-Tree

Types of Spanning-Tree

  • Traditional STP – 802.1d
    • Default Hello Timer: 2 seconds
    • Default Max Age Timer: 20 seconds
    • Default Forward Timer: 15 seconds
    • 3 Types of BPDU’s (Bridge Protocol Data Unit)
      • Configuration BPDU (common – used to build topology, elect root, determine port roles)
      • Topology Change BPDU Notification (TCN – used to inform changes in the network)
      • Topology Change BPDU Acknowledgement (TCA – used to acknowledge TCN’s)
    • Root Bridge identified by Bridge ID (priority + MAC)
    • Port States
      • Blocking
      • Learning
      • Listening
      • Forwarding
    • Port Roles
      • Root Port
      • Designated Port
      • Alternate Port (by use of UPLINKFAST command)
  • CST – Common Spanning Tree
    • 802.1Q-based
    • Open Standard
    • Based on 802.1d rules
    • 1 instance over all VLANs
    • Uses native VLAN for BPDU’s
  • PVST – Per VLAN Spanning Tree
    • Cisco Proprietary
    • Based on 802.1D rules
    • ISL-based
    • 1 STP instance per VLAN
  • PVST+ – Per VLAN Spanning Tree Plus
    • Cisco Proprietary
    • Based on 802.1D rules
    • Single instance for each VLAN
    • ISL or 802.1Q based
    • Interoperable with CST and PVST
    • Default mode for switches
    • Commands
(config)# spanning-tree mode pvst //- Enable PVST+ on the switch//
(config-if)# spanning-tree portfast //- Set a port to be Edge Port (forwards upon link-up)
//
  • RSTP – Rapid Spanning Tree – 802.1w
    • Port Roles
      • Root Port – Best path to root bridge
      • Designated Port – switchport per segment with best cost to root bridge
      • Alternate Port – alternate (less desirable) path to root bridge
      • Backup Port – alternate switchport for the segment to root bridge
    • Port States
      • Discarding – combines Disabled, Blocking, and Listening states in STP (802.1D), since they all drop frames
      • Learning – frames dropped but learning MAC addresses
      • Forwarding – duhhhh…. traffic is forwarding
    • Port Types
      • Edge Port – Station port with only 1 device. Still listens for BPDU’s but immediately comes up “forwarding”. (using PORTFAST command)
      • Root Port – port that has best path to root
      • Point-to-Point Port – Port that has established a link to another switch. All full-duplex ports are assumed point-to-point unless denoted by PORTFAST (edge-port).
    • No Timers. Synchronization over Point-to-Point ports establishes synchronous updates to neighboring switches at the speed of BPDU’s, using Handshake/Agreement messages.
    • Topology Change
      • Topology change notification only sent when a non-edge port transitions to forwarding state (the switch has already determined it will not create a loop, and therefore, no need to send a notification when a link goes down. Only to notify switches to age out their CAM tables).
      • BPDU’s with TC bit set, are sent out all non-edge ports until the TC timer expires (2 intervals of Hello Timer).
      • All neighboring switches that receive the TC, send the TC messages out all non-edge ports except for the one that received it.
      • Commands
(config-if)# spanning-tree link-type point-to-point //- Half-duplex ports are not set as point-to-point. This will force it.//
(config-if)# spanning-tree portfast //- Set a port to be Edge Port (forwards upon link-up)//
(config)# spanning-tree mode rapid-pvst //- Enable Rapid PVST+ on the switch
//
  • MST – Multi Spanning Tree 802.1s
    • Built to decrease spanning-tree instances (and therefore decrease the resources necessary to run them). Create your own STP instances and map VLAN’s to them.
    • Based on 802.1w RSTP
    • To implement, you must define the following for each MST “Region”:
      • MST Configuration Name (32 characters)
      • MST Configuration revision Number (0-65535)
      • MST VLAN-to-Instance mappings (4096 entries)
    • Compatible with other forms of STP
    • Uses CST (Common Spanning Tree) at the parent (a wrapper) for MST, to work with other STP technologies
    • Inside each MST Region, an Internal Spanning Tree instance (IST) builds the topology within the region, and presents to CST a single virtual bridge.
    • MST Instances
      • Up to 16 supported per switch
      • IST is always MST0
    • Commands
* (config)# spanning-tree mode mst //- Enables MST//
* (config)# spanning-tree mst configuration //- Enters config mode for MST//
* (config-mst)# name <name> - Sets the name
* (config-mst)# revision <versionNumber> //- sets the revision number.  Must be updated (usually by 1) after each change.  **NOT propogated**.  Must be manually changed on each switch.//
* (config-mst)# instance <instanceID> vlan <vlanListing> //- Maps vlans to instance//
* (config-mst)# show pending //- shows pending operations//
* (config-mst)# exit //- exit config mode and commit changes
//

STP Costs

Bandwidth 802.1D Cost 802.1W Cost
10Mbps 100 2,000,000
100Mbps 19 200,000
1Gbps 4 20,000
10Gbps 2 2,000

Tie Breakers

  1. lowest root bridge ID
  2. lowest root path cost
  3. lowest sender bridge ID
  4. lowest sender port number
Share This Page : Share on TwitterShare on FacebookShare on GooglePlusShare on PinterestShare on Linkedin