Centos7 in VMware cannot be linked to an extranet problem through NAT mode

Source: Internet
Author: User

The source of Yum in the replacement virtual machine today is a domestic 163 source, and an error occurred while executing yum Makecache "

Could not retrieve Mirrorlist

Could not Resolve Host * * * * *

At the same time, ping www.baidu.com in the terminal also does not pass, but the ping host IP is a pass

Baidu after a few possible and processing methods:

1, no configuration resolv.conf.

Add DNS in/etc/resolv.conf, such as:

2. The onboot is not set to "yes"

In the/etc/sysconfig/network-scripts directory, locate the file opening with ifcfg-, and the following numbers can be found by ifconfig.

Set Onboot to "Yes"

3, host and virtual machine network configuration is not correct

  3.1. Host settings, I set the fixed IP, the DNS, the default gateway and other information are filled.

  

  3.2VMware settings

 Using the custom mode, select VMnet8 (NAT mode)

Then set the network, NAT settings must be set, in the inside set up the DNS information.

Originally I chose to use the local DHCP service, but after the choice of virtual machine can not be networked, so the fork off this option.

In this case, the host and virtual machine configuration is OK, restart the Virtual Machine Network Service (service network Reastart) or restart the system (reboot) can be, and then try to ping www.baidu.com, found that the network is available.

Centos7 in VMware cannot be linked to an extranet problem through NAT mode

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.