通信网络
网络工程师在日常配置中难免出现各种配置错误,比如接口地址配错、掩码位数配错、接口忘记no shutdown。除去这些基础错误,在配置各种路由选择协议时也会因为网络类型、邻居类型、区域和路由器层级等各种问题使邻居无法建立、路由无法传递进而导致网络不通。我整理了一下日常常用的各协议基础排错命令。
大家可以根据“?”来添加更详细的参数。
| ICMP相关命令 | ||
| 命令作用 | 思科 | 华为 |
| 测试连通性(源地址为出接口) | ping IP地址 | ping IP地址 |
| 带源地址测试连通性 | ping 目的地址 source 源地址 | ping -a 源地址 目的地址 |
| 连续测试连通性 | ping 目的地址 repeat ping包数量 | ping -c ping包数量 目的地址 |
| 跟踪路由路径 | traceroute 目的地址 numeric(建议关闭解析,否则很慢) | tracert 目的地址 |
| 基础查看命令 | ||
| 查看接口状态与IP信息 | show ip interface brief | display ip interface brief |
| 查看路由表 | show ip route | display ip routing-table |
| 查看单协议路由表 | show ip route 协议 | display ip routing-table protocol 协议 |
| 查看MAC地址表 | show mac address-table | display mac-address |
| 查看ARP映射 | show ip arp | display arp |
| 查看已经生效配置 | show running-config | display current-configuration |
| 查看包含该语句的所有配置命令 | show running-config | section 关键字 | display current-configuration | include 关键字 |
| 查看该视图下所有配置命令 | display this | |
| VLAN相关命令 | ||
| 查看接口VLAN信息 | show vlan | display port vlan |
| IPv6相关命令 | ||
| 查看接口IPv6信息 | show ipv6 interface brief | display ipv6 interface 接口 |
| 查看IPv6路由表 | display ipv6 routing-table | |
| EIGRP相关命令 | ||
| 查看EIGRP邻居表 | show ip eigrp neighbors | |
| 查看EIGRP接口信息 | show ip eigrp interface | |
| 查看EIGRP拓扑表 | show ip eigrp topology | |
| OSPF相关命令 | ||
| 查看OSPF接口信息 | show ip ospf interface | display ospf interface |
| 查看OSPF邻居 | shou ip ospf neighbor | display ospf peer brief |
| 查看OSPF数据库 | show ip ospf database | display ospf lsdb |
| ISIS相关命令 | ||
| 查看ISIS邻居 | show isis neighbors | display isis peer |
| 查看LSDB详细信息 | show isis topology | display isis lsdb verbose |
| BGP相关命令 | ||
| 查看BGP邻居表 | show ip bgp neighbors | display bgp peer |
| 查看BGP表 | show bgp ipv4 unicast | diisplay bgp routing-table |
| 查看VPNv4邻接关系 | show bgp vpnv4 unicast all summary | display bgp vpnv4 vpn-instance VPN实例名 peer |
| 查看VPNv4路由 | show bgp vpnv4 unicast all | display bgp vpnv4 all routing-table |
| MPLS相关命令 | ||
| 查看LDP邻居表 | show mpls ldp neighbor | display mpls ldp peer |
| 查看LFIB(可查看MPLS VPN外层标签) | show mpls forwarding-table | display mpls ldp lsp |
| 查看LIB(标签信息库) | show mpls ldp bindings | dis mpls lsp |
| 查看该VRF子路由表 | show ip route vrf VRF名 | dis ip routing-table vpn-instance VPN实例名 |
| 查看VPNv4路由标签 | show bgp vpnv4 unicast all labels | dis bgp vpnv4 all routing-table label |
| IPSec相关命令 | ||
| 查看isakmp双向SA(第一阶段) | show crypto isakmp sa | display ike sa |
| 1. 查看IPSec单向SA(第二阶段) | show crypto ipsec sa | display ipsec sa |
这些命令希望可以帮助大家在日常工作中减少排错消耗的时间。如果你有遇到印象深刻的错误,可以写下错误原因和排错命令查看到的现象,分享在评论区哦。
编辑:黄飞
全部0条评论
快来发表一下你的评论吧 !