Configuring RPVST+
Procedure
Example
This example creates the following configuration:
- Sets the spanning tree mode torpvst.
- Enables spanning tree.
- Defines spanning tree support for VLANs2-5.
- Sets the priority for each VLAN.
switch#configswitch(config)#跨越-tree mode rpvstswitch(config)#跨越-treeswitch(config)#跨越-tree vlan 2-5switch(config)#跨越-tree vlan 2 priority 5switch(config)#跨越-tree vlan 3 priority 4switch(config)#扩充树vlan 4优先3switch(config)#跨越-tree vlan 5 priority 2switch(config)#exitswitch#show spanning-treeSpanning tree status : Enabled Protocol: RPVST Extended System-id : Enabled Ignore PVID Inconsistency : Disabled Path cost method : Long VLAN2 Root ID Priority : 20480 MAC-Address: 70:72:cf:38:21:e5 This bridge is the root Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Bridge ID Priority : 20480 MAC-Address: 70:72:cf:38:21:e5 Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Port Role State Cost Priority Type ------------ -------------- ------------ ------- ---------- ---------- 1/1/1 Designated Forwarding 20000 128 point_to_point VLAN3 Root ID Priority : 16384 MAC-Address: 70:72:cf:38:21:e5 This bridge is the root Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Bridge ID Priority : 16384 MAC-Address: 70:72:cf:38:21:e5 Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Port Role State Cost Priority Type ------------ -------------- ------------ ------- ---------- ---------- 1/1/1 Designated Forwarding 20000 128 point_to_point VLAN4 Root ID Priority : 12288 MAC-Address: 70:72:cf:38:21:e5 This bridge is the root Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Bridge ID Priority : 12288 MAC-Address: 70:72:cf:38:21:e5 Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Port Role State Cost Priority Type ------------ -------------- ------------ ------- ---------- ---------- 1/1/1 Designated Forwarding 20000 128 point_to_point VLAN5 Root ID Priority : 8192 MAC-Address: 70:72:cf:38:21:e5 This bridge is the root Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Bridge ID Priority : 8192 MAC-Address: 70:72:cf:38:21:e5 Hello time(in seconds):2 Max Age(in seconds):20 Forward Delay(in seconds):15 Port Role State Cost Priority Type ------------ -------------- ------------ ------- ---------- ---------- 1/1/1 Designated Forwarding 20000 128 point_to_point