Network configuration after installing CentOS on a VM

Source: Internet
Author: User

It took some time to study the network configuration problem of the Linux virtual machine on the next VM.
1. Environment
Host: WinXP SP2, home broadband, LAN connection to router, IP address is 192.168.1.101.

Virtual machine: CentOS (open source free version of Redhat Linux), plain text mode.

After installing CentOS on the VM, two more network connections were found on the host: VMNet1 and VMNet8. Each network connection has an IP address and a subnet mask.
The VMNet1 is: 192.168.229.1/255.255.255.0
The VMNET8 is: 192.168.30.1/255.255.255.0

2. Next, you want CentOS to access the Internet.
In the beginning, set the network connection in the VM to briged. After starting CentOS, the Execute ifconfig command found that the Eth0 IP address setting became the IP address of the same network segment as the host: 192.168.1.102. At the same time, the use of SSH can be connected to CentOS, but CentOS on the ping on the host, also Ping does not pass www.baidu.com. View profile found that the router on CentOS is the host's Router,dns is also the host's DNS.

In order to use the briged way online, Baidu has a lot of information, try to do, no use. There is no way to change the way to NAT, restart after the discovery can surf the internet. Also note that using SSH to connect CentOS seems to be faster.

After modifying to Nat, the Execute ifconfig command discovers that the CentOS IP address is the IP address 192.168.30.128 in host VMnet8. And DNS has become the VMNET8 under the 192.168.30.2.

According to the information on the Internet, briged way to the Internet, is directly connected to the machine's physical network card. At this point the CentOS virtual machine is equivalent to a machine that is on the same LAN as the host. With Nat, CentOS and the host are the client/server relationships. The host provides VMnet8 to CentOS, and for CentOS, VMnet8 is equivalent to a gateway or router, and CentOS is equivalent to a machine within the LAN that VMNET8 is responsible for.

Network configuration after installing CentOS on a VM

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.