Configuring path costs of ports, Configuration example, Configuring the port priority – H3C Technologies H3C S5560 Series Switches User Manual
Page 123
89
Configuring path costs of ports
When the path cost of a port changes, the system recalculates the role of the port and initiates a state
transition.
To configure the path cost of a port:
Step Command Remarks
1.
Enter system view.
system-view
N/A
2.
Enter Layer 2 Ethernet or
aggregate interface view.
interface interface-type interface-number
N/A
3.
Configure the path cost of the
ports.
•
In STP/RSTP mode:
stp cost cost
•
In PVST mode:
stp vlan vlan-id-list cost cost
•
In MSTP mode:
stp [ instance instance-list ] cost cost
By default, the system
automatically calculates the
path cost of each port.
Configuration example
# In MSTP mode, perform the following tasks:
•
Configure the device to calculate the default path costs of its ports by using IEEE 802.1d-1998.
•
Set the path cost of GigabitEthernet 1/0/3 to 200 on MSTI 2.
[Sysname] stp pathcost-standard dot1d-1998
Cost of every port will be reset and automatically re-calculated after you change the
current pathcost standard. Continue?[Y/N]:y
Cost of every port has been re-calculated.
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp instance 2 cost 200
# In PVST mode, perform the following tasks:
•
Configure the device to calculate the default path costs of its ports by using IEEE 802.1d-1998.
•
Set the path cost of GigabitEthernet 1/0/3 to 2000 on VLAN 20 through VLAN 30.
[Sysname] stp pathcost-standard dot1d-1998
Cost of every port will be reset and automatically re-calculated after you change the
current pathcost standard. Continue?[Y/N]:y
Cost of every port has been re-calculated
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp vlan 20 to 30 cost 2000
Configuring the port priority
The priority of a port is a factor that determines whether the port can be elected as the root port of a
device. If all other conditions are the same, the port with the highest priority is elected as the root port.
- H3C S5130 Series Switches H3C S5120 Series Switches H3C SR8800 H3C SR6600-X H3C SR6600 H3C MSR 5600 H3C MSR 50 H3C MSR 3600 H3C MSR 30 H3C MSR 2600 H3C MSR 20-2X[40] H3C MSR 20-1X H3C MSR 930 H3C MSR 900 H3C WX6000 Series Access Controllers H3C WX5000 Series Access Controllers H3C WX3000 Series Unified Switches H3C LSWM1WCM10 Access Controller Module H3C LSWM1WCM20 Access Controller Module H3C LSQM1WCMB0 Access Controller Module H3C LSRM1WCM2A1 Access Controller Module H3C LSBM1WCM2A0 Access Controller Module