VMware Network Setup after installing CentOS

Source: Internet
Author: User

After the use of the CentOS virtual machine, there is no Internet access, the use of the host ping virtual machine address can ping, and the virtual machine ping the host, while the virtual machine can not ping other URLs or IP, display content for the network is unreachable, Later after the search on the Internet to find a solution using NAT mode, to solve the problem, recorded as follows:

1. Open the Service (SERVICES.MSC) to ensure that VMware's DHCP and NAT services are turned on.

2, modify the virtual machine access mode, can be viewed in the "Edit virtual network", as follows:

Open the following interface as follows:

3, click VMnet8, set the relevant information: the general use of the default configuration, if the figure 1 of the subnet IP self-adjustment, the corresponding 2, 3 also need to make corresponding adjustments:

4, in the virtual machine settings to choose the NAT connection mode, if there is no network connection method need to add their own.

5, open the virtual machine to see the virtual Machine network settings. The command is as follows

#vi/etc/sysconfig/network-scripts/ifcfg-eth0

Some of the contents are as follows:

Device=eth0 #设备名称, can be found according to Ifcofnig command.
Bootproto=dhcp #连接方式, DHCP automatically assigns addresses without having to set up IP and gateways below
hwaddr=00:0c:29:ad:66:9f #硬件地址, can be found according to Ifcofnig command.
Onboot=yes #yes表示启动就执行该配置, you need to change Yes

Online there will be some ways to add IP addresses, subnet masks, DNS, and so on, before the installation of these methods have been tested, and the addition of the content has also affected the Internet, so it is not recommended to use those ways to add the content.

You can use the Ifconfig command to obtain relevant information.

After modifying, you need to restart the network settings, you can

# Service Network Restart

Or

#/etc/init.d/network Restart

After the reboot is complete, ping the physical machine or the corresponding website, can successfully ping the pass.

VMware Network Setup after installing CentOS

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.