RSTP Configuration Commands 327
[SW5500]stp bpdu-protection
stp cost Syntax
stp cost
cost
undo stp cost
View
Ethernet Port View
Parameter
cost
: Specifies the path cost, ranging from 1 to 2000000.
Description
Use the stp cost command to configure the path cost on a spanning tree for the
current Ethernet port.
Use the undo stp cost command to restore the default cost.
By default, the bridge gets the path cost directly through the speed of the link
connected to the port.
The path cost of an Ethernet port is related to the link speed. You can refer to the
following table. RSTP will check the link speed of the port and get the path cost
directly. It is recommended to set the cost to the default value and let RSTP query
the path cost of the port.
Example
To configure the path cost of GigabitEthernet1/0/1 to 200, enter the following:
<SW5500>system-view
System View: return to User View with Ctrl+Z.
[SW5500]interface GigabitEthernet1/0/1
[SW5500-GigabitEthernet1/0/1]stp cost 200
stp edged-port Syntax
stp edged-port { enable | disable }
undo stp edged-port
View
Ethernet Port View
Table 51 Path cost for ports at different link speeds
Link Speed
Recommended
Value
Recommended
Range
Switch Range
10Mbps 2000 200 to 20000 1 to 2000000
100Mbps 200 20 to 2000 1 to 2000000
1Gbps 20 2 to 200 1 to 2000000
10Gbps 2 2to 20 1 to 2000000