Syntax
active region-configuration
View
MST region view
Parameter
None
Description
Use the active region-configuration
command to activate the settings of an MST (multiple spanning tree) region.
Configuring MST region-related parameters
(especially the VLAN mapping table) results in spanning trees being
regenerated. To reduce network topology jitter caused by such configurations,
MSTP (multiple spanning tree protocol) does not regenerate 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.
This command causes the switch to operate
with the new MST region-related settings you configured and spanning trees to
be regenerated.
Related command: instance, region-name,
revision-level, vlan-mapping modulo, and check
region-configuration.
Example
# Activate the MST region-related settings
manually.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp region-configuration
[H3C-mst-region] active
region-configuration
Syntax
check region-configuration
View
MST region view
Parameter
None
Description
Use the check region-configuration
command to display the current MST region configuration information, including
the region name, the revision level, and the VLAN mapping table.
In an MSTP region, make sure that the MST
region-related settings (especially the VLAN mapping table) are right.
MSTP-enabled switches are in the same region only when they have the same MST
region-related settings. A switch cannot be in a respected region if any one of
the above three MST region-related settings is not consistent with that of
another switch in the region.
You can use this command to view
inactivated MST region-related settings, according to which you can find out
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 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 :00e0fc003900
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 MSTI, ranging from 0 to 16. A value of 0 specifies 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, the STP-related information about which is to be
displayed.
brief:
Displays only port state and guard measures taken on the port.
Description
Use the display stp command to
display the state and statistical information about one or all MSTIs.
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 MSTI nor port list is specified, the
command displays spanning tree information about all MSTIs on all ports in the
order of port numbers.
l
If only one MSTI is specified, the command
displays information about the specified MSTI on all ports in the order of the
port numbers.
l
If only a port list is specified, the command
displays information about all MSTIs on these ports in the order of the port
numbers.
l
If both an MSTI and a port list are specified,
the command displays spanning tree information about the specified MSTI and the
specified ports in the order of MSTI IDs.
MSTP state information includes:
l
Global CIST parameters:
Protocol operation mode, switch priority in the CIST
instance, MAC address, Hello time, Max age, Forward delay, Max hops, the CIST
root, the external path cost from the switch to the CIST root, region root, the
internal path cost from the switch to the region root, CIST root port of the
switch, the state of the BPDU (bridge protocol data unit) guard function
(enabled or disabled), and the state of the digest snooping function (enabled
or disabled).
l
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 the port
is a point-to-point link, the maximum transmitting
speed, type of the enabled guard function, state of the digest snooping
function (enabled or disabled), VLAN mappings, Hello time, Max age, Forward
delay, Message-age time, and Remaining-hops.
l
Global MSTI parameters: MSTI ID, bridge priority of the MSTI, region root, internal path
cost, MSTI root port, and master bridge.
l
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 an MSTI.
<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 an
MSTI in the MST region
|
|
Port
|
Port number corresponding to the
specified MSTI
|
|
Role
|
Port role
|
|
STP State
|
STP state
on the port, which can be forwarding and discarding.
|
|
Protection
|
Guard 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 information,
including the region name, the revision level, and the VLAN-to-MSTI mappings
configured for the switch.
Related command: stp
region-configuration.
Example
# Display the activated MST region
configuration.
<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-MSTI
mappings in the MST region
|
Syntax
instance instance-id
vlan vlan-list
undo instance instance-id [ vlan vlan-list ]
View
MST region view
Parameter
instance-id:
ID of an MSTI, ranging from 0 to 16. A value of 0 specifies 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 4094.
VLANs with their IDs beyond this range (if the switch supports this kind of VLAN
IDs), such as VLAN 4095, VLAN 4096, can only be mapped to the CIST (instance
0).
Description
Use the instance command to map
specified VLANs to a specified MSTI.
Use the undo instance command to
remove the mappings from the specified VLANs to the specified MSTI and remap
the specified VLANs to the CIST (instance 0). If you specify no VLAN in the undo
instance command, all VLANs mapped to the specified MSTI 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 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 MSTI by using these two commands.
Note that a VLAN cannot be mapped to
multiple MSTIs at the same time. A VLAN-to-MSTI mapping is automatically
removed if you map the VLAN to another MSTI.
Related command: region-name, revision-level,
vlan-mapping modulo, check region-configuration, and active
region-configuration.
Example
# Map VLAN 2 to MSTI 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
revert to the default MST region name.
The default MST region name of a switch is
its MAC address.
The MST region name, along with the VLAN
mapping table and the MSTP revision level, determines the MST region 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-related statistics on Ethernet ports.
The spanning tree statistics include the
numbers of the 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-related
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-related statistics on all ports.
Related command: display stp.
Example
# Clear the spanning tree-related
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 revert to the default revision level.
By default, the MSTP revision level is 0.
The MSTP revision level, along with the MST
region name and the VLAN mapping table, determines the MST region 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 a port.
disable:
Disables MSTP globally or on a port.
Description
Use the stp command to
enable/disable MSTP globally or on a port.
Use the undo stp command to revert
to the default MSTP state globally or on a port.
By default, MSTP is disabled globally and
on a port.
By default, once MSTP is enabled globally,
it is enabled on a port.
After MSTP is enabled, the actual operation
mode, which can be STP-compatible mode, RSTP-compatible mode, or MSTP mode, is
determined by the protocol mode configured by users. 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 guard function.
Use the undo stp bpdu-protection
command to revert to the default state of the BPDU guard function.
By default, the BPDU guard function is
disabled.
Normally, the access ports of the devices
operating on the access layer directly connect to terminals (such as PCs) or
file servers. These ports are usually configured as edge ports to achieve rapid
transition. But they resume non-edge ports automatically upon receiving
configuration BPDUs, which causes spanning tree regeneration 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 this
type of attacks by utilizing the BPDU guard 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 a
port is shut down, only the administrator can restore it.
Example
# Enable the BPDU guard function.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp bpdu-protection
1.1.11 stp
bridge-diameter
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 terminals in a switched network.
Use the undo stp bridge-diameter
command to revert to the default network diameter.
By default, the maximum number of switches
between any two terminal devices in the switched network is 7.
The network diameter parameter is
represented by the maximum number of switches between two communication ends.
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 7 (the default), the
three time-relate settings, Hello time, Forward delay, and Max age, are set to
their defaults 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
1.1.12 stp
config-digest-snooping
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 function.
Use the undo stp config-digest-snooping
command to disable the digest snooping function.
The digest snooping function is disabled by
default.
According to IEEE 802.1s, two connected
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
employed, 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 vendors' 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 function. If a switch port is connected to
another vendor's switch that has the same MST region-related settings but
adopts a proprietary spanning tree protocol, you can enable digest snooping on
the port. Then the switch regards the peer switch connected to the port as in
the same region and records the configuration digests carried in the BPDUs
received from the switch, which will be put in the BPDUs to be sent to the peer
switch. In this way, the switch can interwork with other vendors’
switches in an MST region.
l
The digest snooping function is needed only when
your S7500 switch is connected to other vendors’ proprietary spanning tree protocol-adopted switches.
l
To enable the digest snooping function
successfully, you must first enable it on all the switch ports that connect to
other vendors’ proprietary spanning tree protocol-adopted switches and
then enable it globally.
l
To enable the digest snooping function, the
interconnected switches must be configured with exactly the same MST region
settings.
l
The digest snooping function must be enabled on
all the switch ports that connect to other vendors' proprietary spanning tree protocol-adopted switches in the same MST region.
l
With the digest snooping function enabled, the
VLAN-to-MSTI mapping cannot be modified.
l
The digest snooping function is not applicable
to ports on the boundary of an MST region.
l
The digest snooping function is not applicable
to edge ports.
Example
# Enable the digest snooping function for
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 an MSTI, ranging from 0 to 16. A value of 0 specifies 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 MSTI.
Use the undo stp cost command to
revert to the default path cost of the current port in the specified MSTI.
By default, a switch automatically
calculates the path costs of a port in different MSTIs 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 on CIST.
The path costs of a port in MSTIs affect
the roles of the ports in the MSTIs. 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 an MSTI 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
MSTI 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 a network segment.
Rapid transition is applied to edge ports because, on these ports, no loops can
be incurred by network topology changes. You can enable a port to transit 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 transit 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 guard 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 guard
function, root guard 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 is disabled on the
ports if MSTP is globally disabled.
An MSTP-disabled port does not participate
in any calculation of spanning tree and is always in forwarding state.
Caution:
Disabling MSTP on ports may result in loops.
Related command: stp mode, 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 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
config-digest-snooping command to enable the digest snooping function.
Use the undo stp interface
config-digest-snooping command to disable the digest snooping function.
By default, the digest snooping function 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 other vendors' 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 problem can be overcome by
implementing the digest snooping function. If a port on an S7500 switch is
connected to another vendor's switch that has the same MST region-related
settings as its own but adopts a proprietary spanning tree protocol, you can
enable digest snooping on the port. Then the S7500 switch regards the switch of
another vendor as in the same region; it records the configuration digests
carried in the BPDUs received from the switch of another vendor, and put them
in the BPDUs to be sent to the switch of another vendor. In this way, the S7500
switches can interwork with other vendors' switches in the same MST region.
l
The digest snooping function is needed only when
your S7500 switch is connected to other vendors’ proprietary protocol-adopted switches.
l
To enable the digest snooping function
successfully, you must first enable it on all the ports of your S7500 switch
that are connected to other vendors’ proprietary protocol-adopted
switches and then enable it globally.
l
To enable the digest snooping function, the
interconnected switches must be configured with exactly the same MST region-related
configuration.
l
The digest snooping function must be enabled on
all the ports of your S7500 switch that are connected to other vendors' proprietary protocol-adopted
switches in the same MST region.
l
With the digest snooping function enabled, the
VLAN-to-MSTI mapping cannot be modified.
l
The digest snooping function is not applicable
to MST region edge ports.
l
The digest snooping function is not applicable
to edge ports.
Example
# Enable the digest snooping function 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:
MSTI ID ranging from 0 to 16. A value of 0 specifies 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 MSTI in system
view.
Use the undo stp interface cost
command to revert to the default path cost(s) of the specified port(s) in the
specified MSTI in system view.
By default, a switch automatically
calculates the path costs of a port in different MSTIs 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 costs of a port in MSTIs affect
the roles of the ports in the MSTIs. 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 an MSTI may change the role of the port in the MSTI
and put it in state transition.
The default port path cost differs with
port speed. Refer to Table 1-4 for details.
Related command: stp cost.
Example
# Set the path cost of Ethernet1/0/3 in
MSTI 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 ports to be edge ports.
disable:
Configures the specified Ethernet ports to be non-edge ports.
Description
Use the stp interface edged-port enable
command to configure the specified Ethernet port(s) as edge ports in system
view.
Use the stp interface edged-port disable
command to configure the specified Ethernet port(s) as non-edge ports in system
view.
Use the undo stp interface edged-port
command to restore the specified Ethernet port(s) to their default states.
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 is applied to edge ports because, on these ports, no loops can
be incurred by network topology changes. You can enable a port to transit 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 transit 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 guard 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 guard
function, root guard 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 guard function in system view.
Use the undo stp interface
loop-protection command to revert to the default state of the loop guard
function in system view.
The loop guard function is disabled by default.
Related command: stp loop-protection.
Caution:
Among loop guard
function, root guard function and edge port setting, only one can be valid on
the same port.
Example
# Enable the loop guard 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 toggles to
the STP-/RSTP-compatible mode automatically if an STP-/RSTP-enabled switch is
connected to it. But when the STP-/RSTP-enabled switch is disconnected from the
port, the port cannot toggle back to the MSTP mode automatically. In this case,
you can force the port to toggle to the MSTP mode by performing the mCheck
operation on the port.
Related command: stp mcheck, and stp
mode.
Example
# Perform the mCheck operation for
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 function on a specified port.
Use the undo stp interface
no-agreement-check command to disable the rapid transition function on a
specified port.
The rapid transition function is disabled
on any port by default.
Some other vendors' 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 an S7500 switch running MSTP, the upstream
designated port fails to change their states rapidly.
The rapid transition function is developed
to avoid this case. When an S7500 switch running MSTP is connected in the
upstream direction to another vendor's switch running proprietary spanning tree
protocol, you can enable the rapid transition function on the ports of the
S7500 switch operating as the downstream switch. Among these ports, 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 function can be enabled on
root ports or alternate ports only.
l
If you configure the rapid transition function
on the designated port, the function does not take effect on the port.
Example
# Enable the rapid transition function for
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 function is not
applicable to ports on non-point-to-point links.
If an Ethernet port is the master port of
an aggregated port 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 only 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 MSTIs (that is, the port is configured to connect to a point-to-point
link (or a non-point-to-point link) in all MSTIs). 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
Syntax
stp interface interface-list instance instance-id port priority priority
undo stp interface interface-list instance instance-id port priority
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:
MSTI ID ranging from 0 to 16. A value of 0 specifies the CIST.
priority:
Port priority to be set. This argument ranges from 0 to 240 and must be a
multiple of 16 (such as 0, 16, and 32). The default port priority of a port in
any MSTI is 128.
Description
Use the stp interface port priority
command to set a port priority for the specified ports in the specified MSTI.
Use the undo stp interface port priority
command to restore the specified ports to the default port priority in the
specified MSTI.
If you specify the instance-id
argument to be 0, these two commands apply to the port priorities on the CIST.
The role a port plays in an MSTI is determined by the port priority in the
MSTI. A port on an MSTP-enabled switch can have different port priorities and
play different roles in different MSTIs. This enables packets of different
VLANs to be forwarded along different physical paths, so as to achieve load
balancing by VLANs. Changing port priorities results in port roles being
re-determined and may cause state transitions.
Related command: stp port priority.
Example
# Set the port priority of Ethernet1/0/3 to
16 in MSTI 2.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/3
instance 2 port priority 16
Syntax
stp interface interface-list root-protection
undo stp interface
interface-list root-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 root-protection
command to enable the root guard function on specified port(s).
Use the undo stp interface
root-protection command to restore the root guard function to the default
state on specified port(s).
By default, the root guard function is
disabled.
Configuration errors or attacks may result
in configuration BPDUs with their priorities higher than that of a root bridge,
which causes new root bridge to be elected and network topology jitter to
occur. In this case, flows that should travel along high-speed links may be led
to low-speed links, and network congestion may occur.
You can avoid this by utilizing the root
guard function. Ports with this function enabled can only be kept as designated
ports in all MSTIs. When a port of this type receives configuration BPDUs with
higher priorities, it changes to discarding state (rather than becomes a
non-designated port) and stops forwarding packets (as if it is disconnected from
the link). It resumes the normal state if it does not receive any configuration
BPDUs with higher priorities for a specified period.
Related command: stp root-protection.
Caution:
Among loop guard function,
root guard function and edge port setting, only one can be valid on a port at
one time.
Example
# Enable the root guard function on
Ethernet1/0/1.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] stp interface Ethernet 1/0/1
root-protection
Syntax
stp interface interface-list transmit-limit packetnum
undo stp interface interface-list transmit-limit
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.
packetnum:
Maximum number of configuration BPDUs a port can send in each Hello time. This
argument ranges from 1 to 255 and defaults to 10.
Description
Use the stp interface transmit-limit
command to set the maximum number of configuration BPDUs each specified port
can send in each Hello time.
Use the undo stp interface
transmit-limit command to revert to the default maximum number.
The larger the packetnum argument
is, the more packets a port can transmit in each Hello time. Configure the packetnum
argument to a proper value to limit the number of BPDUs a port can send in each
Hello time to prevent MSTP from occupying too much network resources when
network topology jitter occurs.
Related command: stp transmit-limit.
Example
# Set the maximum transmitting speed of
Ethernet1/0/3 to 5.
<H3C> system-view
System View: return to User View with