Monday, September 19, 2011

H3C - STP, RSTP and MSTP


Step 1 – Enable STP
Step 2 – Configure the MSTP Region on all switches
Step 3 - Configure the Root and secondary root in all MSTP instances
Step 4 - Configure the Edge-Ports (Access) and Non-Edge Ports (Uplinks)
Step 5 - Stabilize MSTP region with BPDU Protection, Root Guard, and Loop Protection




Step 1 - Enable spanning-tree – Default mode is MSTP
[SW1]stp enable


Step 2 - Configure MSTP Region parameters
Apply same MSTP Configuration on ALL switches of an MSTP Region

[SW1]stp region-configuration
[SW1-mst-region] region-name test
[SW1-mst-region] revision-level 1
[SW1-mst-region]instance 1 vlan 1 to 999
[SW1-mst-region]instance 2 vlan 1000 to 1999

Apply changes on switch
[SW1-mst-region]active region-configuration

Display Region information
[SW1-mst-region]display stp region-configuration

OperconfigurationFormat selector :0
Region name :test
Revision level :1
Instance Vlans Mapped: 0 2000 to 40941
                       1 to 9992 1000 to 199913


Step 3 - Define Root & Secondary Root of MSTP Instances

On Aggregation or Core switches of MSTP Region:

[Core1]stp instance 1 root primary
[Core1]stp instance 2 root secondary

[Core2]stp instance 1 root secondary
[Core2]stp instance 2 root primary

Define Root and secondary Root of Instance 0

[Core1]stp instance 0 root primary
[Core2]stp instance 0 root secondary

  • Priority in instance 0 (CIST) is used in Common Spanning-Tree Root election.
  • CST is used between MSTP regions or in Interoperability with Cisco PVST


Verify MSTP instance configuration

[Core1]display stp inst 1

-------[MSTI 1 Global Info]-------
MSTI Bridge ID :0.001c-c5bc-2b11
MSTI RegRoot/IRPC :0.001c-c5bc-2b11 / 0
MSTI RootPortId:0.0
MSTI Root Type :PRIMARY root
Master Bridge :0.001c-c5bc-2b11
Cost to Master :0
TC received :4

[Core1]display stp inst 2

-------[MSTI 2 Global Info]-------
MSTI Bridge ID :4096.001c-c4bc-2bcc
MSTI RegRoot/IRPC :4096.001c-c4bc-2bcc / 0
MSTI RootPortId:0.2
MSTI Root Type :SECONDARY root
Master Bridge :0.001c-c5bc-2b11
Cost to Master :20000
TC received :0

Switching Status of STP ports in all instances

[SW1]display stp brief

MSTID Port Role STP State Protection
0 GigabitEthernet1/0/1 ALTE DISCARDING NONE
0 GigabitEthernet1/0/2 ROOT FORWARDING NONE
1 GigabitEthernet1/0/1 ALTE DISCARDING NONE
1 GigabitEthernet1/0/2 ROOT FORWARDING NONE
2 GigabitEthernet1/0/1 ROOT FORWARDING NONE
2 GigabitEthernet1/0/2 ALTE DISCARDING NONE


Step 4 - Define Edge and Non Edge ports
  • All ports are non-edge ports by default.
  • End-Nodes connect to Edge Ports (= Port Fast)
  • Switch Uplinks are configured as Non-Edge
[SW]port-group manual edge-1
[SW-port-group-manual-edge-1]group-member Gi1/0/1 to Gi1/0/40
[SW-port-group-manual-edge-1]port link-type access
[SW-port-group-manual-edge-1]port access vlan 200
[SW-port-group-manual-edge-1]stp edged-port enable
[SW-port-group-manual-edge-1]quit


Step 5 - Enhance STP


Stabilize MSTP region with BPDU Protection, Root Guard, and Loop Protection


Prevent insertion of a new Root
[Core1]interface GigabitEthernet2/0/1
[Core1-GigabitEthernet2/0/1]stp root-protection

Prevent insertion of switches on Edge ports:
[Edge1]stp bpdu-protection

Prevent Loop created by cabling error on Edge ports:
[Edge1] interface gigabitethernet1/0/1
[Edge1-GigabitEthernet1/0/1] stp loop-protection


MSTP configuration on Cisco switch

Cisco1(config)# spanning-treemode mst
Cisco1(config)# spanning-tree mst  configuration
Cisco1(config-mst)# name test
Cisco1(config-mst)# revision 1
Cisco1(config-mst)# instance 1 vlan 1-999
Cisco1(config-mst)# instance 2 vlan 1000-1999
Cisco1(config)# spanning-tree mst 0-1 root primary
Cisco1(config)# spanning-tree mst 2 root secondary




4 comments:

  1. Very helpful.
    Simple configuration that save my life
    Thanks a lot !!

    ReplyDelete
  2. Hi thanks for a great breakdown , this really helped me a good deal.

    ReplyDelete
  3. Clear and succint

    ReplyDelete
  4. hi, i have two core switches and access switches connected to the core switches ... am not looking for the load balancing .i need only the failure for the access switches up links .
    So while configuring the region shall i leave the instance to vlan mapping and making all the vlan to instance 0.
    Please confirm .because my network in production .i heard instance to vlan mapping configuration make the network unstable for some moments

    ReplyDelete

Please add comments so I may update the material to accommodate platform modification to various commands. Also if you have some real-world caveats, do please share.

Search Duke

About the Author

My photo
Central Florida, United States