7.6.1.5 (Optional) Configuring a Path Cost of a Port in an MSTI
Context
A path cost is port-specific and is used by MSTP to select a link.
Path costs of ports are an important basis for calculating spanning trees. If you set different path
costs for a port in different MSTIs, VLAN traffic can be transmitted along different physical
links for load balancing.
The MSTP path cost determines root port selection in an MSTI. The port with the lowest path
cost to the root bridge is selected as the root port.
In the Huawei calculation method for example, the link rate determines the recommended value
for the path cost. The following table lists the recommended path costs for ports with different
link rates.
Table 7-9
Mappings between link rates and path cost values
Link Rate
Recommended
Path Cost
Recommended
Path Cost Range
Path Cost Range
10 Mbit/s
2000
200 to 20000
1 to 200000
100 Mbit/s
200
20 to 2000
1 to 200000
1 Gbit/s
20
2 to 200
1 to 200000
10 Gbit/s
2
2 to 20
1 to 200000
Higher than 10 Gbit/
s
1
1 to 2
1 to 200000
If a network has loops, it is recommended that you set a relatively large path cost for ports with
low link rates.
Procedure
Step 1
Run:
system-view
The system view is displayed.
Step 2
Run:
stp pathcost-standard
{
dot1d-1998
|
dot1t
|
legacy
}
A path cost calculation method is configured.
By default, the IEEE 802.1t standard (
dot1t
) is used to calculate the default path cost.
All switching devices on a network must use the same path cost calculation method.
Step 3
Run:
interface
interface-type interface-number
Huawei AR530&AR550 Series Industrial Switch Routers
Configuration Guide - Ethernet Switching
7 MSTP Configuration
Issue 01 (2014-11-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
248