linux ping unknown host
来源:互联网 发布:powershell 登录linux 编辑:程序博客网 时间:2024/04/29 02:49
1).首先配置DNS服务:
Google公用服务:
# cat /etc/resolv.conf
-------------------------------------------------------------------
nameserver 8.8.8.8
nameserver 8.8.4.4
2)配置IP:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
3) 确保路由表正常
[cpp]
[root@CentOS5 ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.128.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 0 0 0 eth0
#0.0.0.0 192.168.128.2 0.0.0.0 UG 0 0 0 eth0 原来是没有这行的,在执行下面的命令之后才会有的
如果未设置, 则通过如下方式增加网关:
[cpp]
# route add default gw 192.168.128.2
再试一下,就是了ping通了
0 0
- linux ping: unknown host
- linux ping unknown host
- linux ping: unknown host 的解决方法
- linux couldn't resolve host or ping: unknown host解决办法
- ping: unknown host 解决办法
- ping: unknown host 解决办法
- ping: unknown host解决办法
- ping: unknown host 解决办法
- ping: unknown host解决办法
- ping: unknown host解决办法
- ping: unknown host
- ping: unknown host 解决办法
- ping: unknown host 解决办法
- ping: unknown host 解决办法
- LINUX 解决linux ping: unknown host www.baidu.com
- 解决linux ping: unknown host www.baidu.com
- linux ping 本地主机报erro: unknown host的解决办法
- 解决linux ping: unknown host www.baidu.com
- C#中foreach的使用
- CUDA入门知识
- 计算两个文件的相对路径(php)
- Swift利用闭包(closure)来实现传值-->前后两个控制器的反向传值
- OCP 1Z0 052 73
- linux ping unknown host
- memcached学习(4). memcached的分布式算法
- MagicalRecord 2.1
- GitLab安装之后没有样式问题
- Android 4.0 API新特性之OVERVIEW
- UIView和CALayer的区别
- OCP 1Z0 052 74
- javascript禁止button按钮,跟解禁按钮
- USB过滤驱动程序