Steps to solve the problem of Redhat not being able to access Internet in virtual machine vmware

Source: Internet
Author: User
Tags get ip

The following steps are available for my pro test.

I. Experimental environment

Hosting System: CentOS Linux 5.3 (You can also be windows, this problem and the host system does not matter)
Virtual machine system: Redhat Linux 9.0
Network environment: The host system uses the adsl+ router to surf the internet, the IP address is: 192.168.1.100
Virtual machine Software: VMware Workstation 6.0 Official Original
Three. The solution (in the following numerical order, step through)

1. In RH, by tapping the Red Hat icon in the lower left corner of the desktop, select: System Tools, run: Terminal (terminal)


2. In the Open Terminal window, we first enter: ping www.163.com, enter to test whether the network is really not through (of course, otherwise I write this article why .... )


3. Under Terminal Direct Input Setup Enter, this is Redhat hardware environment Configuration interface, we select "Network Configuration", enter
A confirmation dialog box appears, meaning: is the network configured? Yes, of course.


Here is the IP information to configure the network card, we do not need to set any IP, just press the "SPACEBAR", select "Use Dynamic IP ..." (or in the configuration of the IP interface, press the SPACEBAR to check DHCP, and then save the exit), meaning: Using the DHCP function, Get IP automatically


When selected, there is a * in front, and then press: tab, switch to OK, press ENTER

Finally go back to the main interface just above, or press TAB, select Quit, exit the configuration interface

4. Below, continue inside the terminal and enter directly: Vi/etc/sysconfig/networking/devices/ifcfg-eth0 (Note that the number 0 is the last)

After you enter, you can open the "ifcfg-eth0" file with the vi text editor. Use the keyboard up and down the left and right arrow, switch to the end of the article (should be three lines), and then press A to enter the editing mode

Enter, restart a line, and start entering the following 4 lines of information as shown in the figure: (note divided into four lines, do not squeeze on one line)

Check_link_down ()
{
return 1;
}

After typing, press ESC, then enter: X to save and exit.


4. The same method, in the terminal, directly enter: Vi/etc/sysconfig/network-scripts/ifcfg-eth0 (Note that the last number is 0), so enter the above 4 lines of information.

Finally, you can save and exit by pressing the ESC key and typing: x.

5. Confirm the above 2 files, have added the same 4 lines of content, and then in the terminal directly input Ifdown Eth0 (note is the number 0), enter, this time will be prompted to say: "Inactive", the NIC also wood has activated
6. Re-enter Ifup eth0 Enter. The activation is complete.


7. Continue to enter Ping www.163.com in the terminal, the network can be internet.


The above configuration work is completed, you can open the Web page normally.

Steps to solve the problem of Redhat not being able to access Internet in virtual machine vmware

Related Article

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.