network is unreachable 网关PING不通解决办法
2016-11-24 13:42
483 查看
所里有几台机器没有办法ping通网关,但是ping交换机里的其它机器都可以ping通,其它机器ping网关也可以ping通。那么就排出了硬件的故障,主要问题就在问题机器的路由表上了。
看一下路由表
发现里面并没有我想要的网关,所以就要添加一个
default一般是0.0.0.0表示任意地址
但是却发现下面的错误
route -n一下就能看到结果,最下面一列就是我们想要的。然后机器就可以完美PING通网关了
Destination Gateway Genmask Flags Metric Ref Use Iface
12.12.12.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.10.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
看一下路由表
route -n
Destination Gateway Genmask Flags Metric Ref Use Iface 12.12.12.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 10.10.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
发现里面并没有我想要的网关,所以就要添加一个
route add default gw 10.10.88.203 eth0
default一般是0.0.0.0表示任意地址
但是却发现下面的错误
SIOCADDRT: No such process这是因为我要添加的10.10.88.203跟我主机10.10.108.23不在同一个网段,需要添加一下
route add 10.10.88.203 dev eth0然后再执行一下上面的命令就可以了
route -n一下就能看到结果,最下面一列就是我们想要的。然后机器就可以完美PING通网关了
Destination Gateway Genmask Flags Metric Ref Use Iface
12.12.12.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.10.108.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 10.10.88.203 0.0.0.0 UG 0 0 0 eth0
相关文章推荐
- ubuntu network is unreachable解决办法
- rhel6.5 网卡ping不通 报错connect: network is unreachable
- CentOS 7 无法启动network以及主机ping不通虚拟机 虚拟机可以ping通主机的解决办法
- 【问题】安装linux5网络ping不通——network isunreachable
- connect network is unreachable 解决办法
- 解决:connect Network is unreachable 和 ping unknown host www.baidu.com
- ”ssh: connect to host gmail.com port 22: Network is unreachable"的解决办法
- windows平台下安装linux虚拟机,宿主机与虚拟机ping不通,提示connect network is unreachable
- windows平台下安装linux虚拟机,宿主机与虚拟机ping不通,提示connect network is unreachable
- VM下安装Centos6.4发ping外网时出现"network is unreachable"解决
- VMWare虚拟机Bridged类型网卡ping不通的原因和解决办法
- ping: sendto: Network is unreachable
- 当能电脑能够ping通同一个网段的ip,却ping不通网关的解决方法
- godaddy域名出现ping不通的解决办法
- ping ip可通,ping hostname不通(不同网段的ip)解决办法(windows)
- Vmware的中Linux与PC的ping不通的原因及解决办法
- 解决ubuntu下ftp登录错误:do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable
- Debian ping同一网段成功,其他网段:network is unreachable
- UBOOT PING不通虚拟机linux的解决办法
- linux环境下,双击直连ping私有地址时候出现Destination host unreachable 解决办法