在网络工程师的日常工作中, 网络故障的排查与解决是不可或缺的一环。为了高效地定位并恢复网络服务,工程师们需要精通一系列用于诊断和解决问题的命令。
在交换机配置与故障排查过程中,不论你是初入网络世界的小白,还是年资数年的资深工程师,总会遇到那些“关键时刻靠得住的命令”。 这篇文章我将整理一份思科双实战命令手册,从详细请看下文。

1. 基础系统诊断
命令名称 | 解释 |
|---|---|
show version | 显示ios版本、硬件;查bug起点。 |
show module | 显示槽位/模块状态;定位硬件故障。 |
show processes cpu | 监控cpu率/进程;高负载查进程。 |
show memory | 监控内存可用;泄漏预警。 |
show environment | 查看温度/风扇;高温警报。 |
show power | 检查电源冗余;掉电诊断。 |
2. 接口与链路诊断
命令名称 | 解释 |
|---|---|
show interfaces | 接口状态/错误/包统计;丢包核心查。 |
show interfaces status | 接口简览(up/down/速率);批量扫。 |
show etherchannel summary | 聚合成员/lacp状态;负载均衡验。 |
show lacp neighbor | lacp邻居/pdu;协商失败捕。 |
show port-security | 端口mac绑定/违规;非法接入防。 |
show interfaces transceiver | 光模块功率/温度;信号弱诊。 |
show interfaces counters errors | 接口错误计数;清零后观增量。 |
show interfaces counters | 接口包计数;性能基线。 |
3. l2切换排障
命令名称 | 解释 |
|---|---|
show vlan brief | vlan成员/端口;隔离路径验。 |
show mac address-table | mac表/老化/端口;风暴表满清。 |
show spanning-tree | stp根桥/角色;环路阻挡查。 |
show spanning-tree detail | stp变化记录;抖动原因析。 |
show cdp neighbors | cdp邻居/id/端口;拓扑连通验。 |
show spanning-tree interface | stp接口成本/优先;收敛调优。 |
show vlan private-vlan | pvlan映射;隔离端口误配查。 |
4. l3路由与转发
命令名称 | 解释 |
|---|---|
show ip interface brief | ip接口状态/地址;路由可用验。 |
show ip route | 路由表/下一跳;黑洞缺失定位。 |
show ip cef | cef转发条目;rib不一致诊。 |
show access-lists | acl规则/匹配;阻挡顺序调。 |
show arp | arp ip-mac表;伪造攻击防。 |
show ip traffic | ip包转发/丢;mtu碎片查。 |
show route-map | 路由策略匹配;bgp/ospf过滤验。 |
5. 高级调试与日志
命令名称 | 解释 |
|---|---|
show logging | 日志事件/过滤;故障溯源首。 |
show tech-support | 诊断快照打包;tac上报用。 |
debug (e.g., spanning-tree) | 模块实时调试;限时undebug all。 |
show logging | include | 日志关键字滤;告警类型析。 |
show archive config differences | 配置变更对比;误配历史查(新增)。 |
6. 性能与qos
命令名称 | 解释(超简) |
|---|---|
show policy-map interface | qos队列/丢包;voip优先诊。 |
show platform hardware qfp active statistics drop | 硬件丢包统计;性能瓶颈查(新增)。 |
show mls qos interface | qos接口映射;带宽利用验。 |
show queueing interface | 队列深度/阈值;拥塞优化。 |
show netflow | 流量netflow统计;异常流捕(新增)。 |
7. 安全与dhcp
命令名称 | 解释 |
|---|---|
show ip dhcp snooping | dhcp绑定/端口;地址冲突隔离。 |
show ip dhcp binding | dhcp表详情;伪服务器防。 |
show ip verify source | ip源守卫;arp欺骗查。 |
show aaa servers | aaa认证服务器;登录失败诊(新增)。 |
show ip admission | 动态acl授权;访问控制验(新增)。 |
show storm-control | 风暴控制阈值;广播抑制调。 |
8. 监控、多播与堆叠
命令名称 | 解释 |
|---|---|
show ip igmp groups | igmp组/端口;多播加入验。 |
show ip pim neighbor | pim邻居;多播路由状态查。 |
show switch | 堆叠成员/角色;链路故障定位。 |
show stack-ports | 堆叠端口状态;冗余切换诊。 |
show system uptime | 系统运行时间/重启因;稳定性基线。 |
show snmp | snmp配置/社区;监控告警验。 |
发表评论