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

当使用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

相关推荐
YuMiao1 天前
gstatic连接问题导致Google Gemini / Studio页面乱码或图标缺失问题
服务器·网络协议
碳基沙盒2 天前
OpenClaw 多 Agent 配置实战指南
运维
Sinclair4 天前
简单几步,安卓手机秒变服务器,安装 CMS 程序
android·服务器
Rockbean5 天前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
蝎子莱莱爱打怪5 天前
Centos7中一键安装K8s集群以及Rancher安装记录
运维·后端·kubernetes
茶杯梦轩5 天前
CompletableFuture 在 项目实战 中 创建异步任务 的核心优势及使用场景
服务器·后端·面试
海天鹰6 天前
【免费】PHP主机=域名+解析+主机
服务器
DianSan_ERP6 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅6 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
不是二师兄的八戒6 天前
Linux服务器挂载OSS存储的完整实践指南
linux·运维·服务器