Beruflich Dokumente
Kultur Dokumente
Configuring MSTP
The Ethernet switches listed in Applicable Product Matrix support the Multiple Spanning Tree Protocol
(MSTP), which allows you to map one or multiple VLANs to a multiple spanning tree instance (MSTI).
Note that one VLAN can be mapped to only one MSTI. With MSTP, the packets of a specific VLAN are
transmitted in the MSTI to which the VLAN is mapped, thus saving overhead and reducing resource
utilization.
Network Diagram
Figure 1-1 Network diagram for MSTP configuration
VLAN
VLAN 10
VLAN 20
VLAN 30
VLAN 40
MSTI
MSTI 1
MSTI 0
MSTI 3
MSTI 4
Enable packets of VLAN 10, VLAN 30, VLAN 40, and VLAN 20 to travel along MSTI 1, MSTI 3,
MSTI 4, and MSTI 0 respectively.
In this network, Switch A and Switch B are operating at the distribution layer; Switch C and Switch D are
operating at the access layer. VLAN 10 and VLAN 30 are terminated at the distribution layer and VLAN
40 is terminated at the access layer. Configure Switch A as the root bridge of MSTI 1, Switch B as the
root bridge of MSTI 3, and Switch C as the root bridge of MSTI 4.
1-1
Software version
Hardware version
S5600 series
All versions
S5100-SI/EI series
All versions
S3600-SI/EI series
All versions
S3100-EI series
All versions
All versions
S3100-52P
S3100-C-SI series
S3100-T-SI series
S3100-52P
Configuration Procedure
1)
Configuration on Switch A
# Configure the region name, VLAN-to-MSTI mapping, and revision level of the MST region.
[SwitchA-mst-region] region-name example
[SwitchA-mst-region] instance 1 vlan 10
[SwitchA-mst-region] instance 3 vlan 30
[SwitchA-mst-region] instance 4 vlan 40
[SwitchA-mst-region] revision-level 0
2)
Configuration on Switch B
# Configure the region name, VLAN-to-MSTI mapping, and revision level of the MST region.
[SwitchB-mst-region] region-name example
[SwitchB-mst-region] instance 1 vlan 10
[SwitchB-mst-region] instance 3 vlan 30
[SwitchB-mst-region] instance 4 vlan 40
[SwitchB-mst-region] revision-level 0
1-2
3)
Configuration on Switch C
4)
Configuration on Switch D
Complete Configuration
Configuration on Switch A
#
stp instance 1 root primary
stp region-configuration
region-name example
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
Configuration on Switch B
#
stp instance 3 root primary
stp region-configuration
1-3
region-name example
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
Configuration on Switch C
#
stp instance 4 root primary
stp region-configuration
region-name example
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
Configuration on Switch D
#
stp region-configuration
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
Precautions
None
1-4
Network Diagram
Figure 1-2 Network diagram for VLAN-VPN tunneling configuration
to achieve transparent STP BPDU transmission between the customer networks over the service
provider network.
Software version
Hardware version
S5600 series
All versions
S5100-SI/EI series
All versions
S3600-SI/EI series
All versions
All versions
S3100-52P
S3100-C-SI series
S3100-T-SI series
S3100-52P
Configuration Procedure
1)
Configuration on Switch A
# Enable MSTP.
<SwitchA> system-view
[SwitchA] stp enable
2)
Configuration on Switch B
1-5
# Enable MSTP.
<SwitchB> system-view
[SwitchB] stp enable
3)
Configuration on Switch C
# Enable MSTP.
<SwitchC> system-view
[SwitchC] stp enable
# Configure Ethernet 1/0/2 as a trunk port, and assign the port to VLAN 10.
[SwitchC] interface Ethernet1/0/2
[SwitchC-Ethernet1/0/2] port link-type trunk
[SwitchC-Ethernet1/0/2] port trunk permit vlan 10
4)
Configuration on Switch D
# Enable MSTP.
<SwitchD> system-view
[SwitchD] stp enable
# Configure Ethernet 1/0/1 as a trunk port, and assign the port to VLAN 10.
[SwitchD] interface Ethernet1/0/1
[SwitchD-Ethernet1/0/1] port link-type trunk
[SwitchD-Ethernet1/0/1] port trunk permit vlan 10
1-6
Complete Configuration
1)
Configuration on Switch A
#
stp enable
#
interface Ethernet1/0/1
port access vlan 10
#
2)
Configuration on Switch B
#
stp enable
#
interface Ethernet1/0/1
port access vlan 10
#
3)
Configuration on Switch C
#
stp enable
#
vlan-vpn tunnel
#
interface Ethernet1/0/1
stp disable
port access vlan 10
vlan-vpn enable
#
interface Ethernet1/0/2
port link-type trunk
port trunk permit vlan 1 10
#
4)
Configuration on Switch D
#
stp enable
#
vlan-vpn tunnel
#
interface Ethernet1/0/2
stp disable
port access vlan 10
vlan-vpn enable
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan 1 10
#
1-7
Precautions
The bpdu-tunnel stp command is mutually exclusive with the vlan-vpn tunnel command.
Configuring RSTP
The switches listed inApplicable Product Matrix work in MSTP mode by default. To implement RSTP,
configure the stp mode command on them to have them work in RSTP mode.
Network Diagram
Figure 1-3 Network diagram for RSTP configuration
Switch C is operating as the backup switch of Switch B. When Switch B fails, Switch C takes over.
Switch C and Switch B are connected through two links. When a link fails, another link takes over.
In the configuration procedure below, only RSTP-related configurations are provided. Switch A is the
root bridge. Switch D through Switch F are mostly consistent in the configuration, so only the
configuration on Switch D is listed.
1-8
In most cases, Switch A is a high-end switch or middle-range switch, such as a S9500 switch or
S7500 switch.
In most cases, Switch B and Switch C are low-end switches such as S3600 series switches and
Software version
Hardware version
S5600 series
All versions
S5100-SI/EI series
All versions
S3600-SI/EI series
All versions
S3100-EI series
All versions
All versions
S3100-52P
S3100-C-SI series
S3100-T-SI series
S3100-52P
Configuration Procedure
1)
Configuration on Switch A
# Configure Switch A as the root bridge in one of the following two methods:
z
# Enable the root guard function on the designated ports connected to Switch B and Switch C.
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA -GigabitEthernet2/0/1] stp root-protection
[SwitchA -GigabitEthernet2/0/1] quit
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA -GigabitEthernet2/0/2] stp root-protection
[SwitchA -GigabitEthernet2/0/2] quit
1-9
# Disable RSTP on all ports that do not participate in RSTP calculation, GigabitEthernet 2/0/4 for
example. (You need to do this because enabling RSTP on a switch enables RSTP on all ports by
default.)
[SwitchA] interface GigabitEthernet 2/0/4
[SwitchA-GigabitEthernet2/0/4] stp disable
2)
Configuration on Switch B
# Configure Switch C and Switch B to back up each other, and set the bridge priority of Switch B to
4096.
[SwitchB] stp priority 4096
# Disable RSTP on all ports that do not participate in RSTP calculation, Ethernet 1/0/8 for example.
[SwitchB] interface Ethernet 1/0/8
[SwitchB-Ethernet1/0/8] stp disable
Configuration on Switch C
# Configure Switch C and Switch B to back up each other, and set the bridge priority of Switch C to
8192.
[SwitchC] stp priority 8192
1-10
# Disable RSTP on all ports that do not participate in RSTP calculation, Ethernet 1/0/8 for example.
[SwitchC] interface Ethernet 1/0/8
[SwitchC-Ethernet1/0/8] stp disable
Configuration on Switch D
# Configure the ports directly connected to users as edge ports and enable the BPDU guard function on
these ports. Take Ethernet 1/0/3 for example.
[SwitchD-Ethernet1/0/3] stp edged-port enable
[SwitchD-Ethernet1/0/3] quit
[SwitchD] stp bpdu-protection
# Disable RSTP on all ports that do not participate in RSTP calculation, Ethernet 1/0/3 for example.
[SwitchD] interface Ethernet 1/0/3
[SwitchD-Ethernet1/0/3] stp disable
Complete Configuration
1)
Configuration on Switch A
#
stp mode rstp
stp instance 0 priority 0
(stp instance 0 root primary)
stp TC-protection enable
stp enable
#
interface GigabitEthernet2/0/1
stp root-protection
#
interface GigabitEthernet2/0/2
stp root-protection
#
1-11
interface GigabitEthernet2/0/4
stp disable
#
2)
Configuration on Switch B
#
stp mode rstp
stp instance 0 priority 4096
stp enable
#
interface Ethernet1/0/4
stp root-protection
#
interface Ethernet1/0/5
stp root-protection
#
interface Ethernet1/0/6
stp root-protection
#
interface Ethernet1/0/8
stp disable
#
3)
Configuration on Switch C
#
stp mode rstp
stp instance 0 priority 8192
stp enable
#
interface Ethernet1/0/1
stp root-protection
#
interface Ethernet1/0/2
stp root-protection
#
interface Ethernet1/0/3
stp root-protection
#
interface Ethernet1/0/8
stp disable
#
4)
Configuration on Switch D
#
stp mode rstp
stp enable
#
interface Ethernet1/0/3
stp disable
interface Ethernet3/0/5
1-12
Precautions
None
Rapid Transition
The proprietary spanning tree protocols of some vendors provide port state transition mechanisms
similar to RSTP. For a switch running such a proprietary protocol, its rapid port state transition
mechanism may fail on the designation port when the switch is downlinked to an MSTP-enabled H3C
switch.
To address the problem, you can enable the rapid transition feature on the downstream H3C switch.
Network Diagram
Figure 1-4 Network diagram for digest snooping and rapid transition configuration
Use another vendors switch, Switch A in this scenario, as the root switch.
For Switch B:
z
For Switch C:
1-13
Software version
Hardware version
S5600 series
All versions
S5100-SI/EI series
All versions
S3600-SI/EI series
All versions
S3100-EI series
All versions
All versions
S3100-52P
S3100-C-SI series
S3100-T-SI series
S3100-52P
Configuration Procedure
1)
Configuration on Switch B
# Enable MSTP.
<SwitchB> system-view
[SwitchB] stp enable
2)
Configuration on Switch C
# Enable MSTP.
<SwitchC> system-view
[SwitchC] stp enable
1-14
[SwitchC-Ethernet1/0/2] quit
Complete Configuration
1)
Configuration on Switch B
#
stp enable
stp instance 0 priority 4096
stp config-digest-snooping
#
interface Ethernet1/0/1
stp config-digest-snooping
stp no-agreement-check
#
2)
Configuration on Switch C
#
stp enable
stp instance 0 priority 8192
stp config-digest-snooping
#
interface Ethernet1/0/1
stp no-agreement-check
#
interface Ethernet1/0/2
stp config-digest-snooping
Precautions
z
The digest snooping feature is needed only when your switch is connected to another
manufacturers switches adopting proprietary spanning tree protocols.
To enable the digest snooping feature successfully, you must first enable it on all the ports of your
switch that are connected to another manufacturers switches adopting proprietary spanning tree
protocols and then enable it globally.
To enable the digest snooping feature, the interconnected switches and another manufacturers
switch adopting proprietary spanning tree protocols must be configured with exactly the same MST
region-related configurations (including region name, revision level, and VLAN-to-MSTI mapping).
The digest snooping feature must be enabled on all the switch ports that connect to another
manufacturers switches adopting proprietary spanning tree protocols in the same MST region.
The digest snooping feature is not applicable to boundary ports in an MST region.
The digest snooping feature is not applicable to edge ports in an MST region.
The rapid transition feature can be enabled only on root ports or alternate ports.
You can enable rapid transition on a designated port, but the configuration cannot take effect on
the port.
1-15