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

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.

The above settings are in win7, and other systems may not be the same, please refer.

Reprinted please indicate the source http://blog.csdn.net/xxdddail/article/details/9997359

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.