Configuring MSTP under Comware: the essentials – Configuration

advertisement
Configuration guide
Configuring MSTP under
Comware: the essentials
Table of contents
Introduction............................................................................................................................................................................2
Background information ......................................................................................................................................................2
Requirements ....................................................................................................................................................................2
Configure MSTP .....................................................................................................................................................................2
Network diagram ..............................................................................................................................................................2
Configuration steps...........................................................................................................................................................3
Initial L2 configuration of devices ...............................................................................................................................3
Steps 1 and 2: Enable STP and configure MSTP region ...........................................................................................4
Step 3: Configure primary root and secondary root .................................................................................................6
What other steps to consider in the configuration of MSTP? ..................................................................................7
Verify MSTP ............................................................................................................................................................................7
Step 1: Verify if STP is enabled and MSTP region parameters ................................................................................7
Step 2: Check which switch is root and which port is root port ...............................................................................7
Step 3: Check status of port and switch per STP instance .......................................................................................8
Additional links ................................................................................................................................................................... 12
Configuration guide | Configuring MSTP under Comware: the essentials
Introduction
This configuration guide describes the essential steps to configure MSTP under Comware OS. The intended audience is
solution architects and technical consultants.
What is MSTP?
The Multiple Spanning-Tree Protocol (STP) is defined by the IEEE 802.1s standard and was later extended by the IEEE
802.1Q-2005 standard. MSTP includes the rapid transition mechanisms of RSTP (802.1w) while taking in consideration the
use of VLANs in LANs.
When RSTP creates one tree without loop spanning tree, MSTP creates multiple spanning tree topologies: one per
“Instance” or group of VLANs, allowing a better use of uplinks bandwidth.
Background information
Requirements
Readers of this document should be familiar with the basic Comware data-link layer configuration commands including
Virtual Local Area Networks (VLANs), access ports, and trunk ports. The readers should also be familiar with the concepts of
spanning-tree protocol implementation: root bridge, root port, designated and alternate ports, Bridge Protocol Data Unit
(BPDU), port cost, and port ID.
The following hardware is required:
• Manageable switches or routers with “bridged” Ethernet interfaces under Comware OS
The following software is required:
• Comware Version 5.2
Configure MSTP
Network diagram
Figure 1. MSTP network
Core-1
Core-2
Ten1/0/27
Gig1/0/2
Ten1/0/27
Gig1/0/1
Gig1/0/1
Gig1/0/1
Edge-1
2
Gig1/0/2
Gig1/0/2
Gig1/0/1
Gig1/0/2
Edge-2
Configuration guide | Configuring MSTP under Comware: the essentials
Configuration steps
To configure MSTP, follow these steps:
• Step 1: Enable STP
• Step 2: Configure MSTP region parameters
– Region name (case sensitive)
– Revision number
– MSTP instances: mapping between VLANs and instances
• Step 3: Configure primary and secondary root bridges in all instances
• Step 4: Verify MSTP status
Initial L2 configuration of devices
Prior to the MSTP configuration, VLAN and port-type configuration must be achieved.
system-view
• VLAN configuration
vlan 11 to 12
vlan 21 to 22
• Uplink ports configuration as 802.1q links (trunk ports)
port-group manual uplink-port
group-member gigabitethernet 1/10/1 to gigabitethernet 1/0/1
port link-type trunk
port trunk permit vlan all
port trunk permit vlan all
Note:
Newer releases of Comware support interface “range” commands.
Interface range GigabitEthernet 1/0/1 to GigabitEthernet 1/0/2
port link-type trunk
port trunk permit vlan all
• On Core 1 and Core 2 configure the Ten-GigabitEthernet 1/0/27 as a trunk port
Interface ten-gigabitethernet 1/0/27
port link-type trunk
port trunk permit vlan all
Verification of L2 configuration
<HP>display vlan
Total 5 VLAN exist(s).
The following VLANs exist:
1(default), 11-12, 21-22,
<HP>display vlan 11
VLAN ID: 11
VLAN Type: static
Route Interface: not configured Description: VLAN 0011
Name: VLAN 0011
Tagged Ports:
GigabitEthernet1/0/1 GigabitEthernet1/0/2
Ten-GigabitEthernet1/0/27
Untagged Ports: none
3
Configuration guide | Configuring MSTP under Comware: the essentials
<HP>display port trunk
Interface
PVID
GE1/0/1
1
GE1/0/2
1
XGE1/0/27
1
VLAN passing
1, 11-12, 21-22,
1, 11-12, 21-22,
1, 11-12, 21-22
Steps 1 and 2: Enable STP and configure MSTP region
STP is not enabled under HP Comware by default.
On all switches of your LAN, enable MSTP and configure region parameters:
• Step 1: Enable STP: This enables STP in MSTP mode by default.
• Step 2: Configure the MSTP region parameters: They must be identical on all switches if you wish to benefit from the load
balancing traffic on uplinks between the instance topologies.
Note:
Do not forget to activate the MSTP region parameters. Before being activated, the parameters are “pending” (not applied).
system-view
stp enable
stp region-configuration
region-name HP
revision-level 1
instance 1 vlan 11 21
instance 2 vlan 12 22
active region-configuration
Note:
1. VLANs between 1 to 4094, may be assigned to an MST instance (MSTI) and do not require to be created first. In other
words, VLAN to instance mapping can be set prior to VLAN creation allowing future evolutions of the LAN without change
in the configuration.
2. How many MSTP instances? It is very common to configure 2 instances when the network contains 2 core or aggregation
switches, and, a desired result is the load balancing of traffic among the uplinks.
3. You can also configure one instance in addition to the instance 0 and set the load balancing between instance 0 and 1.
4. If load balancing is not a wished result, leave all VLANs in the default instance 0.
To verify if STP is enabled, use “display stp” command
• STP status before it is enabled:
display stp
Protocol Status
Protocol Std.
Version
CIST Bridge-Prio.
MAC address
Max age(s)
Forward delay(s)
Hello time(s)
Max hops
TC Snooping
• STP is enabled:
:disabled
:IEEE 802.1s
:3
:32768
:0023-89d9-c4dc
:20
:15
:2
:20
:disabled
display stp
-------[CIST Global Info][Mode MSTP]------CIST Bridge
:32768.0023-89d9-c4dc
4
Configuration guide | Configuring MSTP under Comware: the essentials
Bridge Times
CIST Root/ERPC
CIST RegRoot/IRPC
CIST RootPortId
BPDU-Protection
Bridge ConfigDigest-Snooping
TC or TCN received
Time since last TC
:Hello 2s MaxAge 20s FwDly 15s MaxHop 20
:32768.0023-893c-4b36/0
:32768.0023-893c-4b36/20
:128.2
:disabled
:disabled
:6
:0 days 0h:0m:7s
The “display stp” shows the status of STP Common and Internal Spanning Tree(CIST) combined with status of
STP in instance 0.
In the above display, note:
• The Bridge Id of the current switch:
CIST Bridge
:32768.0023-89d9-c4dc
CIST Root/ERPC
:32768.0023-893c-4b36/0
• The Bridge Id of the Root switch in the Common Spanning Tree:
Note:
ERPC is the External Root Path Cost: the root path cost is outside the MSTP region. Here the CIST root is in the region this is
why the RPC is 0.
• The Bridge Id of the Root switch in the Region in Instance 0:
CIST RegRoot/IRPC
:32768.0023-893c-4b36/20
Note:
IRPC is the Internal Root path Cost: The root path cost is inside the instance 0 in the MSTP region. IRPC is 20 that is the value
of a gigabit link when the path cost standard is “legacy”. Legacy is the default on Comware, it can be changed to “dot1t” that
refers to IEEE 802.1t, which is the cost standard for RSTP and MSTP.
Verify MSTP region configuration:
display stp region-configuration
Oper configuration
Format selector
:0
Region name
:HP
Revision level
:1
Configuration dig :0x4428410bc7f1759df29e08ab39ad805e
Instance
Vlans Mapped
0
1 to 10, 13 to 20, 23 to 4094
1
11, 21
2
12, 22
Each switch in the MSTP region should share the same setup if you wish to get load balancing effect.
• Region name must be the same (case sensitive).
• Revision level must be the same on all switches in the MSTP region. It is used for administrative purpose; in order to
number the changes you can set on the region.
• Mapping between VLAN and instances is reflected by the “configuration digest” that is a 16 byte MD5 hash that resumes
the mapping between the 4094 VLANs and the MSTP Instances and that is sent out in BPDU.
5
Configuration guide | Configuring MSTP under Comware: the essentials
Step 3: Configure primary root and secondary root
It is required to configure, in each defined MST instance, which switch will be the root (primary root). In a topology with 2
aggregation/core switches, it is common to set one switch to be the primary root for a given instance and the other
aggregation switch being set as the secondary root for that same instance. Alternating the root role among the MST
instances creates the load balancing effect.
• Core 1 switch is configured as root for instances 0 and 1 and secondary root for instance 2:
stp instance 0 root primary
stp instance 1 root primary
stp instance 2 root secondary
• Core 2 switch is configured as secondary root for instances 0 and 1 and root for instance 2:
stp instance 0 root secondary
stp instance 1 root secondary
stp instance 2 root primary
Note:
The following commands are equivalent:
“stp instance X root primary” = “stp instance X priority 0”
“stp instance X root secondary” = “stp instance X priority 4096”
One of the very first steps in verifying MSTP, is to check which switch is the root bridge in each instance. A very handy
command is provided on Comware: “display stp root”
• “display stp root” entered on Core 1 switch:
<Core-1>display stp root
MSTID Root Bridge ID
0
0.0023-893c-3b13
1
0.0023-893c-3b13
2
0.0023-893c-4b36
ExtPathCost
0
0
0
IntPathCost
0
0
2
Root Port
Ten-GigabitEthernet1/0/27
Note:
ExtpathCost (cost to the root outside the region) is equal to zero. This means the switch and the CIST root are in the
same region.
IntPathCost (cost to the root within the region) is equal to 0 in instances 0 and 1. This switch is the root for instances
0 and 1.
In instance 2 the IntPathCost is 2 (cost of 10 Gigabit port in Pathcost “legacy”) and the root port is the interface
ten-gigabitethernet 1/0/27 (the connection to Core 2).
• “display stp root” entered on Core 2 switch:
<Core-2>display stp root
MSTID Root Bridge ID
0
0.0023-893c-3b13
1
0.0023-893c-3b13
2
0.0023-893c-4b36
ExtPathCost
0
0
0
IntPathCost Root Port
2
Ten-GigabitEthernet1/0/27
2
Ten-GigabitEthernet1/0/27
0
Note:
IntPathCost (cost to the root within the region) is equal to 0 in instance 2. This switch is the root for instance 2.
In instance 0 and 1 the IntPathCost is 2 (cost of 10 Gigabit port in “legacy” cost standard) and root port is the interface
ten-gigabitethernet 1/0/27 (the connection to Core 1).
6
Configuration guide | Configuring MSTP under Comware: the essentials
• “display stp root” entered on Edge switch:
<Edge-1>display stp root
MSTID Root Bridge ID
0
0.0023-893c-3b13
1
0.0023-893c-3b13
2
0.0023-893c-4b36
ExtPathCost
0
0
0
IntPathCost
20
20
22
Root Port
GigabitEthernet1/0/1
GigabitEthernet1/0/1
GigabitEthernet1/0/2
Note:
That ExtpathCost (cost to the root outside the region) is equal to zero. This means that the switch and the CIST root are in
the same region.
That IntPathCost (cost to the root within the region) is equal to 20 in all instances (20 is the cost for gigabit port when the
path cost standard is “legacy” that is default and non-standard). This switch is not the root. The root port is gigabit 1/0/1 in
instances 0 and 1 and gigabit 1/0/2 in instance 2. This shows the “load balancing” of traffic between uplinks among
instances.
What other steps to consider in the configuration of MSTP?
The other useful features you should consider when configuring of MSTP are:
1.
2.
3.
Setting Edge ports as STP Edge ports: By default all ports are in “Non–Edge” setup.
Changing the standard of Path cost to the 802.1t default. The default is “Legacy” which sets the cost for a gigabit link
to 20. It is 20 000 in 802.1t mode.
Setting 802.1s compliance when connected to Cisco switches in MSTP.
Verify MSTP
To verify the configuration of MSTP is correct, follow these steps:
Step 1: Verify if STP is enabled and MSTP region parameters
• Verify MSTP is enabled and MSTP region parameters
display stp
display stp region-configuration
Note:
Refer to the outputs of the commands in the previous sections.
Step 2: Check which switch is root and which port is root port
• Verify which switch is the root bridge and which port is root port
display stp root
Note:
Refer to the outputs of the commands in the previous sections.
Remember:
If a switch has no root port, it is the root switch.
The root port always “looks” in the direction of the root bridge. If you wish to discover which switch is the root, connect to
the switch connected to the root port (use “display lldp neighbor list” command if lldp is enabled).
7
Configuration guide | Configuring MSTP under Comware: the essentials
The output of “display stp brief” provides the status of interfaces on a per instance basis.
On Edge switch:
display stp brief
MSTID Port
0
GigabitEthernet1/0/1
0
GigabitEthernet1/0/2
0
GigabitEthernet1/0/3
1
GigabitEthernet1/0/1
1
GigabitEthernet1/0/2
2
GigabitEthernet1/0/1
2
GigabitEthernet1/0/2
Role
ROOT
ALTE
DESI
ROOT
ALTE
ALTE
ROOT
STP State
FORWARDING
DISCARDING
FORWARDING
FORWARDING
DISCARDING
DISCARDING
FORWARDING
Protection
NONE
NONE
NONE
NONE
NONE
NONE
NONE
Note:
Gigabit 1/0/1 is “Root” port in instances (MSTID) 0 and 1 and gigabit 1/0/2 is “Alternate” port in the same instances.
Reversely, gigabit 1/0/2 is “Root” port and gigabit 1/0/1 is “Alternate” port in instance 2.
On Core switch:
display stp brief
MSTID Port
0
GigabitEthernet1/0/1
0
GigabitEthernet1/0/2
0
Ten-GigabitEthernet1/0/27
1
GigabitEthernet1/0/1
1
GigabitEthernet1/0/2
1
Ten-GigabitEthernet1/0/27
2
GigabitEthernet1/0/1
2
GigabitEthernet1/0/2
2
Ten-GigabitEthernet1/0/27
Role
DESI
DESI
DESI
DESI
DESI
DESI
DESI
DESI
ROOT
STP State
FORWARDING
FORWARDING
FORWARDING
FORWARDING
FORWARDING
FORWARDING
FORWARDING
FORWARDING
FORWARDING
Protection
NONE
NONE
NONE
NONE
NONE
NONE
NONE
NONE
NONE
Note:
All ports are defined as Designated/Forwarding in instance for which the switch is root (in instances 0 and 1).
We also see that all ports are defined as Designated/Forwarding in instances (2) where switch is the secondary root. If this is
not what you observe, then check the cost of your uplinks.
Step 3: Check status of port and switch per STP instance
• Verify detailed status of STP on a per instance basis
On Edge switch:
[Edge1]display stp instance 0
-------[CIST Global Info][Mode MSTP]------CIST Bridge
:32768.0023-89d9-c4dc
Bridge Times
:Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC
:0.0023-893c-3b13/0 (1)
CIST RegRoot/IRPC
:0.0023-893c-3b13/20000 (2)
CIST RootPortId
:128.1
BPDU-Protection
:disabled
Bridge ConfigDigest-Snooping
:disabled
TC or TCN received
:22
Time since last TC
:0 days 0h:5m:50s
----[Port1(GigabitEthernet1/0/1)][FORWARDING]---8
Configuration guide | Configuring MSTP under Comware: the essentials
Port Protocol
:enabled
Port Role
:CIST Root Port (3)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
Desg. Bridge/Port
:0.0023-893c-3b13/128.1
Port Edged
:Config=disabled/Active=disabled
Point-to-point
:Config=auto/Active=true
Transmit Limit
:10 packets/hello-time
Protection Type
:None
MST BPDU Format
:Config=auto/Active=legacy
Port ConfigDigest-Snooping
:disabled
Num of Vlans Mapped
:1
PortTimes
:Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
BPDU Sent
:56
TCN: 0, Config: 0, RST: 0, MST: 56
BPDU Received
:625
TCN: 0, Config: 0, RST: 0, MST: 625
----[Port2(GigabitEthernet1/0/2)][DISCARDING]---Port Protocol
:enabled
Port Role
:CIST Alternate Port (4)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
Desg. Bridge/Port
:4096.0023-893c-4b36/128.1
In the above display:
1.
2.
3.
4.
CIST Root/ERPC: Shows the Bridge-Id of the Root switch in CIST. The ERPC is the cost from the MSTP Region to the CIST
root. Here ERPC value is 0, meaning the Root of CIST is within the MSTP Region. A value different than 0 would mean
that the CIST root is outside the MSTP Region.
CIST RegRoot/IRPC: Defines the Root switch of Instance 0 in the MSTP region of this switch. IRPC is equal to 20000,
which is the cost for a gigabit port (in 802.1t standard that is set with the system-view “stp pathcost-standard dot1t”
command), meaning that the Root of instance 0 is connected one hop away via a gigabit port to this switch.
Port 1 (STP numbering) (gigabit 1/0/1) is the Root port.
Port 2 (STP numbering (gigabit 1/0/2) is the Alternate port.
Note:
That “display stp” and “display stp instance 0” provide the same output in which information of the CIST and instance 0 are
combined.
On Edge switch:
[Edge1]display stp instance 1
-------[MSTI 1 Global Info]------MSTI Bridge ID
:32768.0023-89d9-c4dc
MSTI RegRoot/IRPC
:0.0023-893c-3b13/20000 (1)
MSTI RootPortId
:128.1 (2)
Master Bridge
:0.0023-893c-3b13
Cost to Master
:20000
TC received
:22
----[Port1(GigabitEthernet1/0/1)][FORWARDING]---- (3)
Port Role
:Root Port (4)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
9
Configuration guide | Configuring MSTP under Comware: the essentials
Desg. Bridge/Port
Num of Vlans Mapped
Port Times
:0.0023-893c-3b13/128.1
:2
:RemHops 20
----[Port2(GigabitEthernet1/0/2)][DISCARDING]---- (3)
Port Role
:Alternate Port (4)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
Desg. Bridge/Port
:4096.0023-893c-4b36/128.1
Num of Vlans Mapped
:2
Port Times
:RemHops 19
[Edge1]
[Edge1]display stp instance 2
-------[MSTI 2 Global Info]------MSTI Bridge ID
:32768.0023-89d9-c4dc
MSTI RegRoot/IRPC
:0.0023-893c-4b36/20000 (1)
MSTI RootPortId
:128.2 (2)
Master Bridge
:0.0023-893c-3b13
Cost to Master
:20000
TC received
:33
----[Port1(GigabitEthernet1/0/1)][DISCARDING]---- (3)
Port Role
:Alternate Port (4)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
Desg. Bridge/Port
:4096.0023-893c-3b13/128.1
Num of Vlans Mapped
:2
Port Times
:RemHops 19
----[Port2(GigabitEthernet1/0/2)][FORWARDING]---- (3)
Port Role
:Root Port (4)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
Desg. Bridge/Port
:0.0023-893c-4b36/128.1
Num of Vlans Mapped
:2
Port Times
:RemHops 20
In above display:
1.
2.
3.
4.
10
MSTI RegRoot/IRPC: Shows the root switch in instance 1 or 2 in the MSTP region of this switch. IRPC is equal to 20000,
which is the cost for a gigabit port (in 802.1t standard), meaning that the root of instance 1 is connected one hop away
via a gigabit port to this switch.
MSTI RootPortId: 128.1 or 128.2 displays the port Id of the root port. 128 is the default port priority while 1 or 2 is the
internal port number defined by STP.
In the output “[Port1(GigabitEthernet1/0/1)]” the number after the string “Port” defines the internal STP port numbers.
For logical port such as Bridge Aggregation, or on chassis switches such as the HP 7500, port numbering logic is less
obvious.
Port role shows the role in STP: root, alternate, or designated.
Configuration guide | Configuring MSTP under Comware: the essentials
On Core switch:
[Core-1]display stp instance 0
-------[CIST Global Info][Mode MSTP]------CIST Bridge
:0.0023-893c-3b13
Bridge Times
:Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC
:0.0023-893c-3b13/0 (1)
CIST RegRoot/IRPC
:0.0023-893c-3b13/0 (1)
CIST RootPortId
:0.0 (2)
BPDU-Protection
:disabled
Bridge ConfigDigest-Snooping
:disabled
CIST Root Type
:PRIMARY root
TC or TCN received
:10
Time since last TC
:0 days 0h:7m:59s
----[Port1(GigabitEthernet1/0/1)][FORWARDING]---Port Protocol
:enabled
Port Role
:CIST Designated Port (3)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=20000
Desg. Bridge/Port
:0.0023-893c-3b13/128.1
<omitted output>
[Core-1]display stp instance 1
-------[MSTI 1 Global Info]------MSTI Bridge ID
:0.0023-893c-3b13
MSTI RegRoot/IRPC
:0.0023-893c-3b13/0 (1)
MSTI RootPortId
:0.0 (2)
MSTI Root Type
:PRIMARY root
Master Bridge
:0.0023-893c-3b13
Cost to Master
:0
TC received
:13
<omitted output>
----[Port27(Ten-GigabitEthernet1/0/27)][FORWARDING]---Port Role
:Designated Port (3)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=2000
Desg. Bridge/Port
:0.0023-893c-3b13/128.27
Rapid transition
:true
Num of Vlans Mapped
:2
Port Times
:RemHops 20
[Core-1]display stp instance 2
-------[MSTI 2 Global Info]------MSTI Bridge ID
:4096.0023-893c-3b13
MSTI RegRoot/IRPC
:0.0023-893c-4b36/2000
MSTI RootPortId
:128.27
MSTI Root Type
:SECONDARY root
Master Bridge
:0.0023-893c-3b13
Cost to Master
:0
TC received
:22
<omitted output>
11
Configuration guide | Configuring MSTP under Comware: the essentials
----[Port27(Ten-GigabitEthernet1/0/27)][FORWARDING]---Port Role
:Root Port (4)
Port Priority
:128
Port Cost(Dot1T)
:Config=auto/Active=2000
Desg. Bridge/Port
:0.0023-893c-4b36/128.27
Num of Vlans Mapped
:2
Port Times
:RemHops 20
In above display:
1.
2.
3.
4.
Core-1 is the root switch in instances 0 and 1. You can notice that the switch’s Bridge-Id is equal to the Root Bridge-Id
while the External and Internal Root Path Cost (ERPC and IRPC) are equal to 0.
The RootPortId: 0.0 means that this switch is the Root bridge.
Note that all ports are in designated state on the Root switch. The only exception is when there is a loop between two
ports on the switch itself in such case one port is designated and the other one is in “backup state.
In instance 2, Core-1 is Backup/Secondary Root. The Interface Ten 1/0/27 is the root port. Note the cost for 10GbE
is 2000 in 802.1t standard.
Additional links
The Switch Series “Layer 2—LAN Switching configuration guide” and “Layer 2 LAN Switching Command reference guide”
contain a spanning-tree chapter and sub chapter dedicated to MSTP.
They can be found in the Manuals and Documentation page of the HP Networking Products on hp.com/networking.
Click on “Support” and start using the “HP Networking support lookup tool” to find this documentation.
Learn more at
hp.com/networking
Sign up for updates
hp.com/go/getupdated
Share with colleagues
Rate this document
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for
HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as
constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
4AA5-6008ENW, November 2014
Download