Multiple Spanning Tree on Cisco

Telnet to CORE1:
sys #enter system config
stp region-configuration
region-name HQ
revision-level 1
instance 1 vlan 1 2 15
instance 2 vlan 10 16
instance 3 vlan 7
active region-configuration #make this region config active
quit
stp instance 1 root primary
stp instance 2 root secondary
stp instance 3 root primary
stp instance 0 root primary

Telnet to CORE2:
stp region-configuration
region-name HQ
revision-level 1
instance 1 vlan 1 2 15
instance 2 vlan 10 16
instance 3 vlan 7
active region-configuration
quit
stp instance 1 root secondary
stp instance 2 root primary
stp instance 3 root secondary
stp instance 0 root secondary

Telnet to Edge/Distribution:
spanning-tree config-name HQ
spanning-tree config-revision 1
spanning-tree instance 1 vlan 1 2 15
spanning-tree instance 2 vlan 10 16
spanning-tree instance 3 vlan 7

display stp
display stp instance 1
display stp brief
show span instance 1

Notes:
MSTP will only be compatible with RSTP if there's only one instance (default instance) of the STP is running on MSTP.

# guard edge ports and re-enable after 20 seconds
spanning-tree <port-list> bpdu-protection

spanning-tree bpdu-protection-timeout 20

# set path cost
Default:
10 Mbps – 100
100 Mbps – 19
Gigabit – 4
10 Gigabit – 2
Possible values are 0 – 65535

-----------------------------------------

1. Check for ports with highest number of packet drops and decide whether STP is necessary
run: show int > look for high values under "Drops Tx" column

2. Review network topology diagram

3. Check for loops and physically remove as necessary
show lldp info rem
show lldp info rem {port number}
#connect to neighbor via ssh
show lldp info rem

Example:
RD NSR Core SW1 A21 >> 2/A1 SHORTELhpsw1-rd 2/43 >> D24 RD SVRM1CORE SW2 B21 >> B22 RD NSR Core SW1

4. Enable spanning tree

# Enable spanning tree globally
spanning tree

# Set spanning tree global priority from the default 32768
spanning-tree priority 10

# to disable spanning tree
no spanning tree

# Set priority per interface
spanning-tree trk1 priority 5

# automatically shutdown ports that should not receive STP BPDU advertisement packets
spanning-tree A1-A10 bpdu-protection
spanning-tree trap errant-bpdu

# Adminitratively re-enable ports that have been shutdown by bpdu-protection
int A1-A10 enable

5. Exclude certain uplink ports from STP prunning

# This forces a port to ALWAYS stay in the forwarding state and be excluded from standard STP operation.
spanning-tree {portNumber} bpdu-filter

# When port receives bpdu packets it drops the packets and goes into forwarding state. Can only be configured on the end device. Should not configure this on the uplink interface of the switch. Will consider the STP packet for 3 seconds before discarding
admin-edge port

-------------------------

# reset interface path-cost and priority
spanning-tree <port-list> path-cost auto
spanning-tree <port-list> priority 8
no spanning-tree <port-list> bpdu-filter

spanning-tree config-name HQ
spanning-tree config-revision 1
spanning-tree instance 1 vlan 1 2 4 5 9 15
spanning-tree instance 2 vlan 10 16
spanning-tree instance 3 vlan 4 7

Leave a Reply

Your email address will not be published. Required fields are marked *