交换机 : Cisco Catalyst 6500 系列交换机

生成树从 PVST+ 到快速 PVST 的迁移配置示例

2016 年 10 月 27 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 10 月 20 日) | 反馈


目录


简介

本文档提供了用于在园区网络中将生成树模式从 PVST+ 迁移到快速 PVST+ 的配置示例。此外,还介绍了 PVST+ 配置、生成树负载平衡以及 UplinkFast 和 BackboneFast 功能。

先决条件

要求

建议在配置快速 PVST+ 之前先阅读了解快速生成树协议 (802.1w)

此表显示了 Catalyst 交换机中的快速生成树协议 (RSTP) 支持以及实现该支持所需的最低软件版本。

Catalyst 平台 快速 PVST+
Catalyst 2900XL/3500XL 不可用。
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 不可用。

使用的组件

本文档中的信息根据思科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 传输语音流量。

rapidpvst-mig-config1.gif

配置

本文档使用以下配置:

PVST+ 配置

上述交换机在 PVST+ 中配置为按照网络图来传输数据和语音流量。以下是该配置的简要汇总:

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。您可以使用以下方法实现此目的:

  1. 降低 Distribution1 中的端口成本:Fa1/0/24

  2. 降低 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 将按以下顺序选择最佳路径(根端口):

  1. 路径成本

  2. 转发交换机的网桥 ID

  3. 最低端口优先级

  4. 最小内部端口号

在本示例中,两条路径的成本相同。然而, 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 - fa0/6 中 VLAN 200 的成本之后,Services1 会选择 fa0/47 转发 VLAN 200。然而,此时要求通过 fa0/48 转发 VLAN 200。您可以使用以下两种方法来实现此目的:

  1. 降低 Services1 中的端口成本:Fa0/48

  2. 降低 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

在您启动迁移进程之前,最好了解 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+ 迁移

快速 PVST+ 与 802.1D 使用相同的 BPDU 格式,并且它向后兼容。要同时将企业网络中的所有交换机都转换为快速 PVST+ 模式,是非常困难的。由于它具有向后兼容性,因此您可以分阶段转换它。建议在预定维护时段实施更改,因为重新配置生成树时会中断数据流。生成树的 uplinkfast 和 BackboneFast 功能是 PVST+ 功能。当您启用快速 PVST+ 时,这些功能处于禁用状态,因为这些功能是在快速 PVST+ 模式下构建的。所以,在迁移期间,可以删除这些命令。功能(如 PortFast、BPDUguard、BPDUfilter、根防护和环路防护)的配置在快速 PVST+ 模式下也适用。这些功能的用法与在 PVST+ 模式下相同。如果已在 PVST+ 模式下启用了这些功能,则在迁移到快速 PVST+ 模式后,这些功能将保持活动状态。在本示例中,按以下顺序进行迁移:

  1. Access1

  2. Access2

  3. Services1 和 Services2

  4. Distribution1 和 Distribution2

  1. 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.
    
    
  2. 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.
  3. 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
    
  4. 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.

调试输出 - 快速 PVST+ 模式

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

故障排除

目前没有针对此配置的故障排除信息。


相关信息


Document ID: 72836