网络路由问题检查命令汇总

当使用ping命令时,发现该IP地址不可达。请检查如下:

首先,机器上的路由表
route -n

结果样例

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

0.0.0.0 192.168.33.254 0.0.0.0 UG 0 0 0 enp5s0

172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0

192.168.33.0 0.0.0.0 255.255.255.0 U 0 0 0 enp5s0

其次,检查机器上的每张网卡的路由信息
ip route show

结果样例

default via 192.168.33.254 dev enp5s0 onlink

172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown

192.168.33.0/24 dev enp5s0 proto kernel scope link src 192.168.33.159

最后,在检查一下ARP信息
arp -n

结果样例

Address HWtype HWaddress Flags Mask Iface

192.168.33.79 ether e4:3d:1a:f9:5b:70 C enp5s0

192.168.33.77 ether 3c:ec:ef:b4:93:92 C enp5s0

172.17.0.2 ether 02:42:ac:11:00:02 C docker0

192.168.33.71 ether 3c:ec:ef:2d:92:67 C enp5s0

192.168.33.74 ether ec:2a:72:0c:5f:ea C enp5s0

192.168.33.171 ether 00:0c:29:2a:2f:77 C enp5s0

192.168.33.254 ether 6c:e2:d3:01:75:47 C enp5s0

192.168.33.70 ether 3c:ec:ef:2d:0a:ec C enp5s0

192.168.33.75 ether 3c:ec:ef:2d:95:60 C enp5s0

相关推荐
阿里云大数据AI技术1 小时前
阿里云 EMR AI 助手正式发布:从问答工具到全栈智能运维助手
运维·人工智能
你好潘先生7 小时前
别再记命令了,用 yeero do 说句人话就能跑脚本,而且不烧 token
服务器·python·命令行
SkyWalking中文站1 天前
认识 Horizon UI · 6/17:Trace 探索器
运维·监控·自动化运维
程序员老赵1 天前
服务器文件不想 SFTP 上传?Docker 跑个 File Browser,浏览器就能管理
服务器·docker·开源
火车叼位1 天前
写给初级开发者:SSL、SSH、HTTPS 与证书体系全解析
运维
vivo互联网技术1 天前
从 10 分钟到 1 秒:ES 深度分页任意跳页的三轮优化实战
服务器·数据库·redis·elasticsearch·深度分页
小猿姐2 天前
唯品会大规模数据库云原生实践:基于 KubeBlocks 管理数千实例的统一运维之路
运维·elasticsearch·云原生
SkyWalking中文站2 天前
认识 Horizon UI · 5/17:3D 基础设施地图
运维·监控·自动化运维
SkyWalking中文站3 天前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控