版权声明:本文为博主原创文章,未经博主允许不得转载。
如果ping域名的时候出现ping:unknown host xxx.xxx
但是ping IP地址的时候可以通的话
可知是dns服务器没有配置好,
查看一下配置文件/etc/resolv.conf,里面是否有nameserver xxx.xxx.xxx.xxx,比如使用dns服务器 nameserver 8.8.8.8,如果有,修改一个可用的dns服务器,如8.8.8.8或者4.4.4.4,保存退出即可!
当然,如果连ip都ping 8.8.8.8都ping不通的话,那么就说明网络配置有问题:可以这样解决:
1,首先查看ifconfig是否有内网ip地址,如果没有,那么配置一下
ifconfig eth0 192.168.1.100 up,
可以同时配置好掩码:
另外使用route命令查看一下当前的默认网关,如果没有,也配置一个,
route add default gw 192.168.1.1,
配置好这两个以后,就可以正常的ping通网络了,如果还不能ping www.baidu.com,那么就要去查看dns服务器啦。
VM, … eth0….failed - no link present check cable解决方法
determining IP information for eth0…failed; no link present.check cable
在VM虚拟机中装了WS3,准备配置产品的web环境weblogic,结果网络不通!
无法激活,在输入ifup eth0后总提示:
Dertermining IP information for eth0….failed - no link present check cable
解决办法:
在 /etc/sysconfig/network-scripts/ifcfg-eth0
中添加以下script:
check_link_down() {
return 1;
}
具体操作:
[root@localhost root]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vi ifcfg-eth0
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0c:29:64:c2:5f
BOOTPROTO=dhcp
以下为添加部分,具体操作方法:先按a,在光标后插入下面文本,最后 :wq 保存退出
check_link_down(){
return 1;
}
接下来,重起网络
[root@localhost network-scripts]# ifup eth0
Determining IP information for eth0... done.
好了,看到上面的提示说明已经成功,可用ifconfig检查自己是否已获得有效IP。