Win7 Linux (CentOS 64) network configuration on virtual machines. __linux

Source: Internet
Author: User

my version of the platform:

Host computer operating system: Windows7 flagship edition

VMware version: 9.0.1 build-894247

Virtual machine Operating system: Cent OS 6.3 (64-bit)

Host Internet access: Broadband

First, set up the Internet Nat mode

The configuration method is as follows:

1. Set the host's broadband to allow sharing. Specific way: Click on the taskbar's network icon,

Open Network and Sharing Center, click on "Local Area Connection" to open "local connection status" to the left of the image below, click Properties to open "local connection Properties" as shown in the right half of the figure, select the "Allow Internet users of this computer to connect to (N)" Click OK,



2. View Vmnet8 and native IP

At this point, you can use Ipconfig-all to view the addresses of each adapter in Windows command line format, where we need to focus on the address of the WMNET8 and the address of the Ethernet local connection:

Local:

VMNET8:



3. Set up virtual Machine network

Click on the virtual network Editor under the "Edit" menu to check if the Vmnet1 and vmnet8 two adapters are enabled, and if not, manually enable them.

If Vmnet8 and Vmnet1 are not started, click "Apply" in the diagram to wait.

Vmnet1 and Vmnet8 are the two virtual adapters that are installed with the VMware installation, where they are used to share the network resources of the host's real adapters.


Click on the "NAT settiongs" button, you can see the gateway IP, is generally 192.168.*.2 form, and in Windows with Ipconfig-all see VMNET8 address is the same network segment, here is 192.168.147.2.

 

3. The Linux network card under VMware is set to Nat.

Under the VMware menu, click Vm->settings ..., and jump out of the Diagram dialog box:



4. Set up Linux network conditions (including eth0 and DNS settings) under the Linux virtual machine.



Click the "Edit" button to add addresses, eth0 static IP settings and VMnet8 the address of a network segment (here, is the 192.168.192.* form), The subnet mask is 255.255.255.0, the default gateway is set to the same value as the Vmnet gateway address, and here is 192.168.147.2, and the DNS is set to the same address as the host's Ethernet adapter local connection, here is 222.246.129.80, click " Apply "OK.


Next, switch to root and restart Linux's Network Service (in the Terminal Input Service Network restart command).

Under Linux ping host IP below.


and ping virtual machine IP (192.168.147.129) in host command mode can ping.


Summary: This way is to use VMware's VMNET8 adapter to share the host adapter to the Internet, the domain Name system is the original host of the Ethernet adapter. Can simultaneously realize the host and the virtual machine simultaneous surfer. In fact, this is also a host and virtual machines to communicate one way.


Second, intranet access (bridge mode)

Set the network connection mode on the virtual machine to bridge mode. Vm-settings

Edit Vi/etc/sysconfig/network-scripts/ifcfg-eth0

The IP address will be changed to the intranet Ip,dns the same as the host.

Finally, restart Service network restart.

Link Address: http://blog.csdn.net/ldk22/article/details/8584384

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.