Cisco N5548 NX-OS 内网不稳定完整排查命令集

设备版本:NX-OS 5.2(1)N1(9b),分硬件状态、端口链路、流量丢包、STP环路、VLAN/转发、日志故障、MAC/ARP、FEX(如有)、性能负载九大排查维度,按排查顺序整理。

一、基础硬件整机健康检查(先排除硬件故障)

# 整机硬件、电源、风扇、模块状态
show environment all
show module
show power
show fan
show hardware internal status

# 主板/芯片报错、传感器温度
show environment temperature
show hardware internal error
show sprom all

# 设备CPU/内存基础负载(瞬时负载高会断流卡顿)
show system resources
show processes cpu sort
show processes memory sort

重点看:Power/Fan 状态 ok、模块无 fault、温度无 critical、CPU 持续不超过70%。

二、端口/光模块链路层排查(内网不稳定80%是端口丢包、光衰、CRC错包)

# 所有端口简要状态、收发包、错包、丢包统计
show interface brief
show interface status

# 单端口详细计数器(CRC、对齐错、输入输出丢包、碰撞、Pause帧)
show interface Ethernet 1/1
show interface Ethernet 1/1 counters detailed
show interface Ethernet 1/1 errors

# 光模块SFP信息、光功率收发光衰(光纤链路必查)
show interface transceiver brief
show interface transceiver Ethernet 1/1 details

# 端口缓冲区溢出丢包(突发流量卡顿根源)
show hardware internal buffer stats interface Ethernet 1/1
show interface queueing Ethernet 1/1

# 端口flapping频繁上下线(内网时断时续核心诱因)
show logging interface Ethernet 1/1
show port-flap history

故障判定点:

  1. CRC、Align-Err、Runts、Giants 持续增长 → 网线/光模块/光纤损坏;
  2. Input-Drops/Output-Drops 上涨 → 端口拥塞、缓冲区不足;
  3. 光收功率 Rx Power 低于阈值 → 光纤衰减过大;
  4. 端口频繁 up/down 打印日志 → 链路接触不良、双工不匹配。

三、二层环路 & STP 排查(内网广播风暴、全网卡顿、ping抖动)

N5548默认STP,环路会造成CPU飙升、内网大面积丢包:

# STP全局摘要,看是否有端口discarding/flap
show spanning-tree summary
show spanning-tree brief

# 单个VLAN STP详情,查看根桥、端口角色
show spanning-tree vlan 10

# STP拓扑变更记录(频繁TC=环路/端口频繁插拔)
show spanning-tree topology change
show spanning-tree interface Ethernet 1/1 status

# 查看广播风暴、泛洪流量
show mac-address-table count
show interface counters broadcast

异常判定:Topology change count 短时间疯狂增长 = 二层环路风险极高。

四、MAC地址表、ARP表转发故障(单终端访问不稳定、单网段不通)

# MAC表总数、老化、漂移记录
show mac-address-table
show mac-address-table count
show mac-address-table notification

# 查看MAC漂移(同一MAC频繁在多个端口切换=环路/终端异常)
show mac-address-table drift log

# ARP表,三层网关场景必查(ARP丢失导致跨VLAN不通)
show ip arp
show ip arp summary

异常:同一MAC同时出现在多个接口、ARP条目频繁超时删除。

五、VLAN、Trunk、二层转发排查

# VLAN状态,是否存在suspend异常VLAN
show vlan brief
show vlan id 10

# Trunk允许VLAN、native vlan不匹配故障
show interface trunk
show interface Ethernet 1/1 trunk

# 二层转发硬件表项
show mac-address-table hardware

常见坑:Trunk两端Native VLAN不一致,会产生大量错包、终端间歇性断网。

六、全局日志 & 故障事件回溯(定位何时开始不稳定)

# 系统全量日志(核心排查命令,优先执行)
show logging log
show logging last 500

# 告警、关键错误日志过滤
show logging | grep -i error
show logging | grep -i critical
show logging | grep -i flapping
show logging | grep -i crc
show logging | grep -i stp

# 系统事件、硬件故障记录
show system event log
show logging onboard

关键字过滤:flapCRCerrortemperaturepowerTCdiscard

七、流量拥塞、QoS、缓冲区排查(大文件传输卡顿、视频流抖动)

# 全局端口缓冲资源
show hardware internal buffer info

# 端口队列丢包、QoS调度统计
show queuing interface Ethernet 1/1
show policy-map interface Ethernet 1/1

# 端口带宽利用率
show interface Ethernet 1/1 stats rate

Output-Drops 持续上涨:队列溢出,需要调整buffer或限流上游。

八、FEX扩展模块排查(机房下联服务器FEX场景)

如果设备外接N2K FEX扩展机柜:

show fex
show fex 100 detail
show interface fex-fabric 100/1/1
show fex error

FEX离线、fabric端口错包会导致下联服务器批量断流。

九、快速连通性测试(复现不稳定现象)

# 长ping持续测试,带时间戳记录丢包
ping 192.168.1.100 repeat 10000 interval 0.1

# 带数据包大小ping,测试MTU(大包丢包排查)
ping 192.168.1.100 packet-size 1500 df-bit

# traceroute三层跨VLAN路径
traceroute 192.168.2.50

标准排查流程(现场操作顺序)

  1. show logging last 1000 先看报错,定位故障时间段;
  2. show environment all / show module 确认硬件无告警;
  3. show interface brief | include -err|drop|down 筛选异常端口;
  4. 异常端口执行 show interface X/X counters detailed 分析错包/丢包;
  5. show spanning-tree summary 检查环路与TC变更;
  6. show system resources 确认CPU、内存无持续满载;
  7. MAC漂移/ARP表排查单终端不通问题;
  8. 长ping复现丢包,结合光模块、Trunk配置定位根因。

该版本NX-OS 5.2(1)N1(9b)额外注意事项

  1. 版本老旧(2017年固件),存在已知STP、端口buffer内存泄漏BUG,若长期CPU高、随机断流,建议规划升级稳定NX-OS版本;
  2. 老版本对万兆SFP+光模块兼容性一般,光衰、CRC报错优先替换光模块测试;
  3. 低版本FEX存在fabric端口随机flap缺陷,下联服务器批量掉线优先检查FEX链路。

Revision #1
Created 2026-09-01 02:12:13 UTC by Admin
Updated 2026-09-01 02:12:27 UTC by Admin