Syntax
active region-configuration
View
MST region view
Parameter
None
Description
Use the active region-configuration
command to activate the settings of a multiple spanning tree (MST) region.
Configuring MST region-related parameters
(especially the VLAN mapping table) is probable to result in network topology
jitter. To reduce network topology jitter caused by the configuration, multiple
spanning tree protocol (MSTP) does not recalculate spanning trees immediately
after the configuration; it does this only after you activate the new MST
region-related settings or enable MSTP, and then the new settings can really
take effect.
When you carry out this command, MSTP will
replace the currently running MST region–related parameters with the
parameters you have just configured and will perform spanning tree recalculation.
Related command: instance, region-name,
revision-level, vlan-mapping modulo, and check
region-configuration.
Example
# Activate the MST region-related settings.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp region-configuration
[H3C-mst-region] active
region-configuration
Syntax
bpdu-drop any
undo bpdu-drop any
View
Ethernet port view
Parameter
None
Description
Use the bpdu-drop any command to enable
the function of dropping BPDU packets on the Ethernet port.
Use the undo bpdu-drop any command
to disable the function of dropping BPDU packets on the Ethernet port.
The function of dropping BPDU packets is
disabled on the Ethernet port by default.
In a STP-enabled network, some users may
send BPDU packets to the switch continuously with the purpose of destroying the
network. When a switch receives the BPDU packets, it will forward them to other
switches. As a result, STP calculation is performed continuously, which may
occupy too much CPU of the switches or cause errors in the protocol state of
the BPDU packets.
In order to avoid this problem, you can
enable the function of dropping BPDU packets on the Ethernet port. Once the
function is enabled on a port, the port will not receive or forward any BPDU
packets. In this way, the switch is protected against the BPDU packet attack so
that the STP calculation is assured to be right.
Example
# Enable the function of dropping BPDU
packets on Ethernet1/0/1.
<H3C>system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface Ethernet 1/0/1
[H3C-Ethernet1/0/1] bpdu-drop any
Syntax
check region-configuration
View
MST region view
Parameter
None
Description
Use the check region-configuration
command to display the configuration information about the inactivated regions,
including region name, revision level, and VLAN mapping table.
In MSTP, the configuration of MST regions
must be right, especially the VLAN mapping table. MSTP-enabled switches are in the
same region only when they have the same MST region-related configuration,
including region name, revision level, and VLAN mapping table. A switch cannot
be in the expected region if any of the three MST region-related parameters above
are not consistent with those of another switch in the region.
This command is used to display the
configuration information of inactivated MST regions. You can use this command
to find the MST region the switch currently belongs to or check to see whether
or not the MST region-related configuration is correct.
Related command: instance, region-name,
revision-level, vlan-mapping modulo, and active
region-configuration.
Example
# Display the MST region-related configuration
of the current switch.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp region-configuration
[H3C-mst-region] check
region-configuration
Admin Configuration
Format selector :0
Region name :00e0fc003600
Revision level :0
Instance Vlans Mapped
0 1 to 9, 11 to 4094
16 10
Table 1-1
Description on the fields of the check
region-configuration command
|
Field
|
Description
|
|
Format
selector
|
The
selector specified by MSTP
|
|
Region
name
|
The name
of the MST region
|
|
Revision
level
|
The
revision level of the MST region
|
|
Instance Vlans
Mapped
|
VLAN-to-MSTI
mappings in the MST region
|
Syntax
display stp [
instance instance-id ] [ interface interface-list
| slot slot-number ] [ brief ]
View
Any view
Parameter
instance-id:
ID of the spanning tree instance ranging from 0 to 16. The value of 0 refers to
the common and internal spanning tree (CIST).
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
slot slot-number: Specifies a slot whose STP-related information is to be displayed.
brief:
Displays only port state and protection measures taken on the port.
Description
Use the display stp command to
display the state and statistical information about one or all spanning trees.
The state and statistical information about
MSTP can be used to analyze and maintain the topology of a network. It can also
be used to make MSTP operate properly.
l
If neither spanning tree instance nor port list
is specified, the command displays spanning tree information about all spanning
tree instances on all ports in the order of port number.
l
If only one spanning tree instance is specified,
the command displays information about the specified spanning tree instance on
all ports in the order of the port number.
l
If only a port list is specified, the command
displays information about all spanning tree instances on these ports in the order
of the port numbers.
l
If both a spanning tree instance ID list and a port
list are specified, the command displays spanning tree information about the
specified spanning tree instances and the specified ports in the order of
spanning tree instance ID.
MSTP state information includes:
1)
Global CIST parameters:
Protocol operating mode, switch priority in the CIST
instance, MAC address, hello time, max age, forward delay, max hops, the common
root of the CIST, the external path cost for the switch to reach the CIST
common root, region root, the internal path cost for the switch to reach the
region root, CIST root port of the switch, the state of the BPDU protection
function (enabled or disabled), and the state of the digest snooping feature
(enabled or disabled).
2)
CIST port parameters: Port protocol, port role,
port priority, path cost, designated bridge, designated port, edge
port/non-edge port, whether or not the link on a port is a point-to-point link,
the maximum transmitting speed, type of the enabled root protection function,
state of the digest snooping feature (enabled or disabled), VLAN mappings, hello
time, max age, forward delay, Message-age time, and remaining hops.
3)
Global MSTI parameters: MSTI instance ID, bridge priority of the instance, region root,
internal path cost, MSTI root port, and master bridge.
4)
MSTI port parameters: Port state, role,
priority, path cost, designated bridge, designated port, and remaining hops.
The statistical information includes: the numbers of the TCN BPDUs, the configuration BPDUs, the RST BPDUs, and
the MST BPDUs transmitted/received by each port.
Related command: reset stp.
Example
# Display the state and statistical
information about a spanning tree.
<H3C> display stp instance 0
interface Ethernet 1/0/1 to Ethernet 1/0/4 brief
MSTID Port
Role STP State Protection
0 Ethernet1/0/1
ALTE DISCARDING LOOP
0 Ethernet1/0/2
DESI FORWARDING NONE
0 Ethernet1/0/3
DESI FORWARDING NONE
0 Ethernet1/0/4
DESI FORWARDING NONE
Table 1-2
Description on the fields of the display stp
command
|
Field
|
Description
|
|
MSTID
|
ID of a spanning tree instance in the MST
region
|
|
Port
|
Port index corresponding to a spanning
tree instance
|
|
Role
|
Port role
|
|
STP State
|
STP state on the port, which can be
forwarding and discarding.
|
|
Protection
|
Protection type of the port
|
Syntax
display stp region-configuration
View
Any view
Parameter
None
Description
Use the display stp region-configuration
command to display the activated MST region configuration, including the region
name, region revision level, and VLAN-to-STI mappings configured for the
switch.
Related command: stp
region-configuration.
Example
# Display the configuration of the MST
region.
<H3C> display stp
region-configuration
Oper Configuration
Format selector :0
Region name :hello
Revision level :0
Instance Vlans Mapped
0 21 to 4094
1 1 to 10
2 11 to 20
Table 1-3
Description on the fields of the display stp
region-configuration command
|
Field
|
Description
|
|
Format selector
|
The selector specified by MSTP
|
|
Region name
|
The name of the MST region
|
|
Revision level
|
The revision level of the MST region
|
|
Instance Vlans Mapped
|
VLAN-to-STI mappings in the MST region
|
1.1.6 instance
Syntax
instance instance-id
vlan vlan-list
undo instance instance-id [ vlan vlan-list ]
View
MST region view
Parameter
instance-id:
ID of a spanning tree instance ranging from 0 to 16. The value of 0 refers to
the CIST.
vlan-list:
List of VLANs. You need to provide this argument in the form of vlan-list = {
vlan-id [ to vlan-id ] }&<1-10>, where
&<1-10> means that you can provide up to 10 VLAN IDs/VLAN ID ranges for
this argument. Normally, a VLAN ID can be a number ranging from 1 to 4,094. VLANs
with their IDs beyond this range (if the switch supports this kind VLAN IDs),
such as VLAN 4095, VLAN 4096, can only be mapped to the CIST (spanning tree
instance 0).
Description
Use the instance command to map
specified VLANs to a specified spanning tree instance.
Use the undo instance command to
remove the mappings from the specified VLANs to the specified spanning tree
instance and remap the specified VLANs to the CIST (spanning tree instance 0).
If you specify no VLAN in the undo instance command, all VLANs that are
mapped to the specified spanning tree instance are remapped to the CIST.
By default, all VLANs are mapped to the
CIST.
VLAN-to-MSTI mappings are recorded in the VLAN
mapping table of an MSTP-enabled switch. So these two commands are actually
used to manipulate the VLAN mapping table. You can add/remove a VLAN to/from
the VLAN mapping table of a specific spanning tree instance by using these two
commands.
Note that a VLAN cannot be mapped to
multiple spanning tree instances at the same time. A VLAN-to-MSTI mapping is
automatically removed if you map the VLAN to another spanning tree instance.
Related command: region-name, revision-level,
vlan-mapping modulo, check region-configuration, and active
region-configuration.
Example
# Map VLAN 2 to spanning tree instance 1.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp region-configuration
[H3C-mst-region] instance 1 vlan 2
Syntax
region-name name
undo region-name
View
MST region view
Parameter
name: MST
region name to be set for the switch, a string of 1 to 32 characters.
Description
Use the region-name command to set an
MST region name for a switch.
Use the undo region-name command to restore
the MST region name to the default value.
The default MST region name of a switch is
its MAC address.
MST region name, along with VLAN mapping
table and MSTP revision level, determines the MST region which a switch belongs
to.
Related command: instance, revision-level,
check region-configuration, vlan-mapping modulo, and active
region-configuration.
Example
# Set the MST region name of the switch to
“hello”.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp region-configuration
[H3C-mst-region] region-name hello
Syntax
reset stp [ interface
interface-list ]
View
User view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
Description
Use the reset stp command to clear
spanning tree statistics.
The spanning tree statistics includes the
numbers of TCN BPDUs, configuration BPDUs, RST BPDUs, and MST BPDUs sent/received
through one or more specified ports or all ports (note that STP BPDUs and TCN BPDUs
are counted only for CISTs.)
This command clears the spanning tree statistics
on specified ports if you specify the interface-list argument. If you do
not specify the interface-list argument, this command clears the
spanning tree statistics on all ports.
Related command: display stp.
Example
# Clear the spanning tree statistics on Ethernet1/0/1
through Ethernet1/0/3.
<H3C> reset stp interface
Ethernet 1/0/1 to Ethernet 1/0/3
Syntax
revision-level level
undo revision-level
View
MST region view
Parameter
level: MSTP
revision level to be set for the switch. This argument ranges from 0 to 65,535.
Description
Use the revision-level command to
set the MSTP revision level for a switch.
Use the undo revision-level command
to restore the revision level to the default value.
By default, the MSTP revision level of a
switch is 0.
MSTP revision level, along with MST region
name and VLAN mapping table, determines the MST region which a switch belongs
to.
Related command: instance, region-name,
check region-configuration, vlan-mapping modulo, and active
region-configuration.
Example
# Set the MSTP revision level of the MST
region to 5.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp region-configuration
[H3C-mst-region] revision-level 5
Syntax
stp { enable
| disable }
undo stp
View
System view, Ethernet port view
Parameter
enable:
Enables MSTP globally or on the specified port(s).
disable:
Disables MSTP globally or on the specified port(s).
Description
Use the stp command to
enable/disable MSTP globally or on the specified port(s).
Use the undo stp command to restore the
MSTP state to the default value globally or on the port(s).
By default, MSTP is disabled on switches.
After MSTP is enabled, the actual operating
mode, which can be STP-compatible mode, RSTP-compatible mode, or MSTP mode, is
determined by the user-defined protocol mode. A switch becomes a transparent
bridge if MSTP is disabled.
After being enabled, MSTP maintains
spanning trees by processing configuration BPDUs of different VLANs. After being
disabled, it stops maintaining spanning trees.
Related command: stp mode, and stp
interface.
Example
# Enable MSTP globally.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp enable
# Disable MSTP on Ethernet1/0/1.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface Ethernet 1/0/1
[H3C-Ethernet1/0/1] stp disable
Syntax
stp bpdu-protection
undo stp bpdu-protection
View
System view
Parameter
None
Description
Use the stp bpdu-protection command
to enable the BPDU protection function on the switch.
Use the undo stp bpdu-protection
command to restore to the default state of the BPDU protection function.
By default, the BPDU protection function is
disabled.
Normally, the access ports of the devices
operating on the access layer are directly connected to terminals (such as PCs)
or file servers. These ports are usually configured as edge ports to implement
rapid transition. But they resume non-edge ports automatically upon receiving
configuration BPDUs, which causes spanning trees recalculation and network
topology jitter.
Normally, no configuration BPDU will reach
edge ports. But malicious users can attack a network by sending configuration BPDUs
deliberately to edge ports to cause network jitter. You can prevent such
attacks by enabling the BPDU protection function. With this function enabled on
a switch, the switch shuts down the edge ports that receive configuration BPDUs
and then reports these cases to the administrator. If an edge port is shut
down, only the administrator can restore it.
Example
# Enable the BPDU protection function.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp bpdu-protection
Caution:
As Gigabit ports of
an S3600 Ethernet switch cannot be shut down, the BPDU protection function is
not applicable to these ports even if you enable the BPDU protection function
and specify these ports to be MSTP edge ports.
Syntax
stp bridge-diameter bridgenum
undo stp bridge-diameter
View
System view
Parameter
bridgenum:
Network diameter to be set for a switched network. This argument ranges from 2
to 7.
Description
Use the stp bridge-diameter command
to set the network diameter of a switched network. The network diameter of a
switched network is represented by the maximum possible number of switches
between any two terminal devices in a switched network.
Use the undo stp bridge-diameter
command to restore the network diameter to the default value.
By default, the network diameter is 7.
After you configure the network diameter of
a switched network, MSTP adjusts its hello time, forward delay, and max age
settings accordingly. With the network diameter set to the default value 7, the
three time-relate settings, including hello time, forward delay, and max age,
are set to their default values as well.
The stp bridge-diameter command only
applies to CIST. It is invalid for MSTIs.
Related command: stp timer forward-delay,
stp timer hello, and stp timer max-age.
Example
# Set the network diameter to 5.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp bridge-diameter 5
Syntax
stp compliance { auto | legacy | dot1s }
undo stp compliance
View
Ethernet port view
Parameter
auto: Sets the MSTP packet format to auto.
legacy: Sets the MSTP packet format to legacy.
dot1s: Sets the MSTP packet format to dot1s.
Description
Use the stp compliance command to set
the MSTP packet format for the port.
Use the undo stp compliance command
to restore the MSTP packet format to the default value for the port.
By default, the MSTP packet format for a
port is legacy.
l
With the MSTP packet format set to auto
for the port, the port automatically determines the format of received MSTP packets
and then determines the format of the packets to be transmitted according to
that of the received MSTP packets, thus implementing interconnection with the
peer devices. If the format of the received packets changes repeatedly, MSTP
will shut down the corresponding port to prevent network storm. A port shut
down in this way can only be enabled again by the network administrator after
login.
l
With the MSTP packet format set to legacy,
the port only processes and transmits MSTP packets in legacy format, thus
implementing interconnection with the peer devices transmitting packets in legacy
format. If packets in dot1s format are received, the corresponding ports
are set as discarding ports to prevent network storm.
l
With the MSTP packet format set to dot1s,
the port only processes and transmits MSTP packets in dot1s format, thus
implementing communication with peer devices transmitting packets in dot1s
format. If packets in legacy format are received, the corresponding
ports are set as discarding ports to prevent network storm.
l
All the ports in an aggregation group use the
same MSTP packet format.
Example
# Configure MSTP packet format as dot1s
(802.1s).
<H3C> system-view
Enter system view, return to user
view with Ctrl+Z.
[H3C] interface Ethernet1/0/1
[H3C-Ethernet1/0/1] stp compliance
dot1s
# Restore the default MSTP packet format.
[H3C-Ethernet1/0/1] undo stp
compliance
Syntax
stp config-digest-snooping
undo stp config-digest-snooping
View
System view
Parameter
None
Description
Use the stp config-digest-snooping
command to enable the digest snooping feature.
Use the undo stp config-digest-snooping
command to disable the digest snooping feature.
The digest snooping feature is disabled by
default.
According to IEEE 802.1s, two interconnected
switches can interwork with each other through MSTIs in an MST region only when
the two switches have the same MST region-related configuration. With MSTP enabled,
interconnected switches determine whether or not they are in the same MST
region by checking the configuration IDs of the BPDUs between them. (A
configuration ID contains information such as region ID and configuration
digest.)
As some other manufacturers' switches adopt
proprietary spanning tree protocols, they cannot interwork with other switches
in an MST region even if they are configured with the same MST region-related
settings as other switches in the MST region.
This kind of problems can be overcome by
implementing the digest snooping feature. If a switch port is connected to another
manufacturer’s switch that has the same MST region-related settings but
adopts a proprietary spanning tree protocol, you can enable the digest snooping
feature on the port when it receives BPDU packets from another manufacturer's
switch. Then the switch considers these BPDU packets to be from its own MST
region and records the configuration digests carried in the BPDU packets
received from the switch, which will be put in the BPDU packets to be sent to another
manufacturer’s switch. In this way, the switch can interwork with another
manufacturer’s switches in an MST region.
l
When the digest snooping feature is enabled on a
port, the port state turns to the discarding state. That is, the port will not
send BPDU packets. The port is not involved in the STP calculation until it
receives BPDU packets from the peer port.
l
The digest snooping feature is needed only when
your switch is connected to another manufacturer’s switches adopting proprietary spanning tree protocols.
l
To enable the digest snooping feature
successfully, you must first enable it on all the switch ports that connect to another
manufacturer’s switches adopting proprietary spanning tree protocols and
then enable it globally.
l
To enable the digest snooping feature, the
interconnected switches must be configured with exactly the same MST
region-related settings.
l
The digest snooping feature must be enabled on
all the switch ports that connect to another
manufacturer’s switches adopting proprietary spanning
tree protocols in the same MST region.
l
With the digest snooping feature enabled, the
VLAN-to-MSTI mapping cannot be modified.
l
The digest snooping feature is not applicable to
edge ports in the MST region.
l
The digest snooping function is not applicable
to edge ports.
Example
# Enable the digest snooping feature on Ethernet1/0/1.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface Ethernet1/0/1
[H3C-Ethernet1/0/1] stp config-digest-snooping
[H3C-Ethernet1/0/1] quit
[H3C] stp config-digest-snooping
Syntax
stp [
instance instance-id ] cost cost
undo stp [
instance instance-id ] cost
View
Ethernet port view
Parameter
instance-id:
ID of a spanning tree instance ranging from 0 to 16. The value of 0 refers to
the CIST.
cost: Path cost
to be set for the port. This argument ranges from 1 to 200,000.
Description
Use the stp cost command to set the
path cost of the current port in a specified spanning tree instance.
Use the undo stp cost command to restore
the default path cost of the current port in the specified spanning tree
instance.
By default, a switch automatically calculates
the path costs of a port in different spanning tree instances based on a specified
standard.
If you specify the instance-id
argument to be 0 or do not specify this argument, the stp cost command
sets the path cost of the port in CIST.
The path cost of a port affects its port
role. By configuring different path costs for the same port in different MSTIs,
you can make flows of different VLANs travel along different physical links, so
as to achieve VLAN-based load balancing. Changing the path cost of a port in a spanning
tree instance may change the role of the port in the instance and put it in
state transition.
Related command: stp interface cost.
Example
# Set the path cost of Ethernet1/0/3 in
spanning tree instance 2 to 200.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface Ethernet1/0/3
[H3C-Ethernet1/0/3] stp instance 2 cost
200
Syntax
stp edged-port { enable | disable }
undo stp edged-port
View
Ethernet port view
Parameter
enable:
Configures the current Ethernet port as an edge port.
disable:
Configures the current Ethernet port as a non-edge port.
Description
Use the stp edged-port enable
command to configure the current Ethernet port as an edge port.
Use the stp edged-port disable
command to configure the current Ethernet port as a non-edge port.
Use the undo stp edged-port command
to restore the current Ethernet port to its default state.
By default, all Ethernet ports of a switch
are non-edge ports.
An edge port is a port that is directly
connected to a user terminal instead of another switch or shared network
segment. Rapid transition to the forwarding state is applied to edge ports
because on these ports no loops can be incurred by network topology changes. You
can enable a port to turn to the forwarding state rapidly by setting it to an
edge port. And you are recommended to configure the Ethernet ports directly
connected to user terminals as edge ports to enable them to turn to the
forwarding state rapidly.
Normally, configuration BPDUs cannot reach an
edge port because the port is not connected to another switch. But when the
BPDU protection function is disabled on an edge port, configuration BPDUs sent
deliberately by a malicious user may reach the port. If
an edge port receives a BPDU, it turns to a non-edge
port.
Related command: stp interface
edged-port.
Caution:
Among loop prevention function and edge port setting, only one can
be valid on a port at one time.
Example
# Configure Ethernet1/0/1 as a non-edge
port.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface Ethernet1/0/1
[H3C-Ethernet1/0/1] stp edged-port
disable
Syntax
stp interface interface-list { enable | disable }
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
enable:
Enables MSTP on the specified ports.
disable:
Disables MSTP on the specified ports.
Description
Use the stp interface command to
enable or disable MSTP on specified ports in system view.
By default, MSTP is enabled on the ports of
a switch if MSTP is globally enabled on the switch, and MSTP is disabled on the
ports if MSTP is globally disabled.
An MSTP-disabled port does not participate
in any spanning tree calculation and is always in the forwarding state.
Caution:
Disabling MSTP on ports may result in loops.
Related command: stp mode, and stp.
Example
# Enable MSTP on Ethernet1/0/1 in system
view.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/1
enable
Syntax
stp interface interface-list config-digest-snooping
undo stp interface interface-list config-digest-snooping
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the format of interface-list ={ interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
Description
Use the stp interface config-digest-snooping
command to enable the digest snooping feature.
Use the undo stp interface config-digest-snooping
command to disable the digest snooping feature.
By default, the digest snooping feature is
disabled.
According to IEEE 802.1s, two
interconnected MSTP switches can interwork with each other through MSTIs in an
MST region only when the two switches have the same MST region-related
configuration. Interconnected MSTP switches determine whether or not they are
in the same MST region by checking the configuration IDs of the BPDUs between
them. (A configuration ID contains information such as region ID and
configuration digest.)
As some another manufacturer’s
switches adopt proprietary spanning tree protocols, they cannot interwork with
other switches in an MST region even if they are configured with the same MST
region-related settings as other switches in the MST region.
This kind of problems can be overcome by
implementing the digest snooping feature. If a switch port is connected to another
manufacturer’s switch that has the same MST region-related settings but
adopts a proprietary spanning tree protocol, you can enable the digest snooping
feature on the port when it receives BPDU packets from another manufacturer's
switch. Then the switch considers these BPDU packets to be from its own MST
region and records the configuration digests carried in the BPDU packets
received from the switch, which will be put in the BPDU packets to be sent to
the another manufacturer’s switch. In this way, the switch can interwork
with another manufacturer’s switches in an MST region.
l
When the digest snooping feature is enabled on a
port, the port state turns to the discarding state. That is, the port will not
send BPDUs. The port is not involved in the STP calculation until it receives BPDUs
from the peer port.
l
The digest snooping feature is needed only when
your switch is connected to another manufacturer’s switches adopting proprietary spanning tree protocols.
l
To enable the digest snooping feature
successfully, you must first enable it on all the switch ports that connect to another
manufacturer’s switches adopting proprietary spanning tree protocols and
then enable it globally.
l
To enable the digest snooping feature, the
interconnected switches must be configured with exactly the same MST region-related
settings.
l
The digest snooping feature must be enabled on
all the switch ports that connect to another
manufacturer’s switches adopting proprietary spanning
tree protocols in the same MST region.
l
With the digest snooping feature enabled, the
VLAN-to-MSTI mapping cannot be modified.
l
The digest snooping feature is not applicable to
edge ports in the MST region.
l
The digest snooping function is not applicable
to edge ports.
Example
# Enable the digest snooping feature on
Ethernet1/0/1 in system view.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/1 config-digest-snooping
Syntax
stp interface interface-list [ instance instance-id ] cost cost
undo stp interface interface-list [ instance instance-id ] cost
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
instance-id:
Spanning tree instance ID ranging from 0 to 16. The value of 0 refers to the
CIST.
cost: Port
path cost to be set. This argument ranges from 1 to 200,000,000.
Description
Use the stp interface cost command
to set the path cost(s) of the specified port(s) in a specified spanning tree
instance in system view.
Use the undo stp interface cost
command to restore the default value of the path cost(s) of the specified port(s)
in the specified spanning tree instance in system view.
By default, a switch automatically calculates
the path costs of a port in different spanning tree instances based on a specified
standard.
If you specify the instance-id
argument to be 0 or do not specify this argument, the stp interface cost
command sets the path cost(s) of the specified port(s) in the CIST.
The path cost of a port affects its port
role. By configuring different path costs for the same port in different MSTIs,
you can make flows of different VLANs travel along different physical links, so
as to achieve VLAN-based load balancing. Changing the path cost of a port in a
spanning tree instance may change the role of the port in the instance and put
it in state transition.
The default port path cost varies with port
speed. Refer to Table 1-4 for details.
Related command: stp cost.
Example
# Set the path cost of Ethernet1/0/3 in
spanning tree instance 2 to 400 in system view.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp instance 2 interface
Ethernet 1/0/3 cost 400
Syntax
stp interface interface-list edged-port { enable | disable }
undo stp interface interface-list edged-port
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
enable:
Configures the specified Ethernet port to be an edge port.
disable:
Configures the specified Ethernet port to be a non-edge port.
Description
Use the stp interface edged-port enable
command to configure the specified Ethernet ports as edge ports in system view.
Use the stp interface edged-port disable
command to configure the specified Ethernet ports as non-edge ports in system
view.
Use the undo stp interface edged-port
command to restore the specified Ethernet ports to the default state.
By default, all Ethernet ports of a switch
are non-edge ports.
An edge port is a port that is directly
connected to a user terminal instead of another switch or a network segment.
Rapid transition to the forwarding state is applied to edge ports because on
these ports no loops can be incurred by network topology changes. You can
enable a port to turn to the forwarding state rapidly by setting it to an edge
port. And you are recommended to configure the Ethernet ports directly
connected to user terminals as edge ports to enable them to turn to the
forwarding state rapidly.
Normally, configuration BPDUs cannot reach
an edge port because the port is not connected to another switch. But when the
BPDU protection function is disabled on an edge port, configuration BPDUs sent
deliberately by a malicious user may reach the port. If
an edge port receives a BPDU, it turns to a non-edge
port.
Related command: stp edged-port.
Caution:
Among loop prevention function and edge port setting, only one can
be valid on a port at one time.
Example
# Configure Ethernet1/0/3 as an edge port in
system view.
<H3C>
system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/3 edged-port
enable
Syntax
stp interface interface-list loop-protection
undo stp interface
interface-list loop-protection
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
Description
Use the stp interface loop-protection
command to enable the loop prevention function in system view.
Use the undo stp interface
loop-protection command to restore the default state of the loop prevention
function in system view.
The loop prevention function is disabled by
default.
Related command: stp loop-protection.
Caution:
Among loop prevention function and edge port setting, only one can be
valid on the same port at one time.
Example
# Enable the loop prevention function on Ethernet1/0/1.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/1
loop-protection
Syntax
stp [ interface
interface-list ] mcheck
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
Description
Use the stp interface mcheck command
to perform the mCheck operation on specified port(s) in system view.
A port on an MSTP-enabled switch migrates
to the STP-/RSTP-compatible mode automatically if an STP-/RSTP-enabled switch has
been connected to it. But when the STP-/RSTP-enabled switch is disconnected
from the port, the port cannot migrate back to the MSTP mode automatically. In
this case, you can force the port to migrate to the MSTP mode by performing the
mCheck operation on the port.
Related command: stp mcheck, and stp
mode.
Example
# Perform the mCheck operation on
Ethernet1/0/3 in system view.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/3 mcheck
Syntax
stp interface
interface-type interface-number no-agreement-check
undo stp interface interface-type interface-number no-agreement-check
View
System view
Parameter
interface-type: Port type.
interface-number: Port number.
Description
Use the stp interface no-agreement-check
command to enable the rapid transition feature on the specified port.
Use the undo stp interface
no-agreement-check command to disable the rapid transition feature on the
specified port.
The rapid transition feature is disabled on
any port by default.
Some manufactures' switches adopt
proprietary spanning tree protocols that are similar to RSTP in the way to
implement rapid transition on designated ports. When a switch of this kind
operates as the upstream switch of H3C series switches running MSTP, the
upstream designated port fails to change their states rapidly.
The rapid transition feature is developed on
the H3C series switches to avoid this case. When a H3C series switch running
MSTP is connected in the upstream direction to a manufacture's switch adopting
proprietary spanning tree protocols, you can enable the rapid transition
feature on the ports of the H3C series switch operating as the downstream
switch. Among these ports, those operating as the root ports will then send
agreement packets to their upstream ports after they receive proposal packets
from the upstream designated ports, instead of waiting for agreement packets
from the upstream switch. This enables designated ports of the upstream switch
to change their states rapidly.
Related command: stp no-agreement-check.
l
The rapid transition feature can be enabled on
root ports or alternate ports only.
l
You can enable the rapid transition feature on
the designated port, however, the feature does not take effect on the port.
Example
# Enable the rapid transition feature on
Ethernet1/0/1.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C]stp interface Ethernet1/0/1
no-agreement-check
Syntax
stp interface interface-list point-to-point { force-true | force-false
| auto }
undo stp interface interface-list point-to-point
View
System view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports by
providing this argument in the form of interface-list = { interface-type
interface-number [ to interface-type interface-number ] }
&<1-10>, where &<1-10> means that you can provide up to 10
port indexes/port index ranges for this argument.
force-true:
Specifies that the links connected to the specified Ethernet ports are
point-to-point links.
force-false:
Specifies that the links connected to the specified Ethernet ports are not
point-to-point links.
auto: Specifies
to automatically determine whether or not the links connected to the specified
Ethernet ports are point-to-point links.
Description
Use the stp interface point-to-point
command to specify whether the links connected to the specified Ethernet ports
are point-to-point links in system view.
Use the undo stp interface
point-to-point command to restore the links connected to the specified
ports to their default link types, which are automatically determined by MSTP.
If no keyword is specified in the stp
interface point-to-point command, the auto keyword is used by
default, and so MSTP automatically determines the types of the links connected
to the specified ports.
The rapid transition feature is not
applicable to ports connected to non-point-to-point links.
If an Ethernet port is the master port of
aggregated ports or operates in full-duplex mode, the link connected to the
port is a point-to-point link. You are recommended to let MSTP automatically
determine the link types.
These two commands apply to CIST and MSTIs.
If you configure the link to which a port is connected to be a point-to-point
link (or a non-point-to-point link), the configuration applies to all spanning
tree instances (that is, the port is configured to connect to a point-to-point
link (or a non-point-to-point link) in all spanning tree instances). If the
actual physical link is not a point-to-point link and you configure the link to
which the port is connected to be a point-to-point link, loops may temporarily
occur.
Related command: stp point-to-point.
Example
# Configure the link connected to
Ethernet1/0/3 as a point-to-point link in system view.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/3
point-to-point force-true