交换机 : Cisco Nexus 5000 系列交换机

在连结5000系列交换机的生成树协议故障排除

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 23 日) | 反馈

简介

本文描述多种方法排除故障与生成树协议涉及的常见问题。

由思科 TAC 工程师撰稿。

先决条件

要求

Cisco 建议您了解以下主题:

  • 连结操作系统CLI
  • STP

使用的组件

本文档不限于特定的软件和硬件版本。

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

故障排除

此部分包括一些方法排除故障与STP的常见问题。

STP根

为了排除故障STP问题,知道是关键的哪交换机当前是根。命令显示在连结5000系列交换机的STP根是:

Nexus-5000# show spanning-tree vlan 1

VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address c84c.75fa.6000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address c84c.75fa.6000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

这是一些其他相关命令:

Nexus-5000# show spanning-tree vlan 1 detail
Nexus-5000# show spanning-tree vlan 1 summary

一旦确定了谁当前根是,您能检查事件历史记录发现是否更改,并且拓扑变化通知起源于的地方。

Nexus-5000# show spanning-tree internal event-history tree 1 brief
2012:11:06 13h:44m:20s:528204us T_EV_UP
VLAN0001 [0000.0000.0000.0000 C 0 A 0 R none P none]
2012:11:06 13h:44m:21s:510394us T_UT_SBPDU
VLAN0001 [8001.547f.ee18.e441 C 0 A 0 R none P Po1]
2012:11:06 13h:44m:21s:515129us T_EV_M_FLUSH_L
VLAN0001 [1001.001b.54c2.5a42 C 6 A 5 R Po1 P none]
2012:11:06 13h:44m:23s:544632us T_EV_M_FLUSH_R
VLAN0001 [1001.001b.54c2.5a42 C 6 A 5 R Po1 P Po1]
2012:11:06 13h:44m:24s:510352us T_EV_M_FLUSH_R
VLAN0001 [1001.001b.54c2.5a42 C 6 A 5 R Po1 P Po1]

提示:这是在命令的输出中出现的缩略语的一些定义。SBPDU :接收的优越网桥协议数据单元;FLUSH_L :本地冲洗;FLUSH_R :从远程交换机的冲洗。

注意:在版本5.1(3)N1(1)之前的NX-OS版本不记录超过149个事件,并且日志不滚动。

STP接口

此命令用于为了显示接口的事件。

Nexus-5000# show spanning-tree internal event-history tree 1 interface 
ethernet 1/3 brief

2012:11:05 13h:42m:20s:508027us P_EV_UP Eth1/3 [S DIS R Unkw A 0 Inc no]
2012:11:05 13h:42m:20s:508077us P_STATE Eth1/3 [S BLK R Desg A 0 Inc no]
2012:11:05 13h:42m:20s:508294us P_STATE Eth1/3 [S LRN R Desg A 0 Inc no]
2012:11:05 13h:42m:20s:508326us P_STATE Eth1/3 [S FWD R Desg A 0 Inc no]

此命令用于为了调查在接口的STP更改。此输出提供许多详细信息:

Nexus-5000# show spanning-tree internal info tree 1 interface port-channel 11
------- STP Port Info (vdc 1, tree 1, port Po11) ---------
dot1d info: port_num=4106, ifi=0x1600000a (port-channel11)
ISSU FALSE non-disr, prop 0, ag 0, flush 0 peer_not_disputed_count 0
if_index               0x1600000a
namestring port-channel11
.................... cut to save space ............

stats                  
fwd_transition_count   1       bpdus_in      40861   bpdus_out    40861
config_bpdu_in         0       rstp_bpdu_in  40861   tcn_bpdu_in  0     
config_bpdu_out        0       rstp_bpdu_out 40861   tcn_bpdu_out 0     
bpdufilter_drop_in     0     
bpduguard_drop_in      0     
err_dropped_in         0     
sw_flood_in            0     
.................... cut to save space ............

与Ethanalyzer的BPDU调查

此部分描述如何使用Ethanalyzer为了捕获BPDU :

Ethanalyzer local interface inbound-hi display-filter "vlan.id == 1 && stp"

Example:
Nexus-5000# ethanalyzer local interface inbound-hi display-filter "vlan.id
== 1 && stp"

Capturing on eth4
2013-05-11 13:55:39.280951 00:05:73:f5:d6:27 -> 01:00:0c:cc:cc:cd STP RST.
Root = 33768/00:05:73:ce:a9:7c  Cost = 1  Port = 0x900a
2013-05-11 13:55:40.372434 00:05:73:ce:a9:46 -> 01:00:0c:cc:cc:cd STP RST.
Root = 33768/00:05:73:ce:a9:7c  Cost = 0  Port = 0x900a
2013-05-11 13:55:41.359803 00:05:73:f5:d6:27 -> 01:00:0c:cc:cc:cd STP RST.
Root = 33768/00:05:73:ce:a9:7c  Cost = 1  Port = 0x900a
2013-05-11 13:55:42.372405 00:05:73:ce:a9:46 -> 01:00:0c:cc:cc:cd STP RST.
Root = 33768/00:05:73:ce:a9:7c  Cost = 0  Port = 0x900a

