The reason why "Bridge: directly connect to the physical network" cannot access the internet when CentOS6.4 is installed on a virtual machine and the solution is as follows:

Source: Internet
Author: User
Use bridging to install CentOS6.4 on a virtual machine: the cause of direct connection to the physical network without access to the Internet and the solution has recently installed CentOS6.4 on a virtual machine in Win7. after the installation, the network can be accessed normally when it is set to NAT, but it is not in the same IP segment as the host's physical network... the reason why "Bridge: directly connect to the physical network" cannot access the internet when CentOS6.4 is installed on a virtual machine and the solution is as follows:

CentOS6.4 was recently installed on a virtual machine in Win7. after the installation, the network can be accessed normally when it is set to NAT, but it is not in the same IP segment as the host's physical network, this is not conducive to the test, so we want to set it to "bridge: directly connect to the physical network", so that the IP address of the virtual machine and the host IP address are in the same network segment. However, after the settings are completed, the network cannot be accessed. Run ifconfig on the CentOS terminal and no IP address is found.


Normal NAT connection




"Bridging: directly connecting to the physical network" cannot access the internet normally



What is the reason for this? In the past, similar problems were encountered when other systems were installed in virtual machines. However, after restarting, the problem can be roughly solved. However, this restart will not work. Why?


After finding a lot of information, I found that some users may have used two NICs, and the system in the virtual machine will automatically set one for use, if it is configured to the one that is not connected to the network, it will not be able to access the network. At this time, two network cables were directly connected to the computer, so after the restart, the system in the virtual machine can access the Internet no matter which network card is set. However, I recently pulled out one of them. I checked that the virtual machine was indeed connected to a network card without a network connection, so I couldn't get it. After switching back to the normally connected physical network card, you can. The following describes the switchover process.


1. select the CentOS operating system on the virtual machine interface.

2. select edit> Virtual Network editor from the VM menu.


3. select the connected physical network from the drop-down list after "bridge connected.

(If you do not know which one is connected, you can open the Network and Sharing Center-> Change the adapter Settings-> local connection, find the connected network adapter)


If you still cannot access the internet normally, you can configure the network in CetOS to Manaul, add the corresponding IP address, sub-mask, and gateway, and ensure that DNS Servers and search domains, multiple DNS Servers must be separated by commas.


If you do not know DNS Servers and Search domains, you can open CMD on the host and enter ipconfig/all to view them. For example.

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.