ping百度(外网)出现:unknown host www.baidu.com问题解决
来源:互联网 发布:itunes软件怎么下载 编辑:程序博客网 时间:2024/06/05 05:51
ping 百度出现:(ping www.baidu.com)
"ping: unknown host www.baidu.com"
ping 网关确定是否连接上路由器,并且路由器是否连接上网:
[root@vmhost ~]# ping 192.168.8.1
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
64 bytes from 192.168.8.1: icmp_seq=1 ttl=254 time=513 ms
64 bytes from 192.168.8.1: icmp_seq=2 ttl=254 time=1112 ms
64 bytes from 192.168.8.1: icmp_seq=3 ttl=254 time=594 ms
64 bytes from 192.168.8.1: icmp_seq=4 ttl=254 time=85.4 ms
检查DNS服务是否已经设置
[root@localhost ~]# cat /etc/resolv.conf
[root@localhost ~]# vi /etc/resolv.conf
里面文件为空,则新添加一条DNS到该文件中:
search localdomain
nameserver 119.29.29.29
确认网关已设置(RHEL系统)
[root@vmhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
network=192.168.8.1
判断route是否有此路由并添加
[root@vmhost network-scripts]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.8.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
[root@vmhost network-scripts]# route add default gw 192.168.8.1
[root@vmhost network-scripts]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.8.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.8.1 0.0.0.0 UG 0 0 0 eth0
重启network服务
[root@vmhost network-scripts]# service network restart
测试结果(成功):
[root@vmhost network-scripts]# ping www.baidu.com
PING www.a.shifen.com (14.215.177.37) 56(84) bytes of data.
64 bytes from 14.215.177.37: icmp_seq=1 ttl=54 time=30.9 ms
64 bytes from 14.215.177.37: icmp_seq=2 ttl=54 time=49.7 ms
阅读全文
1 0
- ping百度(外网)出现:unknown host www.baidu.com问题解决
- "ping: unknown host www.baidu.com" 解决方法
- ping: unknown host www.baidu.com
- ping: unknown host www.baidu.com解决
- CentOS7 ping: unknown host www.baidu.com
- ping: unknown host www.baidu.com
- CentOS7 ping: unknown host www.baidu.com
- 解决linux ping: unknown host www.baidu.com
- 解决linux ping: unknown host www.baidu.com
- 解决ubuntu server ping: unknown host www.baidu.com
- linux下 ping: unknown host www.baidu.com” 解决方法
- 解决linux ping: unknown host www.baidu.com
- 解决linux ping: unknown host www.baidu.com
- ubuntu server ping www.baidu.com:unknown host
- LINUX 解决linux ping: unknown host www.baidu.com
- 解决linux ping: unknown host www.baidu.com
- linux系统:"ping: unknown host www.baidu.com"
- linux网络设置问题 ping: unknown host www.baidu.com
- 修改Tomcat Connector运行模式,优化Tomcat运行性能
- Google算法题:M-寻找缺失的数
- SSM框架Spring 详解 No.1
- 多文件修改文件名;
- 第二十一篇:并发新特性—阻塞队列和阻塞栈(含代码)
- ping百度(外网)出现:unknown host www.baidu.com问题解决
- Java程序员常见的10道XML面试题
- 小程序支付后发送模板消息
- 萌新瑟瑟发抖
- lightoj 1205(回文数的数量 数位dp)
- JAVA每日一题
- 计算机基础知识
- 机器学习常用到的一些算法
- 在使用spring+springMVC+hibernate遇到java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to