| 场景 | 万兆/多千兆组网、带宽差异选路 |
|---|---|
| 适用 | 全部三层设备 |
| 命令族 | bandwidth-reference / auto-cost reference-bandwidth / bandwidth-reference |
建议取值
| 链路最高速 | 建议参考带宽 | 说明 |
|---|---|---|
| 1G 以内 | 100(默认) | 一般无需改 |
| 10G | 10000 | 千兆 cost=10、万兆 cost=1 |
| 100G | 100000 | 万兆 cost=10、十万兆 cost=1 |
华为 VRP
华为 VRP
[Huawei] ospf 1
[Huawei-ospf-1] bandwidth-reference 10000
! 单位 Mbps;改后进程内自动重算接口 cost思科 IOS
思科 IOS
SW-CORE-01(config)# router ospf 1
SW-CORE-01(config-router)# auto-cost reference-bandwidth 10000
! 单位 Mbps,注意别写成 10000000000H3C Comware
H3C Comware
[H3C] ospf 1
[H3C-ospf-1] bandwidth-reference 10000参考带宽必须全网一致,否则同一链路两端算出的 cost 不同、SPF 结果不对称,可能出现单向选路怪异。改之前先想清楚:所有设备都要改。