REDHAT5 virtual machines in VMware cannot connect to network problems
Environment: Vmware10,radhat Enterprise 5.8, the virtual machine network uses the bridge connection way.
Problem: REHL5 in virtual machine cannot connect to network
Unable to access network: Ping baidu.com
Return: Ping:unknown host www.baidu.com
Reason: Unable to obtain IP dynamically:
[[email protected] ~]# ifconfig:eth0 IP display is IPv6
[Email protected] ~]# service network restart
Return: dertermining IP information for eth0....failed
Workaround:
1. Add the following script to the/etc/sysconfig/network-scripts/ifcfg-eth0:
Check_link_down () {
return 1;
}
Take the files in my virtual machine as an example:
[Email protected] ~]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0
# advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
Device=eth0
Bootproto=dhcp
Hwaddr=00:0c:29:93:c0:95
Onboot=yes
Check_link_down () {
return 1;
}
#保存退出
2. Restart Eth0:
[Email protected] ~]# Ifdown eth0
[Email protected] ~]# ifup eth0
3, test (now can be connected to the normal network)
[[email protected] ~]# Ping baidu.com
PING baidu.com (123.125.114.144) bytes of data.
Bytes from 123.125.114.144:icmp_seq=1 ttl=51 time=25.6 ms
Bytes from 123.125.114.144:icmp_seq=2 ttl=51 time=27.6 ms
Bytes from 123.125.114.144:icmp_seq=3 ttl=51 time=25.5 ms
---baidu.com ping statistics---
3 Packets transmitted, 3 received, 0% packet loss, time 2005ms
RTT Min/avg/max/mdev = 25.514/26.270/27.604/0.955 ms
[Email protected] ~]#
A bit of confusion is: After the deletion of the previously added script can also be normal access to the network ...
Reference Documentation:
Determining IP information for Eth0...faileda
This article from "Not Daze" blog, please make sure to keep this source http://tobeys.blog.51cto.com/10620284/1771577
REDHAT5 virtual machines in VMware cannot connect to the network