ping: Network is unreachable
问题
[root@web-1 yum.repos.d]# ping baidu.com
ping: unknown host baidu.com
[root@web-1 yum.repos.d]# ping 119.29.29.29
connect: Network is unreachable
看一下路由,发现没有网关
[root@web-1 yum.repos.d]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
添加网关
[root@web-1 yum.repos.d]# route add default gw 172.16.0.1
好了
[root@web-1 yum.repos.d]# ping baidu.com
PING baidu.com (123.125.114.144) 56(84) bytes of data.
64 bytes from 123.125.114.144: icmp_seq=1 ttl=51 time=27.0 ms
[root@web-1 yum.repos.d]# ping 119.29.29.29
PING 119.29.29.29 (119.29.29.29) 56(84) bytes of data.
64 bytes from 119.29.29.29: icmp_seq=1 ttl=39 time=5.67 ms
然后发现,真正的原因在这里
DEVICE="eth0"
BOOTPROTO=static
HWADDR="00:0C:29:BB:0C:52"
IPADDR=172.16.0.114
NETMASK=255.255.254.0
GATEAY=172.16.0.1 #少写了一个字母W
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="f749f4ce-2496-4b43-8596-22144ee4a996"
参考链接:
http://blog.csdn.net/qingtingchen1987/article/details/7045068
http://happy-xp.blog.163.com/blog/static/23241702010622114140935/
ping: Network is unreachable的更多相关文章
- ping: sendto: Network is unreachable
在我的板子上ping路由上的IP的时候可以ping通,但是ping外网的IP的时候提示"ping: sendto: Network is unreachable" 后来使用rout ...
- linux下ping命令出现ping: sendto: Network is unreachable
问题:ping外网出现: sendto: Network is unreachable 查看: #route Route命令 : 在数据包没有有效传递的情况下,可以利用route命令查看路由表 [ro ...
- NAT 模式下虚拟机安装的centos7 ping主机显示connect: Network is unreachable
在虚拟机下安装的centos7使用的网络是NAT模式,安装成功后ping主机地址显示 Network is unreachable 解决方案: 1)使用ifconfig命令查看网卡信息 2)进入/et ...
- linux 出现ping,错误提示:connect :network is unreachable
今天克隆Centos7后 修改IP地址 修改前: IP:172.16.0.198 默认网关:172.16.0.254 修改后: IP:172.16.1.100 默认网关:172.16.0.25 ...
- ping: sendto: Network is unreachable【转】
本文转载自:http://blog.sina.com.cn/s/blog_640531380102wmzb.html 在我的板子上ping路由上的IP的时候可以ping通,但是ping外网的IP的时候 ...
- linux上如何设置网络,出现connect: network is unreachable 的问题。
发现有网友问有关ping命令出现connect: network is unreachable 的问题. 这通常是因为没正确设置ip地址. 解决方法: 在确保完善网卡驱动,以及确保将网卡驱动编译进内核 ...
- centos下问题:connect:network is unreachable
问题描述 弄了三台机器准备搭建一个集群,按照centos7系统,一台主节点安装桌面环境,两台计算节点.配置计算节点的时候,发现ping不通,出现connect:network is unreachab ...
- ssh: connect to host gitlab.alpha.com port 22: Network is unreachable
在这里只说明我遇到的问题和解决方法,可能并不能解决你遇到的问题: git clone git@gitlab.alpha.com:ipcam/ambarella.gitCloning into 'amb ...
- ubuntu下xx-net可用IP为0, ping6显示 Network is unreachable
不知和xx-net有没有关系. 全新安装系统 sudo apt-get install miredo 这时, ping6 ipv6.google.com 是能ping通的 按github上依次安装py ...
随机推荐
- 【LeetCode】239. Sliding Window Maximum 解题报告(Python&C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 单调递减队列 MultiSet 日期 题目地址:ht ...
- 【LeetCode】739. Daily Temperatures 解题报告(Python & C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 解题方法 倒序遍历 栈 日期 题目地址:https://leetcode ...
- 【剑指Offer】最小的K个数 解题报告(Python)
[剑指Offer]最小的K个数 解题报告(Python) 标签(空格分隔): 剑指Offer 题目地址:https://www.nowcoder.com/ta/coding-interviews 题目 ...
- The Longest Straight(FZUoj2216)
Problem 2216 The Longest Straight Accept: 82 Submit: 203Time Limit: 1000 mSec Memory Limit : ...
- datatables scrollX设置水平滚动无效问题
如下:设置了水平滚动之后, 页面并没有滚动效果$(document).ready(function() { $('#example').dataTable( { "scrollX" ...
- Python基础入门(8)- Python模块和包
1.包与模块的定义与导入 1.1.什么是python的包与模块 包就是文件夹,包中还可以有包,也就是子文件夹 一个个python文件模块 1.2.包的身份证 __init__.py是每一个python ...
- ELBO surgery: yet another way to carve up the variational evidence lower bound
目录 概 主要内容 Evidence minus posterior KL Average negative energy plus entropy Average term-by-term reco ...
- Contrastive Generative Adversarial Networks
目录 概 主要内容 代码 Kang M., Park J. Contrastive Generative Adversarial Networks. arXiv preprint arXiv 2006 ...
- Null和空值对于avg计算时产生的影响以及处理
为什么要关注这一块呢:1.面试中可能会有涉及 2.工作中真的也可能会用,既然有可能我也用过,就拿出来跟大家分享一下,上一篇的博文,数据已准备好就不做数据准备的介绍了. step1:select * f ...
- CS5265替代CH7211|Capstone CS5265芯片|替代CH7211芯片
龙迅Chrontel的CH7211是一款Type-C转HDMI2.0半导体设备,可通过USB Type-C连接器将DisplayPort信号转换为HDMI/DVI.这款创新的基于USB Type-C的 ...