本文档提供了用于在园区网络中将生成树模式从 PVST+ 迁移到快速 PVST+ 的配置示例。此外,还介绍了 PVST+ 配置、生成树负载平衡以及 UplinkFast 和 BackboneFast 功能。
建议在配置快速 PVST+ 之前先阅读了解快速生成树协议 (802.1w) 。
此表显示了 Catalyst 交换机中的快速生成树协议 (RSTP) 支持以及实现该支持所需的最低软件版本。
Catalyst 平台 | 快速 PVST+ |
---|---|
Catalyst 2900 XL / 3500 XL | 不可用。 |
Catalyst 2940 | 12.1(20)EA2 |
Catalyst 2950/2955/3550 | 12.1(13)EA1 |
Catalyst 2970/3750 | 12.1(14)EA1 |
Catalyst 3560 | 12.1(19)EA1 |
Catalyst 3750 Metro | 12.1(14)AX |
Catalyst 2948G-L3/4908G-L3 | 不可用。 |
Catalyst 4000/2948G/2980G (CatOS) | 7.5 |
Catalyst 4000/4500 (IOS) | 12.1(19)EW |
Catalyst 5000/5500 | 不可用。 |
Catalyst 6000/6500 | 7.5 |
Catalyst 6000/6500 (IOS) | 12.1(13)E |
Catalyst 8500 | 不可用。 |
本文档中的信息基于 Cisco IOS® 软件版本 12.2(25) 和 CatOS 8.5(8)。 但是,配置适用于表中显示的最低 Cisco IOS 版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
802.1D 生成树协议 (STP) 具有收敛缓慢的缺点。Cisco Catalyst 交换机支持三种类型的 STP:PVST+、快速 PVST+ 和 MST。PVST+ 基于 IEEE802.1D 标准,并且包括 Cisco 专有扩展,如 BackboneFast、UplinkFast 和 PortFast。快速 PVST+ 基于 IEEE 802.1w 标准并且其收敛速度比 802.1D 更快。RSTP (IEEE 802.1w) 本身包括针对 802.1D 生成树的大多数 Cisco 专有增强功能,如 BackboneFast 和 UplinkFast。快速 PVST+ 具有下列独特功能:
使用向后与使用网桥协议数据单元 (BPDU) 版本 0 的 802.1D STP 兼容的 BPDU 版本 2。
所有交换机每 2 秒在所有端口上生成一次 BPDU 并发送出去,而在 802.1D STP 中,只有根网桥发送配置 BPDU。
端口角色 — 根端口、指定端口、替代端口和备份端口。
端口状态 — 丢弃、识别和转发。
端口类型 — 边缘端口 (Portfast)、点对点端口和共享端口。
快速 PVST 使用 RSTP 提供更快速的收敛。任一 RSTP 端口收到传统 802.1D BPDU 时,它都会采用传统 STP,并且当它与传统网桥交互时,802.1w 固有的快速收敛优势将会丧失。
本示例包含两部分。第一部分显示当前 PVST+ 配置。第二部分说明用于从 PVST+ 迁移到快速 PVST+ 的配置。
注意:使用命令查找工具(仅限注册客户)可获取有关本节中使用的命令的详细信息。
本文档使用以下网络设置:
此图包含下列交换机:
处于分布层中的 Distribution1 和 Distribution2
两台称为 Access1 (IOS) 和 Access2 (CatOS) 的接入层交换机
两台称为 Services1 和 Services2 的服务器聚合交换机
VLAN 10、30 和 100 传输数据流量。VLAN 20、40 和 200 传输语音流量。
本文档使用以下配置:
上述交换机在 PVST+ 中配置为按照网络图来传输数据和语音流量。以下是该配置的简要汇总:
使用 Distribution1(config)# spanning-tree vlan 10,30,100 root primary 命令将 Distribution1 交换机配置为数据 VLAN 10、30 和 100 的主根网桥;并使用 Distribution1(config)# spanning-tree vlan 20,40,200 root secondary 命令将其配置为语音 VLAN 20、40 和 200 的辅助根网桥。
使用 Distribution2(config)# spanning-tree vlan 20,40,200 root primary 命令将 Distribution2 交换机配置为语音 VLAN 20、40 和 200 的主根网桥;而数据 VLAN 10、30 和 100 的辅助根网桥使用 Distribution2(config)# spanning-tree vlan 10,30,100 root secondary 命令。
在所有交换机上配置 spanning-tree backbonefast 命令,以便在网络中出现间接链路故障时更迅速地收敛 STP。
在接入层交换机上配置 spanning-tree uplinkfast 命令,以便在出现直接上行链路故障时更迅速地收敛 STP。
Distribution1 |
---|
Distribution1#show running-config Building configuration... spanning-tree mode pvst spanning-tree extend system-id spanning-tree backbonefast spanning-tree vlan 10,30,100 priority 8192 spanning-tree vlan 20,40,200 priority 16384 ! vlan 10,20,30,40,100,200 ! interface FastEthernet1/0/1 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20 ! interface FastEthernet1/0/3 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 30,40 ! interface FastEthernet1/0/5 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 100,200 ! interface FastEthernet1/0/23 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20,30,40,100,200 ! interface FastEthernet1/0/24 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20,30,40,100,200 ! ! end |
您可以看到端口 Fa1/0/24 是使用 spanning-tree vlan 20,40,200 port-priority 64 命令配置的。Distribution2为VLAN 20、40、200配置了根。Distribution2有两条到Distribution1的链路:Fa1/0/23和Fa1/0/24。两个端口都是VLAN 20、40、200的指定端口,因为Distribution2是这些VLAN的根。两个端口具有同一优先级 128(默认值)。 另外,这两条链路还具有相同的 Distribution1 成本:fa1/0/23和fa1/0/24。Distribution1选择两个端口的最低端口号,以便将端口设置为转发状态。最低的端口号是Fa1/0/23。但是,根据网络图,语音VLAN 20、40、200应通过Fa1/0/24。您可以通过以下方法来实现:
降低 Distribution1 中的端口成本:Fa1/0/24
降低 Distribution2 中的端口优先级:Fa1/0/24
在本示例中,降低了端口优先级以便通过 fa1/0/24 转发 VLAN 20、40 和 200。
Distribution2 |
---|
Distribution2#show running-config Building configuration... ! spanning-tree mode pvst spanning-tree extend system-id spanning-tree backbonefast spanning-tree vlan 10,30,100 priority 28672 spanning-tree vlan 20,40,200 priority 24576 ! vlan 10,20,30,40,100,200 ! interface FastEthernet1/0/2 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20 ! interface FastEthernet1/0/4 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 30,40 ! interface FastEthernet1/0/6 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 100,200 ! interface FastEthernet1/0/23 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20,30,40,100,200 ! interface FastEthernet1/0/24 switchport trunk encapsulation dot1q switchport mode trunk spanning-tree vlan 20,40,200 port-priority 64 switchport trunk allowed vlan 10,20,30,40,100,200 end |
您可以看到,Services1 中的端口 Fa0/5 以及 Services2 中的 Fa0/6 和 Fa0/48 均具有生成树端口成本和端口优先级配置。这里调整了 STP,以便 Services1 和 Services2 的 VLAN 100 和 200 可以通过它们之间的中继链路。如果未应用此配置,则 Services1 和 Services2 将无法通过它们之间的中继链路来传递流量,而会选择那条通过 Distribution1 和 Distribution2 的路径。
Services2 将发现两条到 VLAN 100 根 (Distribution1) 的等成本路径。 一个通过Services1,另一个通过Distribution2。STP按以下顺序选择最佳路径(根端口):
路径成本
转发交换机的网桥 ID
最低端口优先级
最小内部端口号
在本示例中,两条路径的成本相同。但是,Distribution2(24576)的优先级低于VLAN 100的Services1(32768)。因此,Services2选择Distribution2。在本例中,Services1上的端口开销:fa0/5设置为较低值,使Services2选择Services1。路径开销将覆盖转发交换机的优先级编号。
Services1 |
---|
Services1#show running-config Building configuration... spanning-tree mode pvst spanning-tree portfast bpduguard default spanning-tree extend system-id spanning-tree backbonefast ! vlan 100,200 ! interface FastEthernet0/5 switchport trunk encapsulation dot1q switchport mode trunk spanning-tree vlan 100 cost 18 switchport trunk allowed vlan 100,200 ! interface FastEthernet0/47 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 100,200 ! interface FastEthernet0/48 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 100,200 ! ! end |
Services1也应用了同样的概念来选择Services2来转发VLAN 200。在您降低Services2中VLAN 200的开销 — fa0/6后,Services1选择fa0/47来转发VLAN 200。但是,此处的要求是将VLAN 200转发到fa0/48。您可以通过以下两种方法实现:
降低 Services1 中的端口成本:Fa0/48
降低 Services2 中的端口优先级:Fa0/48
在本示例中,降低了 Services2 中的端口优先级以便通过 fa0/48 转发 VLAN 200。
Services2 |
---|
Services2#show running-config Building configuration... spanning-tree mode pvst spanning-tree portfast bpduguard default spanning-tree extend system-id spanning-tree backbonefast ! vlan 100,200 ! interface FastEthernet0/6 switchport trunk encapsulation dot1q switchport mode trunk spanning-tree vlan 200 cost 18 switchport trunk allowed vlan 100,200 ! interface FastEthernet0/47 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 100,200 ! interface FastEthernet0/48 switchport trunk encapsulation dot1q switchport mode trunk spanning-tree vlan 200 port-priority 64 switchport trunk allowed vlan 100,200 ! ! end |
Access1 |
---|
Access1#show running-config Building configuration... ! spanning-tree mode pvst spanning-tree portfast bpduguard default spanning-tree extend system-id spanning-tree uplinkfast spanning-tree backbonefast ! vlan 10,20 ! interface FastEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20 ! interface FastEthernet0/2 switchport trunk encapsulation dot1q switchport mode trunk switchport trunk allowed vlan 10,20 ! end |
Access2 |
---|
Access2> (enable)show config all #mac address reduction set spantree macreduction enable ! #stp mode set spantree mode pvst+ ! #uplinkfast groups set spantree uplinkfast enable rate 15 all-protocols off ! #backbonefast set spantree backbonefast enable ! #vlan parameters set spantree priority 49152 1 set spantree priority 49152 30 set spantree priority 49152 40 ! #vlan(defaults) set spantree enable 1,30,40 set spantree fwddelay 15 1,30,40 set spantree hello 2 1,30,40 set spantree maxage 20 1,30,40 ! #vtp set vlan 1,30,40 ! #module 3 : 48-port 10/100BaseTX Ethernet set trunk 3/3 on dot1q 30,40 set trunk 3/4 on dot1q 30,40 ! end |
在您启动迁移进程之前,最好了解 UplinkFast 和 BackboneFast 行为。在网络图中, Access1 交换机运行 Cisco IOS。在迁移到快速 PVST+ 模式之前将获取此输出:
Access1#show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol ieee Root ID Priority 24586 Address 0015.63f6.b700 Cost 3019 Port 107 (FastEthernet3/0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49162 (priority 49152 sys-id-ext 10) Address 000f.f794.3d00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Uplinkfast enabled Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa3/0/1 Root FWD 3019 128.107 P2p Fa3/0/2 Altn BLK 3019 128.108 P2p Access1#show spanning-tree summary Switch is in pvst mode Root bridge for: none Extended system ID is enabled Portfast Default is disabled PortFast BPDU Guard Default is enabled Portfast BPDU Filter Default is disabled Loopguard Default is disabled EtherChannel misconfig guard is enabled UplinkFast is enabled BackboneFast is enabled Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0010 1 0 0 1 2 VLAN0020 1 0 0 1 2 ---------------------- -------- --------- -------- ---------- ---------- 2 vlans 2 0 0 2 4
在模式更改为快速 PVST+ 之后将获取此输出:
Access1#show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol rstp Root ID Priority 24586 Address 0015.63f6.b700 Cost 3019 Port 107 (FastEthernet3/0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 49162 (priority 49152 sys-id-ext 10) Address 000f.f794.3d00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 UplinkFast enabled but inactive in rapid-pvst mode Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa3/0/1 Root FWD 3019 128.107 P2p Fa3/0/2 Altn BLK 3019 128.108 P2p Access1#show spanning-tree summary Switch is in rapid-pvst mode Root bridge for: none Extended system ID is enabled Portfast Default is disabled PortFast BPDU Guard Default is enabled Portfast BPDU Filter Default is disabled Loopguard Default is disabled EtherChannel misconfig guard is enabled UplinkFast is enabled but inactive in rapid-pvst mode BackboneFast is enabled but inactive in rapid-pvst mode Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0010 1 0 0 1 2 VLAN0020 1 0 0 1 2 ---------------------- -------- --------- -------- ---------- ---------- 2 vlans 2 0 0 2 4
您可以查看 UplinkFast 和 BackboneFast 处于启用状态(但在快速 PVST 模式下不活动)的 show spanning-tree summary 命令输出。可以选择删除这两个命令。如果不删除命令,则不会影响任一快速 PVST 操作。如果使用 no spanning-tree uplinkfast 配置模式命令禁用 UplinkFast,则网桥优先级和端口成本会恢复为默认值。建议将非根交换机的网桥优先级设为较高编号。在快速 PVST 模式下禁用 UplinkFast 功能之后,此输出会显示:
Access1#show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol rstp Root ID Priority 24586 Address 0015.63f6.b700 Cost 19 Port 107 (FastEthernet3/0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32778 (priority 32768 sys-id-ext 10) Address 000f.f794.3d00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa3/0/1 Root FWD 19 128.107 P2p Fa3/0/2 Altn BLK 19 128.108 P2p Access1#show spanning-tree summary Switch is in rapid-pvst mode Root bridge for: none Extended system ID is enabled Portfast Default is disabled PortFast BPDU Guard Default is enabled Portfast BPDU Filter Default is disabled Loopguard Default is disabled EtherChannel misconfig guard is enabled UplinkFast is disabled BackboneFast is enabled but inactive in rapid-pvst mode Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0010 1 0 0 1 2 VLAN0020 1 0 0 1 2 ---------------------- -------- --------- -------- ---------- ---------- 2 vlans 2 0 0 2 4
CatOS 不允许您在 BackboneFast 功能处于启用状态时将模式更改为快速 PVST。您必须在迁移之前禁用 BackboneFast。UplinkFast 的行为与它在 IOS 中的行为一样。
Access2> (enable) set spantree mode rapid-pvst+ Cannot change the spantree mode to RAPID-PVST+ when backbonefast is enabled.
快速 PVST+ 与 802.1D 使用相同的 BPDU 格式,并且它向后兼容。要同时将企业网络中的所有交换机都转换为快速 PVST+ 模式,是非常困难的。由于它具有向后兼容性,因此您可以分阶段转换它。建议在预定维护时段实施更改,因为重新配置生成树时会中断数据流。生成树的 uplinkfast 和 BackboneFast 功能是 PVST+ 功能。当您启用快速 PVST+ 时,这些功能处于禁用状态,因为这些功能是在快速 PVST+ 模式下构建的。所以,在迁移期间,可以删除这些命令。功能(如 PortFast、BPDUguard、BPDUfilter、根防护和环路防护)的配置在快速 PVST+ 模式下也适用。这些功能的用法与在 PVST+ 模式下相同。如果已在 PVST+ 模式下启用了这些功能,则在迁移到快速 PVST+ 模式后,这些功能将保持活动状态。在本示例中,按以下顺序进行迁移:
Access1
Access2
Services1 和 Services2
Distribution1 和 Distribution2
Access1 迁移:
Access1(config)#spanning-tree mode rapid-pvst Access1(config)#no spanning-tree uplinkfast Access1(config)#no spanning-tree backbonefast Access1#show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol rstp Root ID Priority 24586 Address 0015.63f6.b700 Cost 19 Port 107 (FastEthernet3/0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32778 (priority 32768 sys-id-ext 10) Address 000f.f794.3d00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa3/0/1 Root FWD 19 128.107 P2p Peer(STP) Fa3/0/2 Altn BLK 19 128.108 P2p Peer(STP) !--- Type P2p Peer(STP) represents that the neighbor switch runs PVST.
Access2 迁移:
Access2> (enable) set spantree backbonefast disable Backbonefast disabled for all VLANs. Access2> (enable) set spantree mode rapid-pvst+ PVST+ database cleaned up. Spantree mode set to RAPID-PVST+. Access2> (enable) clear spantree uplinkfast This command will cause all portcosts, portvlancosts, and the bridge priority on all vlans to be set to default. Do you want to continue (y/n) [n]? y VLANs 1-4094 bridge priority set to 32768. The port cost of all bridge ports set to default value. The portvlancost of all bridge ports set to default value. uplinkfast all-protocols field set to off. uplinkfast disabled for bridge.
Services1 和 Services2 迁移:
Services1(config)#spanning-tree mode rapid-pvst Services1(config)#no spanning-tree backbonefast
Services2(config)#spanning-tree mode rapid-pvst Services2(config)#no spanning-tree backbonefast
Distribution1 和 Distribution2 迁移:
Distribution1(config)#spanning-tree mode rapid-pvst 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to down 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to down 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up !--- Distribution1 switch has Layer3 VLAN interfaces and it goes !--- down and up during the conversion. Distribution1(config)#no spanning-tree backbonefast
Distribution2(config)#spanning-tree mode rapid-pvst 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to own 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to p 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state t up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state t up 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to down 2d02h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up !--- Distribution2 switch has Layer3 VLAN interfaces and it goes !--- down and up during the conversion. Distribution2(config)#no spanning-tree backbonefast
在大型企业网络中,迁移进程会需要几天的时间。在迁移过程期间,可以在混合模式下运行 LAN,如在 PVST+ 模式下运行一些交换机,而在快速 PVST+ 模式下运行另一些交换机。在混合模式下,无法发挥快速 PVST+ 的所有优势。总收敛时间与 PVST+ 模式的收敛时间相同。为了充分利用快速 PVST+,生成树拓扑中的所有交换机都必须运行快速 PVST+。为了显示生成树在混合模式下的行为方式,此处会显示 debug 命令输出示例。Distribution1 和 Distribution2 处于 PVST+ 模式,而 Access1 处于快速 PVST+ 模式。
当 Access1 和 Distribution1 之间的链路发生故障时,debug spanning-tree 命令输出会显示 STP 操作。
Access1 00:55:13: RSTP(10): updt roles, root port Fa0/1 going down 00:55:13: RSTP(10): Fa0/2 is now root port 00:55:13: RSTP(10): Fa0/2 received a tc ack 00:55:15: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to adminis tratively down 00:55:16: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, cha nged state to down Distribution1 00:55:20: STP: VLAN0010 Topology Change rcvd on Fa1/0/23 00:55:20: STP: VLAN0020 sent Topology Change Notice on Fa1/0/24 00:55:21: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/1, changed state to down 00:55:22: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to down Distribution2 00:55:06: STP: VLAN0010 Topology Change rcvd on Fa1/0/2 00:55:06: STP: VLAN0010 sent Topology Change Notice on Fa1/0/23
当Access1和Distribution1之间的链路处于工作状态时,debug spanning-tree命令输出显示STP操作。
Access1 00:55:40: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up 00:55:43: STP: PVST vlan 10 port Fa0/1 created, ext id 2E42430, vp 3389640 00:55:43: RSTP(10): initializing port Fa0/1 00:55:43: RSTP(10): Fa3/0/1 is now designated 00:55:43: STP: PVST vlan 20 port Fa0/1 created, ext id 2E42430, vp 300EC20 00:55:43: RSTP(20): initializing port Fa0/1 00:55:43: RSTP(20): Fa0/1 is now designated 00:55:43: RSTP(10): transmitting a proposal on Fa0/1 00:55:43: RSTP(20): transmitting a proposal on Fa0/1 00:55:43: RSTP(10): transmitting a proposal on Fa0/1 00:55:43: RSTP(20): transmitting a proposal on Fa0/1 00:55:43: RSTP(10): updt roles, received superior bpdu on Fa0/1 00:55:43: RSTP(10): Fa0/1 is now root port 00:55:43: RSTP(10): Fa0/2 blocked by re-root 00:55:43: RSTP(10): Fa0/2 is now alternate 00:55:44: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, cha nged state to up 00:55:44: RSTP(20): updt roles, received superior bpdu on Fa0/1 00:55:44: RSTP(20): Fa0/1 is now alternate Distribution1 00:55:49: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to up 00:55:50: set portid: VLAN0010 Fa1/0/1: new port id 8001 00:55:50: STP: PVST vlan 10 port Fa1/0/1 created, ext id 2DA13A8, vp 3BDB708 00:55:50: STP: VLAN0010 Fa1/0/1 -> listening 00:55:50: set portid: VLAN0020 Fa1/0/1: new port id 8001 00:55:50: STP: PVST vlan 20 port Fa1/0/1 created, ext id 2DA13A8, vp 3C06F20 00:55:50: STP: VLAN0020 Fa1/0/1 -> listening 00:55:51: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/1, changed state to up 00:56:05: STP: VLAN0010 Fa1/0/1 -> learning 00:56:05: STP: VLAN0020 Fa1/0/1 -> learning 00:56:20: STP: VLAN0010 Fa1/0/1 -> forwarding 00:56:20: STP: VLAN0020 sent Topology Change Notice on Fa1/0/24 00:56:20: STP: VLAN0020 Fa1/0/1 -> forwarding !--- This output is evident that the Access1 switch waits for the !--- standard 802.1D Spanning Tree process of listening, learning and forwarding !--- to complete in Distribution1. Distribution2 00:55:06: STP: VLAN0020 Topology Change rcvd on Fa1/0/24 00:56:06: STP: VLAN0020 Topology Change rcvd on Fa1/0/24 !--- This output shows that Distribution2 is notified !--- about the indirect link outage by TCN BPDUs.
Distribution1、Distribution2 和 Access1 交换机处于快速 PVST+ 模式。当 Access1 和 Distribution1 之间的链路发生故障时,debug spanning-tree 命令输出会显示 STP 操作。
Access1 01:31:04: RSTP(10): updt roles, root port Fa0/1 going down 01:31:04: RSTP(10): Fa0/2 is now root port 01:31:06: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to adminis tratively down 01:31:07: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, cha nged state to down Distribution1 01:31:13: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/1, changed state to down 01:31:14: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to down
当 Access1 和 Distribution1 之间的链路正常运行时,debug spanning-tree 命令输出会显示 STP 操作。
Access1 01:35:46: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up 01:35:48: STP: PVST vlan 10 port Fa3/0/1 created, ext id 2E42430, vp 3C8E360 01:35:48: RSTP(10): initializing port Fa3/0/1 01:35:48: RSTP(10): Fa3/0/1 is now designated 01:35:48: STP: PVST vlan 20 port Fa3/0/1 created, ext id 2E42430, vp 3C8E3E0 01:35:48: RSTP(20): initializing port Fa3/0/1 01:35:48: RSTP(20): Fa3/0/1 is now designated 01:35:48: RSTP(10): updt roles, received superior bpdu on Fa3/0/1 01:35:48: RSTP(10): Fa3/0/1 is now root port 01:35:48: RSTP(10): Fa3/0/2 blocked by re-root 01:35:48: RSTP(10): synced Fa3/0/1 01:35:48: RSTP(10): Fa3/0/2 is now alternate 01:35:48: RSTP(20): updt roles, received superior bpdu on Fa3/0/1 01:35:48: RSTP(20): Fa3/0/1 is now alternate 01:35:48: RSTP(10): transmitting an agreement on Fa3/0/1 as a response to a prop osal Distribution1 01:35:55: %LINK-3-UPDOWN: Interface FastEthernet1/0/1, changed state to up 01:35:56: STP: PVST vlan 10 port Fa1/0/1 created, ext id 2DA13A8, vp 3BDCCD8 01:35:56: RSTP(10): initializing port Fa1/0/1 01:35:56: RSTP(10): Fa1/0/1 is now designated 01:35:56: STP: PVST vlan 20 port Fa1/0/1 created, ext id 2DA13A8, vp 2D21C60 01:35:56: RSTP(20): initializing port Fa1/0/1 01:35:56: RSTP(20): Fa1/0/1 is now designated 01:35:56: RSTP(10): transmitting a proposal on Fa1/0/1 01:35:56: RSTP(20): transmitting a proposal on Fa1/0/1 01:35:56: RSTP(10): received an agreement on Fa1/0/1 01:35:57: RSTP(20): transmitting a proposal on Fa1/0/1 01:35:59: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:01: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:03: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:06: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:08: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:10: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:11: RSTP(20): Fa1/0/1 fdwhile Expired 01:36:12: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:14: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:16: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:18: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:20: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:22: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:24: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:26: RSTP(20): transmitting a proposal on Fa1/0/1 01:36:26: RSTP(20): Fa1/0/1 fdwhile Expired !--- Distribution1 puts the port Fa1/0/1 as designated for VLANs 10 and 20. !--- It also proposes that Fa1/0/1 is designated for VLANs 10, 20. Access1 agrees with the !--- proposal for VLAN10. However, it does not agree with the proposal for VLAN20 because it !--- has the superior BPDU for VLAN20 from Distribution2.
使用本部分可确认配置能否正常运行。
命令输出解释程序(仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。
每次更改配置时,建议您验证生成树拓扑。
验证Distribution1交换机是数据VLAN 10、30、100的根网桥。另外,验证生成树转发路径是否与网络图中的路径匹配。
Distribution1#show spanning-tree vlan 10 VLAN0010 Spanning tree enabled protocol rstp Root ID Priority 24586 Address 0015.63f6.b700 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24586 (priority 24576 sys-id-ext 10) Address 0015.63f6.b700 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa1/0/1 Desg FWD 19 128.1 P2p Fa1/0/3 Desg FWD 19 128.3 P2p Fa1/0/5 Desg FWD 19 128.5 P2p Fa1/0/23 Desg FWD 19 128.23 P2p Fa1/0/24 Desg FWD 19 128.24 P2p Access1#show spanning-tree summary Switch is in rapid-pvst mode Root bridge for: none Extended system ID is enabled Portfast Default is disabled PortFast BPDU Guard Default is enabled Portfast BPDU Filter Default is disabled Loopguard Default is disabled EtherChannel misconfig guard is enabled UplinkFast is disabled BackboneFast is disabled Configured Pathcost method used is short Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0010 1 0 0 1 2 VLAN0020 1 0 0 1 2 ---------------------- -------- --------- -------- ---------- ---------- 2 vlans 2 0 0 2 4 Access2> (enable) show spantree 30 VLAN 30 Spanning tree mode RAPID-PVST+ Spanning tree type ieee Spanning tree enabled Designated Root 00-15-63-f6-b7-00 Designated Root Priority 24606 Designated Root Cost 19 Designated Root Port 3/3 Root Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec Bridge ID MAC ADDR 00-d0-00-50-30-1d Bridge ID Priority 32768 Bridge Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec Port State Role Cost Prio Type ------------------------ ------------- ---- --------- ---- -------------------- 3/3 forwarding ROOT 19 32 P2P 3/4 blocking ALTR 19 32 P2P Access2> (enable) show spantree 40 VLAN 40 Spanning tree mode RAPID-PVST+ Spanning tree type ieee Spanning tree enabled Designated Root 00-15-c6-c1-30-00 Designated Root Priority 24616 Designated Root Cost 19 Designated Root Port 3/4 Root Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec Bridge ID MAC ADDR 00-d0-00-50-30-27 Bridge ID Priority 32768 Bridge Max Age 20 sec Hello Time 2 sec Forward Delay 15 sec Port State Role Cost Prio Type ------------------------ ------------- ---- --------- ---- -------------------- 3/3 blocking ALTR 19 32 P2P 3/4 forwarding ROOT 19 32 P2P Services1#show spanning-tree vlan 100 VLAN0100 Spanning tree enabled protocol rstp Root ID Priority 24676 Address 0015.63f6.b700 Cost 18 Port 7 (FastEthernet0/5) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32868 (priority 32768 sys-id-ext 100) Address 0003.fd63.bb80 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/5 Root FWD 18 128.7 P2p Fa0/46 Desg FWD 19 128.50 P2p Fa0/47 Desg FWD 19 128.51 P2p Services1#show spanning-tree vlan 200 VLAN0200 Spanning tree enabled protocol rstp Root ID Priority 24776 Address 0015.c6c1.3000 Cost 37 Port 51 (FastEthernet0/47) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32968 (priority 32768 sys-id-ext 200) Address 0003.fd63.bb80 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/5 Altn BLK 19 128.7 P2p Fa0/46 Altn BLK 19 128.50 P2p Fa0/47 Root FWD 19 128.51 P2p Services2#show spanning-tree vlan 100 VLAN0100 Spanning tree enabled protocol rstp Root ID Priority 24676 Address 0015.63f6.b700 Cost 37 Port 42 (GigabitEthernet0/42) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32868 (priority 32768 sys-id-ext 100) Address 00d0.2bfc.7d80 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/6 Altn BLK 19 128.6 P2p Fa0/42 Root FWD 19 128.42 P2p Fa0/43 Altn BLK 19 128.43 P2p Services2#show spanning-tree vlan 200 VLAN0200 Spanning tree enabled protocol rstp Root ID Priority 24776 Address 0015.c6c1.3000 Cost 18 Port 6 (GigabitEthernet0/6) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32968 (priority 32768 sys-id-ext 200) Address 00d0.2bfc.7d80 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/6 Root FWD 18 128.6 P2p Fa0/42 Desg FWD 19 128.42 P2p Fa0/43 Desg FWD 19 64.43 P2p
目前没有针对此配置的故障排除信息。