为了看到详细的数据包,请使用detail命令

Nexus-5000# ethanalyzer local interface inbound-hi detail display-filter
"vlan.id == 1 && stp
"
Capturing on eth4
Frame 7 (68 bytes on wire, 68 bytes captured)
    Arrival Time: May 11, 2013 13:57:02.382227000
    [Time delta from previous captured frame: 0.000084000 seconds]
    [Time delta from previous displayed frame: 1368280622.382227000 seconds]
    [Time since reference or first frame: 1368280622.382227000 seconds]
    Frame Number: 7
    Frame Length: 68 bytes
    Capture Length: 68 bytes
    [Frame is marked: False]
    [Protocols in frame: eth:vlan:llc:stp]
Ethernet II, Src: 00:05:73:ce:a9:46 (00:05:73:ce:a9:46), Dst: 01:00:0c:cc:cc:cd
(01:00:0c:cc:cc:cd)
    Destination: 01:00:0c:cc:cc:cd (01:00:0c:cc:cc:cd)
        Address: 01:00:0c:cc:cc:cd (01:00:0c:cc:cc:cd)
        .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address
(factory default)
    Source: 00:05:73:ce:a9:46 (00:05:73:ce:a9:46)
        Address: 00:05:73:ce:a9:46 (00:05:73:ce:a9:46)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address
(factory default)
    Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN
    111. .... .... .... = Priority: 7
    ...0 .... .... .... = CFI: 0
    .... 0000 0000 0001 = ID: 1
    Length: 50
Logical-Link Control
    DSAP: SNAP (0xaa)
    IG Bit: Individual
    SSAP: SNAP (0xaa)
    CR Bit: Command
    Control field: U, func=UI (0x03)
        000. 00.. = Command: Unnumbered Information (0x00)
        .... ..11 = Frame type: Unnumbered frame (0x03)
    Organization Code: Cisco (0x00000c)
    PID: PVSTP+ (0x010b)
Spanning Tree Protocol
    Protocol Identifier: Spanning Tree Protocol (0x0000)
    Protocol Version Identifier: Rapid Spanning Tree (2)
    BPDU Type: Rapid/Multiple Spanning Tree (0x02)
    BPDU flags: 0x3c (Forwarding, Learning, Port Role: Designated)
        0... .... = Topology Change Acknowledgment: No
        .0.. .... = Agreement: No
        ..1. .... = Forwarding: Yes
        ...1 .... = Learning: Yes
        .... 11.. = Port Role: Designated (3)
        .... ..0. = Proposal: No
        .... ...0 = Topology Change: No
    Root Identifier: 33768 / 00:05:73:ce:a9:7c
    Root Path Cost: 0
    Bridge Identifier: 33768 / 00:05:73:ce:a9:7c
    Port identifier: 0x900a
    Message Age: 0
    Max Age: 20
    Hello Time: 2
    Forward Delay: 15
    Version 1 Length: 0

为了写此信息到PCAP文件,请使用此命令:

Nexus-5000# ethanalyzer local interface inbound-hi display-filter 
"vlan.id == 1 && stp" write bootflash:bpdu.pcap

Capturing on eth4
3 << Lists how many packets were captured.

在BPDU捕获,源MAC地址是远端装置的接口MAC地址。

在Ethanalyzer捕获,端口在十六进制格式出现。为了确定端口号,您需要首先转换编号到十六进制:

0x900a (从上一个trace) = 36874

这是解码该编号对端口的命令:

Nexus-5000# show spanning-tree internal info all  |
grep -b 50 "port_id                36874" | grep "Port Info"

------- STP Port Info (vdc 1, tree 1, port Po11) ----------
------- STP Port Info (vdc 1, tree 300, port Po11) ---------
------- STP Port Info (vdc 1, tree 800, port Po11) ---------
------- STP Port Info (vdc 1, tree 801, port Po11) ---------
------- STP Port Info (vdc 1, tree 802, port Po11) ---------
------- STP Port Info (vdc 1, tree 803, port Po11) ---------
------- STP Port Info (vdc 1, tree 999, port Po11) ---------

在这种情况下,它是Port-Channel 11。

STP 收敛

如果需要调查STP收敛,请使用show spanning-tree内部交互作用命令。此命令提供见解到什么事件触发了STP更改。收集此信息是重要的,当问题出现,因为日志大,并且他们随着时间的推移包裹。

