No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


Configuration Guide - Ethernet Switching

S7700 and S9700 V200R012C00

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, VLAN aggregation, MUX VLAN, VLAN termination, Voice VLAN, VLAN mapping, QinQ, GVRP, VCMP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, HVRP, and Layer 2 protocol transparent transmission.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
(Optional) Setting the Path Cost for a Port

(Optional) Setting the Path Cost for a Port


A path cost is port-specific and is used by VBST to select a link. A port in different VLANs may have different path costs on a network running VBST. Traffic from different VLANs is forwarded through different physical links by setting a proper path cost enable, therefore implementing VLAN-based load balancing.

The path cost value range is determined by the calculation method. The following calculation methods are used:
  • dot1d-1998: IEEE 802.1d standard is used to calculate the path cost.
  • dot1t: IEEE 802.1T standard is used to calculate the path cost.
  • legacy: Huawei calculation method is used to calculate the path cost.

After the calculation method is determined, the path cost of a port can be set. Generally, a higher path cost indicates higher probability of a port to be blocked. If the link rate of a port is small, you are advised to set a large path cost so that the port is selected as the blocking port during spanning tree calculation and its link is blocked.

The default path cost varies according to the interface rate. Huawei calculation method is used as an example. Table 16-5 shows the mapping between link rates and path costs.
Table 16-5  Mappings between link rates and path costs

Interface Rate

Default Value

Recommended Value Range

Path Cost Range

10 Mbit/s




100 Mbit/s




1 Gbit/s




10 Gbit/s




Over 10 Gbit/s





  1. Run system-view

    The system view is displayed.

  2. Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }

    A path cost calculation method is configured.

    By default, IEEE 802.1T standard is used to calculate the path cost.

    All switches on the same network must use the same path cost calculation method.

  3. Run interface interface-type interface-number

    The view of the Ethernet interface that participates in spanning tree calculation is displayed.

  4. Run stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> cost cost

    The path cost of the port in each VLAN is set.

    • If Huawei calculation method is used, the path cost ranges from 1 to 200000.
    • If IEEE 802.1D standard is used, the path cost ranges from 1 to 65535.
    • If IEEE 802.1T standard is used, the path cost ranges from 1 to 200000000.

Updated: 2019-01-18

Document ID: EDOC1100038843

Views: 107270

Downloads: 71

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next