VM Internet access settings

Source: Internet
Author: User

Today, I tested the VM settings for accessing the Internet through the host. The record is as follows:

I. test environment:

1. HOST: Windows XP SP4

2. Virtual Machine: centos (RedHat Linux) 4.4

3. Virtual Machine: VMWare 6.0

Ii. Test process:

1. Network Mode (NAT shared Host IP address)

 

2. VMWare settings (Dhcp Service enabled)

In the "edit" menu of VMware, "virtual network settings ......" Open the following window

 

 

From the above, we can see that the vm dhcp service has been enabled. The default network segment is 192.168.203.0.

3. Virtual Nic settings

There is a virtual network card vmnet8 in the network connection of the host. First check whether the connection is normal, and then check whether the IP address is automatically obtained. If not, change it to automatically obtained.

4. network settings in Linux

After entering Linux, use the command VI/etc/sysconfig/network_script/ifcfg-eth0 to view and edit the NIC configuration, as shown below:

 

The bootproto of is already equal to DHCP. If the IP address is previously specified, you can change it to the above style.

5. automatically obtain the IP address

After Linux is restarted, use ifconfig to view the IP address and find that the IP address is not obtained. Then use the dhclient command to obtain the IP address again, for example:

6. Ping the IP address of the host. Open the browser and enter the URL to access the Internet.

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.