Nexus-5000#show spanning-tree internal interactions
- Event:(null), length:123, at 81332 usecs after Sat May 11 12:01:47 2013
Success: pixm_send_set_mult_cbl_vlans_for_multiple_ports, num ports 1
VDC 1, state FWD, rr_token 0x21b9c3 msg_size 584
- Event:(null), length:140, at 81209 usecs after Sat May 11 12:01:47 2013
vb_vlan_shim_set_vlans_multi_port_state(2733): Req (type=12) to PIXM
vdc 1, inst 0, num ports 1, state FWD
[Po17 v 800-803,999-1000]
- Event:(null), length:123, at 779644 usecs after Sat May 11 12:01:46 2013
Success: pixm_send_set_mult_cbl_vlans_for_multiple_ports, num ports 1
VDC 1, state FWD, rr_token 0x21b99a msg_size 544<
- Event:(null), length:127, at 779511 usecs after Sat May 11 12:01:46 2013
vb_vlan_shim_set_vlans_multi_port_state(2733): Req (type=12) to PIXM
vdc 1, inst 0, num ports 1, state FWD
[Po17 v 300]
- Event:(null), length:123, at 159142 usecs after Sat May 11 12:01:32 2013
Success: pixm_send_set_mult_cbl_vlans_for_multiple_ports, num ports 1
VDC 1, state LRN, rr_token 0x21b832 msg_size 584
- Event:(null), length:140, at 159023 usecs after Sat May 11 12:01:32 2013
vb_vlan_shim_set_vlans_multi_port_state(2733): Req (type=12) to PIXM
vdc 1, inst 0, num ports 1, state LRN
[Po17 v 800-803,999-1000]
- Event:(null), length:123, at 858895 usecs after Sat May 11 12:01:31 2013
Success: pixm_send_set_mult_cbl_vlans_for_multiple_ports, num ports 1
VDC 1, state LRN, rr_token 0x21b80b msg_size 544
- Event:(null), length:127, at 858772 usecs after Sat May 11 12:01:31 2013
vb_vlan_shim_set_vlans_multi_port_state(2733): Req (type=12) to PIXM
vdc 1, inst 0, num ports 1, state LRN
[Po17 v 300]
.................... cut to save space ............

外部VLAN映射

连结5000系列交换机使用内部VLAN为了映射到转发的外部VLAN号。有时VLAN ID是内部VLAN ID为了有映射外部VLAN,输入:

Nexus-5000# show platform afm info global
Gatos Hardware version 0
Hardware instance mapping
-------------------------
Hardware instance: 0 asic id: 0 slot num: 0
-------------- cut to save space --------------------------
Hardware instance: 12 asic id: 1 slot num: 3
AFM Internal Status
-------------------
[unknown label ]: 324
[no free statistics counter ]: 2
[number of verify ]: 70
[number of commit ]: 70
[number of request ]: 785
[tcam stats full ]: 2

Vlan mapping table
------------------
Ext-vlan: 1 - Int-vlan: 65

STP调试

另一个方式排除故障STP问题将使用调试。然而,使用STP调试也许造成CPU使用情况阻止的一些环境导致注意事项。为了激烈地减少CPU使用情况,当运行调试时,请使用一个调试过滤器,并且记录活动到日志文件。

  1. 创建日志文件,保存在目录日志下。
    Nexus-5000#debug logfile spanning-tree.txt
    Nexus-5548P-L3# dir log:
    31 Nov 06 12:46:35 2012 dmesg
    ----- cut to save space----
    7626 Nov 08 22:41:58 2012 messages
    0 Nov 08 23:05:40 2012 spanning-tree.txt
    4194304 Nov 08 22:39:05 2012 startupdebug
  2. 运行调试。
    Nexus-5000# debug spanning-tree bpdu_rx interface e1/30 
    <<< setup your spanning-tree for bpdus

    Nexus-5000# copy log:spanning-tree.txt bootflash:

    示例从日志文件:
    2012 Nov 8 23:08:24.238953 stp: BPDU RX: vb 1 vlan 300, ifi 0x1a01d000
    (Ethernet1/30)
    2012 Nov 8 23:08:24.239095 stp: BPDU Rx: Received BPDU on vb 1 vlan 300
    port Ethernet1/30 pkt_len 60 bpdu_len 36 netstack flags 0x00ed enc_type ieee
    2012 Nov 8 23:08:35.968453 stp: RSTP(300): Ethernet1/30 superior msg
    2012 Nov 8 23:08:35.968466 stp: RSTP(300): Ethernet1/30 rcvd info remaining 6
    2012 Nov 8 23:08:36.928415 stp: BPDU RX: vb 1 vlan 300, ifi 0x1a01d000
    (Ethernet1/30)
    2012 Nov 8 23:08:36.928437 stp: BPDU Rx: Received BPDU on vb 1 vlan 300
    port Ethernet1/30 pkt_len 60 bpdu_len 36 netstack flags 0x00ed enc_type ieee
    2012 Nov 8 23:08:36.928476 stp: RSTP(300): msg on Ethernet1/30
    .................... cut to save space ............

连结5000没有处理BPDU

为了排除故障此问题,请检查事件历史记录确定连结5000系列交换机是否假设根。连结5000假设根,如果或者没有处理BPDU或没有接收他们。为了调查是的原因,您应该确定是否有其他交换机附加对有此问题的指定的网桥。如果其他网桥没有问题,是很可能连结5000没有处理BPDU。如果其他网桥有问题,是很可能网桥没有发送BPDU。

注意:要记住的事,当排除故障STP和虚拟端口信道时(vPC)。仅vPC主要的发送BPDU。当vPC第二是STP根时,主要的仍然发送BPDU。如果根通过vPC连接,只有主要的增量Rx BPDU计数器,既使当第二接收他们。


相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


Document ID: 116199