API Guide

CONFIGURATION 模式下启用快速 PVST+ 模式。
spanning-tree mode rapid-pvst
配置 RPVST+
OS10(config)# spanning-tree mode rapid-pvst
查看 RPVST+ 配置
OS10# show spanning-tree active
Spanning tree enabled protocol rapid-pvst with force-version rstp
VLAN 1
Executing IEEE compatible Spanning Tree Protocol
Root ID Priority 32768, Address 3417.4455.667f
Root Bridge hello time 2, max age 20, forward delay 15
Bridge ID Priority 32769, Address 90b1.1cf4.a523
Configured hello time 2, max age 20, forward delay 15
Interface Designated
Name PortID Prio Cost Sts Cost Bridge ID PortID
------------------------------------------------------------------------
ethernet1/1/5 128.276 128 500 FWD 0 32768 3417.4455.667f 128.146
ethernet1/1/6 128.280 128 500 BLK 0 32768 3417.4455.667f 128.150
Interface
Name Role PortID Prio Cost Sts Cost Link-type Edge
--------------------------------------------------------------
ethernet1/1/5 Root 128.276 128 500 FWD 0 AUTO No
ethernet1/1/6 Altr 128.280 128 500 BLK 0 AUTO No
Identifier
GUID-370DDB4C-6522-48CF-B835-3B2162877847
Version 8
Status Translation approved
选择根桥
RPVST+ 根据 VLAN 桥优先级确定根桥。为一个桥分配较低优先级会增加其成为根桥的可能性。命令 show spanning-tree
brief 将显示所有端口的相关信息而不考虑操作状态。
将数字分配为桥优先级或将其指定为 CONFIGURATION 模式下的根 0 61440
spanning-tree {vlan vlan-id priority priority-value}
vlan-id 输入介于 1 4093 之间的值。
priority priority-value 4096 为增量输入优先级值默认值为 32768。分配的数字越小桥成为根桥的可能性
更大。有效的桥优先级值包括040968192122881638420480245762867232768368644096045056
491525324857344 61440。所有其他值都将被拒绝。
配置根桥
OS10(config)# spanning-tree vlan 1 priority 4096
查看活动配置
OS10(config)# do show spanning-tree active
Spanning tree enabled protocol rapid-pvst with force-version rstp
VLAN 1
Executing IEEE compatible Spanning Tree Protocol
Root ID Priority 4097, Address 90b1.1cf4.a523
Root Bridge hello time 2, max age 20, forward delay 15
Bridge ID Priority 4097, Address 90b1.1cf4.a523
We are the root of VLAN 1
Configured hello time 2, max age 20, forward delay 15
Interface Designated
Name PortID Prio Cost Sts Cost Bridge ID PortID
---------------------------------------------------------------------
ethernet1/1/5 128.276 128 500 FWD 0 4097 90b1.1cf4.a523 128.276
ethernet1/1/6 128.280 128 500 FWD 0 4097 90b1.1cf4.a523 128.280
Interface
Name Role PortID Prio Cost Sts Cost Link-type Edge
2 447