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

Reminder

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

upgrade

Fat AP and Cloud AP V200R010C00 Command Reference

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).
stp cost

stp cost

Function

The stp cost command sets the path cost of a port in a spanning tree.

The undo stp cost command restores the default path cost.

By default, the path cost of a port in a spanning tree is the path cost corresponding to the port rate.

Format

stp [ instance instance-id ] cost cost

undo stp [ instance instance-id ] cost

Parameters

Parameter Description Value
instance instance-id

Specifies the number of a spanning tree instance.

If instance instance-id is not specified, it indicates the path cost of an interface in CIST.

The value is an integer ranging from 0 to 4094. Value 0 refers to CIST.
cost Specifies the path cost of an interface. According to different calculation standards, the value ranges are as follows:
  • Huawei legacy standard: 1 to 200,000

  • IEEE 802.1d-1998 standard: 1 to 65535

  • IEEE 802.1t standard: 1 to 200,000,000

Views

GE interface view, Eth-Trunk interface view, XGE interface view, MultiGE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The path cost of a port is an important basis for calculating a spanning tree. Path costs determine root port selection. In a spanning tree, the port with the lowest path cost to the root bridge is selected as a root port.

If different path costs are set for a port on an MSTP device in different spanning tree instances, traffic of different VLANs will be forwarded along different physical links and VLAN-based load balancing can be carried out.

Path costs depend on path cost calculation standards. After the path cost calculation standard is determined, set a relatively small path cost within a specified range for a port that has a high link rate. In the Huawei legacy standard, default path costs for ports with different link rates are different, as shown in the following table.
Table 6-29  Mappings between link rates and path costs

Link Rate

Recommended Value

Default, Value

Recommended Value Range

Value Range

10 Mbit/s

2000

200-20000

1-200,000

100 Mbit/s

200

20-2000

1-200,000

1 Gbit/s

20

2-200

1-200,000

10 Gbit/s

2

2-20

1-200,000

Over 10 Gbit/s

1

1-2

1-200,000

Prerequisites

A path cost calculation standard has been set using the stp pathcost-standard command.

Precautions

If the path cost of a port, the spanning tree where the port resides needs to be recalculated.

If the stp pathcost-standard command is used to change the path cost calculation standard, the path cost set using the stp cost command for a port will be restored to the default value.

Example

# Set the path cost of GE0/0/1 in spanning tree instance 2 to 200.
<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] stp instance 2 cost 200
Related Topics
Translation
Download
Updated: 2019-11-21

Document ID: EDOC1100064352

Views: 206651

Downloads: 122

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