REDHAT5 virtual machines in VMware cannot connect to the network

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.