*********************************** Cisco - Spanning Tree Configuration *********************************** Spanning-Tree Global Configuration ================================== **Disable/Enable Spanning Tree Protocol On a VLAN** *Note: Can be used either globally or on a per-port basis* :: [no] spanning-tree vlan **Configure Bridge ID Format** - Traditional 802.1D (STP) Uses a unique MAC address - 802.1t uses a non-unique MAC address with bridge ID plus VLAN ID - 802.1t is the default where a switch cannot suport 1024 uniquq MAC adresses - Disabling "extended system ID" reverts to 802.1D bridge id format (if supported) :: [no] spanning-tree extend system-id **Manually set Bridge ID Priority** *Note: Must be uset in increments of 4096 :: spanning-tree vlan priority **Automatically set primary/secondary root bridge with macro** *Note: command will not show in the config directly* :: spanning-tree vlan root { primary | secondary } [diameter ] **Tuning Port ID/Priority** *Note: Port number is fixed, only priority can be changed* :: interface spanning-tree vlan port-priority **Tune global STP timers** :: spanning-tree [vlan ] hello-time # 2 seconds by default spanning-tree [vlan ] forward-time # 15 seconds by default spanning-tree [vlan ] max-age # 20 seconds by default Verifying Spanning Tree Operation ================================= **Display STP Bridge Priorities** :: show spanning-tree [vlan ] **Verify port cost** :: show spanning-tree interface [cost] **Monitoring STP** :: show spanning-tree [detail | summary] show spanning-tree [vlan ] root show spanning-tree [vlan ] bridge show spanning-tree interface PortFast ======== **Disable/Enable Portfast global for all non-trunk ports** :: [no] spanning-tree portfast default **Disable/Enable PortFast on specific interfaces** :: interface [no] spanning-tree portfast **Automatically apply optimal configuration for an end user port** *Note: Enables PortFast, sets to be an access port, disables PAgP* :: interface switchport host **Verify PortFast status** :: show spanning-tree interface portfast UplinkFast ========== **Enable UplinkFast globally** :: spanning-tree uplinkfast [max-update-rate ] **Verify UplinkFast Status** :: show spanning-tree uplinkfast BackboneFast ============ **Enable BackboneFast Globally** :: spanning-tree backbonefast **Verify BackboneFast Status** :: show spanning-tree backbonefast