首页/网络/网络设备配置速查/桥优先级配置(手工控根)
VLAN 与二层交换60 条

桥优先级配置(手工控根)

优先级是根桥选举的本质参数(越小越优先,步进 4096):配 root primary 等价设置数值,但要精确控根时直接改优先级更直观。

网络设备配置速查网络更新于 2026-10-12
场景精细根桥控制、多实例场景
适用全部交换机
命令族stp priority / spanning-tree vlan priority / stp priority

华为 VRP

华为 VRP
[Huawei] stp priority 4096        ! 步进 4096,默认 32768
! 按实例:[Huawei] stp instance 1 priority 4096
<Huawei> display stp | include Bridge

思科 IOS

思科 IOS
SW-CORE-01(config)# spanning-tree vlan 10 priority 4096
SW-CORE-01# show spanning-tree vlan 10 | include priority

H3C Comware

H3C Comware
[H3C] stp priority 4096
[H3C] stp instance 1 priority 4096
<H3C> display stp | include priority
数值必须是 4096 的倍数(4096/8192/…/61440);38144 之类非倍数会被拒绝或取整。规划建议:主根 4096、备根 8192、汇聚固定 8192-12288、接入保持 32768 默认。

易错点

  • 写非 4096 倍数(如 32767)被设备取整,实际优先级与预期不符
  • MSTP 下改的是实例优先级(stp instance X priority),只改全局对已有实例不一定生效

数据来源与参考

  • 华为 STP 优先级
  • Cisco STP priority
  • H3C STP 优先级

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