| 场景 | 非对称带宽选路、双上联转发规划 |
|---|---|
| 适用 | 全部交换机 |
| 命令族 | stp cost(接口)/ spanning-tree cost / stp cost(接口) |
华为 VRP
华为 VRP
[Huawei-GigabitEthernet0/0/24] stp cost 20000 ! 接口开销(小者优先)
! 按实例:stp instance 1 cost 20000
<Huawei> display stp brief | include GigabitEthernet0/0/24思科 IOS
思科 IOS
SW-A(config-if)# spanning-tree cost 200
! 或每 VLAN:spanning-tree vlan 10 cost 200
SW-A# show spanning-tree interface Gi1/0/24H3C Comware
H3C Comware
[H3C-GigabitEthernet1/0/24] stp cost 20000
<H3C> display stp brief默认 cost 随带宽与算法版本:万兆常见 2000(长整型),聚合口按总带宽折算(show spanning-tree 查实际值)。手工设值前先看默认值,跨越式设置反而绕路。