1.1.1 active region-configuration
Syntax
active region-configuration
View
MST region view
Parameter
None
Description
Use the active region-configuration
command to activate your MST region configuration.
Your configuration of MST
region–related parameters, especially the VLAN-to-instance mapping table,
may result in network topology instability. To reduce the possibility of
topology instability caused by configuration, MSTP will not immediately launch
a new spanning tree computing process when processing MST region–related
configurations; instead, the region configuration will take effect only when
you activate the MST region–related parameters you have configured or
enable MSTP.
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 computing
again.
Related command: instance, region-name,
revision-level, vlan-mapping modulo, and check
region-configuration.
Example
# Activate MST region configuration
manually.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] active
region-configuration
1.1.2 check region-configuration
Syntax
check region-configuration
View
MST region view
Parameter
None
Description
Use the check region-configuration
command to view all the MST region configuration information, including the
region name, VLAN-to-instance mapping and revision level settings.
Caution:
Be sure that your
MST region configurations are correct, especially the VLAN-to-instance mapping
table. MSTP-compliant devices are in the same MST region only when they have
the same region name, the same VLAN-to-instance mapping table and the same MSTP
revision level setting. A device will not be in a different region if it is
different in any of these three settings. You can view all the MST
region–related configuration information by using this command and
determine the MST region the device is currently in, or check whether the MST
region configuration is correct.
Related command: instance, region-name,
revision-level, vlan-mapping modulo, and active
region-configuration.
Example
# View all the configuration information of
the MST region
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] check
region-configuration
Admin Configuration
Format selector :0
Region name :00b010000001
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
|
Configuration format selector of the MST
region
|
|
Region name
|
MST region name
|
|
Revision level
|
Revision level of the MST region
|
|
Instance Vlans Mapped
|
VLAN-to-instance mappings in the MST
region
|
Syntax
display stp [
instance instance-id ] [ interface interface-list
| slot slot-number ] [ brief ]
View
Any view
Parameter
instance-id:
MST instance ID. The minimum value (0) represents the common internal spanning
tree (CIST); the maximum value depends on the specific device model.
interface-list: Ethernet port list. You can specify multiple Ethernet ports or
port ranges by providing the this argument in the form of interface-list =
{ interface-type interface-number [ to interface-type
interface-number ] }&<1-10>, where, interface-type is port
type and interface-number is port number, and &<1-10> means
that you can specify up to 10 ports or port ranges for this argument.
slot-number:
Slot number, available only on distributed devices.
brief:
Displays brief information.
Description
Use the display stp command to view
the MSTP status information and statistics information.
Based on the MSTP status information and
statistics information, you can analyze and maintain the network topology or
maintain the normal operation of MSTP.
Note that:
l
If you do not specify any MST instance ID or
port list, this command will display the MSTP information on all ports. The
displayed information is sequenced by MST instance ID, and by port number
within an MST instance.
l
If you specify an MST instance ID, this command
will display the MSTP information on all ports in that MST instance. The
displayed information is sequenced by port name.
l
If you specify a port list, this command will
display the MSTP information on the specified ports. The displayed information
is sequenced by MST instance ID, and by port name within an MST instance.
l
If you specify both an MST instance ID and a
port list, this command will display the MSTP information of the specified MST
instance on the specified ports.
The MSTP status information includes:
l
CIST global parameters: Protocol work mode,
device priority in the CIST instance (Priority), MAC address, hello time, max
age, forward delay, maximum hops, common root of the CIST, external path cost
from the device to the CIST common root, regional root, the internal path cost
from the device to the regional root, CIST root port of the device, and status
of the BPDU guard function (enabled or disabled).
l
CIST port parameters: Port status, role, priority,
path cost, designated bridge, designated port, edge port/non-edge port, whether
connecting to a point-to-point link, maximum transmission rate (transmit
limit), status of the root guard function (enabled or disabled), BPDU format,
boundary port/non-boundary port, hello time, max age, forward delay, message
age, and remaining hops.
l
MSTI global parameters: MSTI instance ID, bridge
priority of the instance, regional root, internal path cost, MSTI root port,
and master bridge.
l
MSTI port parameters: Port status, role,
priority, path cost, designated bridge, designated port, and remaining hops.
The statistics information includes:
l
The number of TCN BPDUs, configuration BPDUs,
RST BPDUs and MST BPDUs sent from each port
l
The number of TCN BPDUs, configuration BPDUs,
RST BPDUs and MST BPDUs received on each port
Related command: reset stp.
Example
# View the MSTP status information and
statistics information.
<Sysname> display stp instance
0 interface GigabitEthernet1/0/1 to GigabitEthernet 1/0/4 brief
MSTID Port Role
STP State Protection
0 GigabitEthernet1/0/1 DESI
FORWARDING NONE
0 GigabitEthernet1/0/2 DESI
FORWARDING NONE
0 GigabitEthernet1/0/3 DESI
FORWARDING NONE
0 GigabitEthernet1/0/4 DESI
FORWARDING NONE
Table 1-2
Description on the fields of the display stp command
|
Field
|
Description
|
|
MSTID
|
MST instance ID in the MST region
|
|
Port
|
Port name, corresponding to each MST
instance
|
|
Role
|
Port role
|
|
STP State
|
MSTP status on the port, including
forwarding, discarding, and learning
|
|
Protection
|
Protection type on the port, including
root guard, loop guard, and BPDU guard
|
Syntax
display stp region-configuration
View
Any view
Parameter
None
Description
Use the display stp region-configuration
command to view the currently effective configuration information of the MST
region, including the region name, revision level, and user-configured
VLAN-to-instance mappings.
Related command: stp region-configuration.
Example
# View the currently effective MST region
configuration information.
<Sysname> 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
|
MSTP-defined format selector
|
|
Region name
|
MST region name
|
|
Revision level
|
Revision level of the MST region
|
|
Instance Vlans Mapped
|
VLAN-to-instance mappings in the MST
region
|
1.1.5 instance
Syntax
instance instance-id
vlan vlan-list
undo instance instance-id [ vlan vlan-list ]
View
MST region view
Parameter
instance-id:
MST instance ID. The minimum value (0) represents the CIST; the maximum value
depends on the specific device model.
vlan-list:
VLAN list. You can specify multiple VLANs or VLAN ranges by providing this
argument in the form of vlan-list = { vlan-id [ to vlan-id
] }&<1-10>, where, vlan-id is in the range of 1 to 4094, and
&<1-10> means that you can specify up to 10 VLANs or VLAN ranges for
this argument.
Description
Use the instance command to map the
specified VLAN(s) to the specified MST instance.
Use the undo instance command to
remove the specified VLAN(s) from the specified MST instance and map the
removed VLAN(s) to the CIST (MST instance 0).
By default, all VLANs are mapped to the
CIST.
Notice that:
l
If you specify no VLAN in the undo instance
command, all VLANs mapped to the specified MST instance will be remapped to the
CIST.
l
You cannot map the same VLAN to different MST
instances. If you map a VLAN that has been mapped to an instance to a new
instance, the old mapping will be automatically removed.
Related command: region-name, revision-level,
check region-configuration, vlan-mapping modulo, and active
region-configuration.
Example
# Map VLAN 2 to MST instance 1.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan
2
1.1.6 region-name
Syntax
region-name name
undo region-name
View
MST region view
Parameter
name: Name
of the MST regions, a string of 1 to 32 characters.
Description
Use the region-name command to
configure the MST region name of your device.
Use the undo region-name command to
restore the MST region name to the default setting.
By default, the MST region name of a device
is its MAC address.
The MST region name, the VLAN-to-instance
mapping table and the MSTP revision level of a device jointly determine the MST
region the device 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 device to
“hello”.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] region-name
hello
1.1.7 reset stp
Syntax
reset stp [ interface
interface-list ]
View
User view
Parameter
interface-list: Ethernet port list. You can specify multiple Ethernet ports or
port ranges by providing the this argument in the form of interface-list =
{ interface-type interface-number [ to interface-type
interface-number ] }&<1-10>, where, interface-type is port
type and interface-number is port number, and &<1-10> means
that you can specify up to 10 VLANs or VLAN ranges for this argument.
Description
Use the reset stp command to clear
the MSTP statistics information.
The MSTP statistics information includes
the numbers of TCN BPDUs, configuration BPDUs, RST BPDUs and MST BPDUs
sent/received through the specified port(s) (STP BPDUs and TCN BPDUs are
counted only for the CIST).
This command clears the spanning
tree-related statistics information on the specified port(s) if you specify the
interface-list argument; otherwise, this command clears the spanning
tree-related statistics on all ports.
Related command: display stp.
Example
# Clear the spanning tree-related
statistics information on ports GigabitEthernet1/0/1 through GigabitEthernet 1/0/3.
<Sysname> reset stp interface GigabitEthernet1/0/1
to GigabitEthernet1/0/3
1.1.8
revision-level
Syntax
revision-level level
undo revision-level
View
MST region view
Parameter
level: MSTP
revision level, in the range of 0 to 65535. The system default is 0.
Description
Use the region-level command to
configure the MSTP revision level of your device.
Use the undo region-level command to
restore the MSTP revision level to the default setting.
The MSTP revision level, the MST region
name and the VLAN-to-instance mapping table of a device jointly determine the
MST region the device 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.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] revision-level 5
1.1.9 stp
Syntax
stp { enable
| disable }
undo stp
View
System view/Ethernet interface view/port
group view
Parameter
enable:
Enables the MSTP feature.
disable:
Disables the MSTP feature.
Description
Use the stp command to enable or
disable the MSTP feature globally or for a port or a group of ports.
Use the undo stp command to restore
the default MSTP status globally or for a port or a group of ports.
Whether a device is globally MSTP-enabled
by default depends on the specific device model. By default, MSTP is enabled
for all ports.
To control MSTP flexibly, you can disable
the MSTP feature for certain ports so that they will not take part in spanning
tree computing and thus to save the device’s CPU resources.
After you enable MSTP, the device
determines whether to work in STP-compatible mode, in RSTP mode or in MSTP mode
according to your MSTP work mode setting. After MSTP is disabled, the device
becomes a transparent bridge.
After being enabled, MSTP dynamically
maintains spanning tree status of the corresponding VLANs based the received
configuration BPDUs. After being disabled, it stops maintaining the spanning
tree status.
Configured in system view, the setting is
effective for the device globally; configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
Related command: stp mode.
Example
# Enable the MSTP feature globally.
<Sysname> system-view
[Sysname] stp enable
# Disable MSTP on
port GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/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 for the device.
Use the undo stp bpdu-protection
command to disable the BPDU guard function for the device.
By default, the BPDU guard function is disabled.
Example
# Enable the BPDU guard function for the
device.
<Sysname> system-view
[Sysname] stp bpdu-protection
1.1.11 stp bridge-diameter
Syntax
stp bridge-diameter bridge-number
undo stp bridge-diameter
View
System view
Parameter
bridge-number: Network diameter of the spanning tree, in the range of 2 to 7.
Description
Use the stp bridge-diameter command
to specify the network diameter, namely the maximum number of stations between
any two terminal devices on the switched network.
Use the undo stp bridge-diameter
command to restore the default network diameter setting.
By default, the network diameter of the
switched network is 7.
An appropriate setting of hello time,
forward delay and max age can speed up network convergence. The values of these
timers are related to the network size. You can set these three timers
indirectly by setting the network diameter. Based on the network diameter you
configured, MSTP automatically sets an optimal hello time, forward delay, and
max age for the device. With the network diameter set to 7 (the default), the
three timer are also set to their defaults.
Note that this configuration is effective
for the CIST and root bridge only, and not for MSTIs.
Related command: stp timer forward-delay,
stp timer hello, and stp timer max-age.
Example
# Set the network diameter of the switched
network to 5.
<Sysname> system-view
[Sysname] stp bridge-diameter 5
Syntax
stp compliance { auto | dot1s | legacy }
undo stp compliance
View
Ethernet interface view/port group view
Parameter
auto:
Configure the port to recognize the BPDU format automatically.
dot1s:
Configures the port to receive and send standard-format (802.1s-compliant) MSTP
packets.
legacy:
Configures the port to receive and send compatible-format BPDUs.
Description
Use the stp compliance command to
configure the MSTP packet format for a port or a group of ports
Use the undo stp compliance command
to restore the MSTP packet format to be default setting for a port or a group
of ports.
By default, the MSTP packet format is set
to auto, namely a port recognizes the BPDU format automatically.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
Note that:
l
If the MSTP packet format is set to auto for a
port, the port automatically recognizes and resolves the received
compatible-format BPDUs or 802.1s-compliant BPDUs, and sends, when needed,
compatible-format or 802.1s-compliant BPDUs.
l
If you specify the BPDU format by using the
legacy or dot1s keyword, the port can only receive and send BPDUs of the
specified format. If the port is configured not to detect the packet format
automatically while it works in the MSTP mode, and if it receives a packet in
the format other than as configured, that port will become a designated port,
and the port will remain in the discarding state to prevent the occurrence of a
loop.
Example
# Configure port GigabitEthernet1/0/1 to
receive and send standard-format (802.1s) MSTP packets.
<Sysname>system-view
[Sysname-GigabitEthernet1/0/1] stp
compliance dot1s
Restore the default MSTP packet format for
port GigabitEthernet1/0/1.
[Sysname-GigabitEthernet1/0/1] undo stp
compliance
Syntax
stp config-digest-snooping
undo stp config-digest-snooping
View
system view/Ethernet interface view/port
group view
Parameter
None
Description
Use the stp config-digest-snooping
command to enable Digest Snooping.
Use the undo stp config-digest-snooping
command to disable Digest Snooping.
The feature is disabled by default.
Notice that:
l
You need to enable this feature both globally
and on ports connected to other vendors’ devices to make it take effect. It
is recommended to enable the feature on all associated ports first and then
globally, making all configured ports take effect at the same time to minimize
the impact, and disable the feature globally to disable it on all associated
ports.
l
It is not recommended to enable Digest Snooping
on the MST region edge port to avoid loops.
Example
# Enable global Digest Snooping.
<Sysname> system-view
[Sysname] stp config-digest-snooping
# Enable Digest Snooping on GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp config-digest-snooping
Syntax
stp [
instance instance-id ] cost cost
undo stp [
instance instance-id ] cost
View
Ethernet interface view/port group view
Parameter
instance-id: MST instance ID. The minimum value (0) represents the CIST; the
maximum value depends on the specific device model.
cost: Path
cost of the port, the effective range of which depends on the path cost
calculation standard adopted.
Description
Use the stp cost command to set the
path cost of a port or a group or ports in the specified MST instance.
Use the undo stp cost command to
restore the default path cost of a port or a group or ports in the specified
MST instance.
By default, the device automatically
calculates the path costs of ports in each MST instance based on the
corresponding standard.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
If you set instance-id to 0, you are
setting the path cost of the port in the CIST. The path cost setting of a port
can affect the role selection of the port. Setting different path costs for the
same port in different MST instances allows different VLAN traffic flows to be
forwarded along different physical links, thus to enable per-VLAN load
balancing. When the path cost of a port is changed, MSTP will re-compute the
role of the port and initiate a state transition.
If you do not provide instance instance-id,
your configuration will take effect in the CIST instance only.
Example
# Set the path cost of port GigabitEthernet1/0/1
in MST instance 2 to 200.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp
instance 2 cost 200
Syntax
stp edged-port { enable | disable }
undo stp edged-port
View
Ethernet interface view/port group view
Parameter
enable:
Configures the current port to be an edge port.
disable:
Configures the current port to be a non-edge port.
Description
Use the stp edged-port enable
command to configure the current port to be an edge port.
Use the stp edged-port disable
command to configure the current port to be a non-edge port.
Use the undo stp edged-port enable
command to restore the default state of the current port.
All Ethernet ports are non-edge ports by
default.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
If the current port connects with another
device, you can use the stp edged-port disable or undo stp edged-port
command to specify it to be a non-edge port.
l
If a port directly connects to a user terminal
rather than another device or a shared LAN segment, this port is regarded as an
edge port. When the network topology changes, an edge port will not cause a
temporary loop. Therefore, configuring a port as an edge port can enable the
port to transition to the forwarding state rapidly. We recommend that you
configure an Ethernet port directly connecting to a user terminal as an edge
port before to enable it to transition to the forwarding state rapidly.
l
Normally, configuration BPDUs from other devices
cannot reach an edge port because it does not connect to any other device. Before
the BPDU guard function is enabled, if a port receives a configuration BPDU,
the port is working actually as a non-edge port even if you have configured in
as an edge port.
Example
# Configure port GigabitEthernet1/0/1 as a
non-edge port.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp
edged-port disable
Syntax
stp loop-protection
undo stp loop-protection
View
Ethernet interface view/port group view
Parameter
None
Description
Use the stp loop-protection command
to enable the loop guard function for a port or a group of ports.
Use the undo stp loop-protection
command to restore default loop guard setting for a port of a group of ports.
By default, the loop guard function is
disabled.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
Example
# Enable the loop guard function for port GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp
loop-protection
Syntax
stp max-hops
hops
undo stp max-hops
View
System view
Parameter
hops:
Maximum hops, in the range of 1 to 40
Description
Use the stp max-hops command to set
the maximum hops of the MST region on the device.
Use the undo stp max-hops command to
restore the maximum hops to the default setting.
By default, the maximum hops of an MST
region is 20.
In the CIST and MST instances, the maximum
hops setting configured on the regional root bridge determines the maximum
network diameter supported this the MST region. After a configuration BPDU
leaves the root bridge, its hop count is decremented by 1 whenever it passes a
device. When its hop count reaches 0, it will be discarded by the device that
has received it. As a result, devices beyond the maximum hop count are unable
to take part in spanning tree computing, and thereby the size of the MST region
is limited.
When the current device becomes the root
bridge of the CIST or an MSTI, the maximum hops setting configured on the
device becomes the network diameter of that spanning tree and restricts the
size of that spanning tree in the current MST region.
Devices other than the root bridge in an
MST region use the maximum hops setting on the root bridge.
Example
# Set the maximum hops of the MST region to
35.
<Sysname> system-view
[Sysname] stp max-hops 35
1.1.18 stp mcheck
Syntax
stp mcheck
View
System view/Ethernet interface view
Parameter
None
Description
Use the stp mcheck command to carry
out the mCheck operation globally or on a port.
In a switched network, if a port on the
device running MSTP (or RSTP) connects to a device running STP, this port will
automatically migrate to the STP-compatible mode. However, if the device
running STP is removed, this will not be able to migrate automatically to the
MSTP (or RSTP) mode, but will remain working in the STP-compatible mode. In
this case, you can perform an mCheck operation to force the port to migrate to
the MSTP (or RSTP) mode.
Note that the stp mcheck command is
meaningful only when the device works in the MSTP (or RSTP) mode, not in the
STP-compatible mode.
Related command: stp mode.
Example
# Carry out mCheck on port GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp mcheck
1.1.19 stp no-agreement-check
Syntax
stp no-agreement-check
undo stp no-agreement-check
View
Ethernet interface view/port group view
Parameter
None
Description
Use the stp no-agreement-check
command to enable No Agreement Check on port(s).
Use the undo stp no-agreement-check
command to disable No Agreement Check on port(s).
By default, No Agreement Check is disabled.
The No Agreement
Check feature can only take effect on the root port or Alternate port after
enabled.
Example
# Enable No Agreement Check on GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp
no-agreement-check
Syntax
stp mode { stp
| rstp | mstp }
undo stp mode
View
System view
Parameter
stp:
Configures the MSTP-compliant device to work in STP-compatible mode.
rstp: Configures
MSTP-compliant device to work in RSTP mode.
mstp:
Configures MSTP-compliant device to work in MSTP mode.
Description
Use the stp mode command to
configure the MSTP work mode of the device.
Use the undo stp mode command to
restore the MSTP work mode to the default setting.
By default, an MSTP-compliant device works
in MSTP mode.
Related command: stp mcheck and stp.
Example
# Configure the MSTP-compliant device to
work in STP-compatible mode.
<Sysname> system-view
[Sysname] stp mode stp
Syntax
stp pathcost-standard
{ dot1d-1998 | dot1t | legacy }
undo stp pathcost-standard
View
System view
Parameter
dot1d-1998:
The device calculates the default path cost for ports based on IEEE
802.1D-1998.
dot1t: The
device calculates the default path cost for ports based on IEEE 802.1t.
legacy: The
device calculates the default path cost for ports based on a private standard.
Description
Use the stp pathcost-standard
command to specify a standard for the device to use when calculating the
default path cost of the link connected with the device
Use the undo stp pathcost-standard
command to restore the default setting of the calculation standard.
The default standard used by the device
depends on the specific device model.
Note that if you change the standard that
the device uses in calculating the default path cost, the port path cost value
set through the stp cost command will be out of effect.
Table 1-4
Link speed vs. path cost
|
Link speed
|
Duplex state
|
802.1D-1998
|
IEEE 802.1t
|
Private standard
|
|
0
|
—
|
65535
|
200,000,000
|
200,000
|
|
10Mbps
|
Single Port
Aggregated Link 2 Ports
Aggregated Link 3 Ports
Aggregated Link 4 Ports
|
100
100
100
100
|
2,000,000
1,000,000
666,666
500,000
|
2,000
1,800
1,600
1,400
|
|
100Mbps
|
Single Port
Aggregated Link 2 Ports
Aggregated Link 3 Ports
Aggregated Link 4 Ports
|
19
19
19
19
|
200,000
100,000
66,666
50,000
|
200
180
160
140
|
|
1000Mbps
|
Single Port
Aggregated Link 2 Ports
Aggregated Link 3 Ports
Aggregated Link 4 Ports
|
4
4
4
4
|
20,000
10,000
6,666
5,000
|
20
18
16
14
|
|
10Gbps
|
Single Port
Aggregated Link 2 Ports
Aggregated Link 3 Ports
Aggregated Link 4 Ports
|
2
2
2
2
|
2,000
1,000
666
500
|
2
1
1
1
|
In the calculation of the path cost value
of an aggregated link, 802.1D-1998 does not take into account the number of
ports in the aggregated link. Whereas, 802.1T takes the number of ports in the
aggregated link into account. The calculation formula is: Path Cost =
200,000,000/link speed in 100 kbps, where link speed is the sum of the link
speed values of the non-blocked ports in the aggregated link.
Example
# Configure the device to calculate the
default path cost for ports based on IEEE 802.1D-1998.
<Sysname> system-view
[Sysname] stp pathcost-standard
dot1d-1998
# Configure the device to calculate the
default path cost for ports based on IEEE 802.1t.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1t
Syntax
stp point-to-point { auto | force-false | force-true
}
undo stp point-to-point
View
Ethernet interface view/port group view
Parameter
auto:
Specifies MSTP detects automatically whether the current port connects to a
point-to-point link.
force-false:
Specifies the current port to connect to a non-point-to-point link.
force-true:
Specifies the current port to connect to a point-to-point link.
Description
Use the stp point-to-point command
to specify whether the current port connects to a point-to-point link.
Use the undo stp point-to-point
command to restore the default status of the link connected with the current
port.
The default setting is auto; namely
the MSTP-compliant device automatically detects whether an Ethernet port
connects to a point-to-point link.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
Note that:
l
When connecting to a non-point-to-point link, a
port is incapable of rapid state transition.
l
If the current port is the master port of
aggregated ports of if it works in full duplex mode, the link to which the
current port connects is a point-to-point link. We recommend that you use the
default setting, namely let MSTP detect the link status automatically.
l
This setting is effective to the CIST and all
MST instances. If a port is configured as connecting to a point-to-point link
or a non-point-to-point link, the setting takes effect for the port in all MST instances.
If the physical link to which the port connects is not a point-to-point link
and you force it to be a point-to-point link by configuration, your
configuration may incur a temporary loop.
Example
# Configure port GigabitEthernet 1/0/1 as
connecting to a point-to-point link.
<Sysname> system-view
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet 1/0/1] stp
point-to-point force-true
Syntax
stp [
instance instance-id ] port priority priority
undo stp [ instance instance-id ] port priority
View
Ethernet interface view/port group view
Parameter
instance-id:
MST instance ID. The minimum value (0) represents the CIST; the maximum value
depends on the specific device model.
priority:
Port priority, in the range of 0 to 240 at the step of 16 (0, 16, 32…,
for example).
Description
Use the stp port priority command to
set the priority of a port or a group or ports in the specified MST instance.
Use the undo stp port priority command
to restore the default priority of a port or a group or ports in the specified
MST instance.
By default, the port priority is 128.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
If you set instance-id to 0, you are
setting the priority of the port in the CIST. The priority of a port can affect
the role selection of the port in the specified MST instance.
Setting different priorities for the same
port in different MST instances allows different VLAN traffic flows to be
forwarded along different physical links, thus to enable per-VLAN load
balancing.
When the priority of a port is changed,
MSTP will re-compute the role of the port and initiate a state transition.
If you do not provide instance instance-id,
your configuration will take effect in the CIST instance only.
Example
# Set the priority of port GigabitEthernet
1/0/1 in MST instance 2 to 16.
<Sysname> system-view
[Sysname] interface GigabitEthernet
1/0/1
[Sysname-GigabitEthernet 1/0/1] stp
instance 2 port priority 16
Syntax
stp [ instance
instance-id ] priority priority
undo stp [ instance
instance-id ] priority
View
System view
Parameter
instance-id:
MST instance ID. The minimum value (0) represents the CIST; the maximum value
depends on the specific device model.
priority:
Port priority, in the range of 0 to 61440 at the step of 4096, namely you can
set up to 16 priority values, such as 0, 4096, 8192…, on the device.
Description
Use the stp priority command to set
the priority of the device in the specified MST instance.
Use the undo stp priority command to
restore the device priority to the default setting.
By default, the device priority is 32768.
The device priority is involved in spanning
tree computing. The device priority is set on a per-instance basis. An
MSTP-compliant device can have different priorities in different MST instances.
If you do not provide instance instance-id,
your configuration will take effect in the CIST instance only.
Example
# Set the device priority in MST instance 1
to 4096.
<Sysname> system-view
[Sysname] stp instance 1 priority
4096
1.1.25 stp region-configuration
Syntax
stp region-configuration
undo stp region-configuration
View
System view
Parameter
None
Description
Use the stp region-configuration
command to enter MST region view.
Use the undo stp region-configuration
command to restore the default MST region configurations.
By default, the default settings are used
for all the three MST region parameters. Namely, the device’s MST region
name is the device’s MAC address, all VLANs are mapped to the CIST, and
the MSTP revision level is 0.
After you enter MST region view, you can
configure the parameters related the MST region, including the region name,
VLAN-to-instance mapping and revision level.
Example
# Enter MST region view.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region]
Syntax
stp [
instance instance-id ] root primary [ bridge-diameter bridge-number
] [ hello-time centi-seconds ]
undo stp [
instance instance-id ] root
View
System view
Parameter
instance-id:
MST instance ID. The minimum value (0) represents the CIST; the maximum value
depends on the specific device model.
bridge-number: Network diameter of the spanning tree, in the range of 2 to 7 and
defaulting to 7.
centi-seconds: Hello time (in centiseconds) of the spanning tree, in the range of
100 to 1,000.
Description
Use the stp root primary command to
specify the current device as the root bridge of the specified MST instance.
Use the undo stp root command to
remove the current device as the root bridge of the specified MST instance.
If you do not provide instance instance-id,
your configuration will take effect in the CIST instance only.
By default, a device is not a root bridge.
You can specify a root bridge for each MST
instance without caring about the device priority.
When configuration a root bridge, you can
use this command to specify the network diameter of the switched network, so
that the MSTP-compliant device automatically calculates the three timers (hello
time, forward delay and max age). As the calculated hello time value is not the
optimal value, you can specify a hello time value by providing hello-time
centi-seconds in the command, which will override the hello time value
calculated by the device based on the network diameter. Generally, we recommend
that you use the values of the other two timers calculated by the device based
the specified network diameter.
The configured network diameter and hello
time settings are effective only for MST instance 0, namely the CIST. If you
configure these two timers for any other instance, your configuration can
succeed, but they will not actually work.
Caution:
l
There is one and only one root bridge in effect
in a spanning tree instance. If two or more devices have been designated to be
root bridges of the same spanning tree instance, MSTP will select the device
with the lowest MAC address as the root bridge.
l
After specifying the current device as the root
bridge or a secondary root bridge, you cannot change the priority of the
device.
Example
# Define the current device as the root
bridge of MST instance 0 and set the network diameter to 4 and the hello time
of the device to 500 centiseconds.
<Sysname> system-view
[Sysname] stp instance 0 root primary
bridge-diameter 4 hello-time 500
Syntax
stp [
instance instance-id ] root secondary [ bridge-diameter
bridge-number ] [ hello-time centi-seconds ]
undo stp [
instance instance-id ] root
View
System view
Parameter
instance-id:
MST instance ID. The minimum value (0) represents the CIST; the maximum value
depends on the specific device model.
bridge-number: Network diameter of the spanning tree, in the range of 2 to 7 and
defaulting to 7.
centi-seconds: Hello time (in centiseconds) of the spanning tree, in the range of
100 to 1,000.
Description
Use the stp root secondary command
to specify the current device as a secondary root bridge of the specified MST
instance.
Use the undo stp root command to
remove the current device as a secondary root bridge of the specified MST
instance.
If you do not provide instance instance-id,
your configuration will take effect in the CIST instance only.
By default, a device is not a secondary
root bridge.
You can configure one or more secondary
root bridges for each MST instance. When the root bridge of an instance fails
or is shut down, the secondary root bridge can take over the role of the
instance of the specified MST instance. If you specify more than one secondary
root bridge, the secondary root bridge with the lowest Mac address will become
the root bridge.
When configuration a secondary root bridge,
you can specify the network diameter of the switched network and the hello time
for the secondary root bridge, so that the MSTP-compliant device automatically
calculates the other two timers (forward delay and max age) of the root bridge.
The configured network diameter and hello
time settings are effective only for MST instance 0, namely the CIST. If you
configure these two timers for any other instance, your configuration can
succeed, but they will not actually work.
If you set instance-id to 0, you are
specifying the current device as the secondary root bridge of the CIST. You can
configure one or more secondary root bridges for an MST instance.
Upon specifying the current device as the
root bridge or a secondary root bridge, you cannot change the priority of the
device.
Example
# Define the current device as the
secondary root bridge of MST instance 0 and set the network diameter to 5 and
the hello time of the device to 300 centiseconds.
<Sysname> system-view
[Sysname] stp instance 0 root
secondary bridge-diameter 5 hello-time 300
Syntax
stp root-protection
undo stp root-protection
View
Ethernet interface view/port group view
Parameter
None
Description
Use the stp root-protection command
to enable the root guard function for a port or a group of ports.
Use the undo stp root-protection
command to restore default setting of the root guard function for the port(s).
By default, the root guard function is
disabled.
Configured in Ethernet interface view, the
setting is effective on the current port only; configured in port group view,
the setting is effective on all ports in the port group.
Example
# Enable the root guard function for port GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] stp
root-protection
Syntax
stp tc-protection enable
stp tc-protection
disable
View
System view
Parameter
None
Description
Use the stp tc-protection enable
command to enable the TC-BPDU attack guard function for the device.
Use the stp tc-protection disable
command to disable the TC-BPDU attack guard function for the device.
By default, the TC-BPDU attack guard
function is enabled.
Example
# Enable the TC-BPDU attack guard function
for the device.
<Sysname> system-view
[Sysname] stp tc-protection enable
1.1.30 stp timer forward-delay
Syntax
stp timer forward-delay centi-seconds
undo stp timer
forward-delay
View
System view
Parameter
centi-seconds: Forward delay in centiseconds, in the range of 400 to 3,000.
Description
Use the stp timer forward-delay
command to set the forward delay timer of the device.
Use the undo stp timer forward-delay
command to restore the forward delay timer of the device to the default
setting.
By default, the forward delay timer is set
t