H3C S3100-52P Command Manual

Category
Network switches
Type
Command Manual
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Table of Contents
i
Table of Contents
Chapter 1 MSTP Configuration Commands ...............................................................................1-1
1.1 MSTP Configuration Commands.......................................................................................1-1
1.1.1 active region-configuration...................................................................................... 1-1
1.1.2 bpdu-drop any.........................................................................................................1-2
1.1.3 check region-configuration......................................................................................1-2
1.1.4 display stp ...............................................................................................................1-4
1.1.5 display stp region-configuration..............................................................................1-6
1.1.6 instance................................................................................................................... 1-7
1.1.7 region-name............................................................................................................1-8
1.1.8 reset stp...................................................................................................................1-9
1.1.9 revision-level...........................................................................................................1-9
1.1.10 stp........................................................................................................................1-10
1.1.11 stp bpdu-protection .............................................................................................1-11
1.1.12 stp bridge-diameter.............................................................................................1-12
1.1.13 stp compliance.................................................................................................... 1-13
1.1.14 stp config-digest-snooping.................................................................................. 1-14
1.1.15 stp cost................................................................................................................ 1-16
1.1.16 stp edged-port.....................................................................................................1-17
1.1.17 stp interface......................................................................................................... 1-18
1.1.18 stp interface config-digest-snooping...................................................................1-19
1.1.19 stp interface cost.................................................................................................1-21
1.1.20 stp interface edged-port......................................................................................1-22
1.1.21 stp interface loop-protection................................................................................1-23
1.1.22 stp interface mcheck...........................................................................................1-24
1.1.23 stp interface no-agreement-check.......................................................................1-25
1.1.24 stp interface point-to-point................................................................................... 1-26
1.1.25 stp interface port priority...................................................................................... 1-27
1.1.26 stp interface root-protection................................................................................1-28
1.1.27 stp interface transmit-limit...................................................................................1-29
1.1.28 stp loop-protection............................................................................................... 1-30
1.1.29 stp max-hops....................................................................................................... 1-31
1.1.30 stp mcheck.......................................................................................................... 1-32
1.1.31 stp mode..............................................................................................................1-33
1.1.32 stp no-agreement-check .....................................................................................1-34
1.1.33 stp pathcost-standard..........................................................................................1-35
1.1.34 stp point-to-point .................................................................................................1-37
1.1.35 stp port priority.....................................................................................................1-38
1.1.36 stp priority............................................................................................................1-39
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Table of Contents
ii
1.1.37 stp region-configuration.......................................................................................1-40
1.1.38 stp root primary...................................................................................................1-41
1.1.39 stp root secondary............................................................................................... 1-42
1.1.40 stp root-protection...............................................................................................1-43
1.1.41 stp tc-protection................................................................................................... 1-44
1.1.42 stp timer forward-delay........................................................................................ 1-45
1.1.43 stp timer hello......................................................................................................1-46
1.1.44 stp timer max-age ...............................................................................................1-47
1.1.45 stp timer-factor .................................................................................................... 1-48
1.1.46 stp transmit-limit..................................................................................................1-49
1.1.47 vlan-mapping modulo..........................................................................................1-50
Chapter 2 BPDU Tunnel Configuration Commands ..................................................................2-1
2.1 BPDU Tunnel Configuration Commands...........................................................................2-1
2.1.1 vlan-vpn tunnel........................................................................................................2-1
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-1
Chapter 1 MSTP Configuration Commands
1.1 MSTP Configuration Commands
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 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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-2
1.1.2 bpdu-drop any
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
1.1.3 check region-configuration
Syntax
check region-configuration
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-3
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 :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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-4
Field Description
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
1.1.4 display stp
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.
z 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.
z 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.
z 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.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-5
z 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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-6
Field Description
STP State
STP state on the port, which can be
forwarding and discarding.
Protection Protection type of the port
1.1.5 display stp region-configuration
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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-7
Field Description
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.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-8
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
1.1.7 region-name
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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-9
[H3C-mst-region] region-name hello
1.1.8 reset stp
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
1.1.9 revision-level
Syntax
revision-level level
undo revision-level
View
MST region view
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-10
Parameter
level: MSTP revision level to be set for the switch. This argument ranges from 0 to
65,535. By default, the MSTP revision level of a switch is 0.
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.
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
1.1.10 stp
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.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-11
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
1.1.11 stp bpdu-protection
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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-12
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 S3100-52P 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.
1.1.12 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 and defaults 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.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-13
Use the undo stp bridge-diameter command to restore the network diameter to the
default value.
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
1.1.13 stp compliance
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.
z 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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-14
port to prevent network storm. A port shut down in this way can only be enabled
again by the network administrator after login.
z 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.
z 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.
z 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
1.1.14 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 feature.
Use the undo stp config-digest-snooping command to disable the digest snooping
feature.
The digest snooping feature is disabled by default.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-15
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.
Note:
z 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.
z The digest snooping feature is needed only when your switch is connected to
another manufacturer’s switches adopting proprietary spanning tree protocols.
z 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.
z To enable the digest snooping feature, the interconnected switches must be
configured with exactly the same MST region-related settings.
z 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.
z With the digest snooping feature enabled, the VLAN-to-MSTI mapping cannot be
modified.
z The digest snooping feature is not applicable to edge ports in the MST region.
Example
# Enable the digest snooping feature on Ethernet1/0/1.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-16
<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
1.1.15 stp cost
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
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-17
System View: return to User View with Ctrl+Z.
[H3C] interface ethernet1/0/3
[H3C-Ethernet1/0/3] stp instance 2 cost 200
1.1.16 stp edged-port
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.
Command Manual – MSTP
H3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands
1-18
Caution:
Among loop prevention function, root protection 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
1.1.17 stp interface
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.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55

H3C S3100-52P Command Manual

Category
Network switches
Type
Command Manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI