F3726, F3211, F3174, R5135, R3816-HP Firewalls and UTM Devices Network Management Configuration Guide-6PW100
92
1144BConfiguring path costs of ports
When the path cost of a port changes, the system re-calculates the role of the port and initiates a state
transition.
To configure the path cost of ports:
Ste
p
Command
Remarks
152. Enter system view.
system-view N/A
153. Enter Ethernet interface view
or Layer 2 aggregate
interface view.
interface interface-type
interface-number
N/A
154. Configure the path cost of the
ports.
• In STP/RSTP mode:
stp cost cost
• In MSTP mode:
stp [ instance
instance-id ] cost cost
Use one of the commands.
By default, the system automatically
calculates the path cost of each port.
For information about the value range for the
instance-id argument, see Network
Management Command Reference.
1145BConfiguration example
# In MSTP mode, specify the device to use IEEE 802.1d-1998 to calculate the default path costs of its ports,
and set the path cost of GigabitEthernet 0/3 to 200 on MSTI 2.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
[Sysname] interface gigabitethernet 0/3
[Sysname-GigabitEthernet0/3] stp instance 2 cost 200
437BConfiguring the port priority
The priority of a port is an important factor in determining 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 will be elected as
the root port.
On a spanning tree device, a port can have different priorities and play different roles in different
spanning trees, so that data from different VLANs can be propagated along different physical paths to
implement per-VLAN load balancing. You can set port priority values based on your actual network
requirements.
If the port priority changes, the system re-calculates the port role and initiate a state transition.
To configure the priority of a port:
Ste
p
Command
Remarks
155. Enter system view.
system-view N/A
156. Enter Ethernet interface
view or Layer 2
aggregate interface
view.
interface interface-type
interface-number
N/A