Virtual Machine Linux Network configuration

Source: Internet
Author: User
Tags virtual environment

After the virtual machine is installed, there are two more virtual network cards VMnet1 and VMNET8 in the Network Connection dialog box.

First, the virtual device :

-VMNET0: Virtual Switch for virtual bridging network

-VMNET1: Virtual Switch for Virtual Host-only network

-VMNET8: Virtual Switch for virtual NAT network

-vmware Network Adapter vmnet1:host Virtual network card for communication with host-only virtual networks

-vmware Network Adapter vmnet8:host virtual NIC for communication with NAT virtual network


The network configuration (ip\dns\ gateway needs to be configured) has three modes: bridging, Host-only, NAT (most commonly used).

(a) Bridging mode:

Using a virtual machine as a computer in a local area network requires an IP. That is, we need to manually configure the virtual machine IP address, subnet mask, and the host to the same network segment, so as to communicate with the host. (First, network mode is set to: Bridge.) Then when configuring the network, the gateway is the same as the host, the first three bits of IP settings are the same as the gateway, as long as the fourth bit is not occupied. Finally, do not forget to activate the NIC service network restart. Ping the host, pass it on OK)

(ii) NAT:

Nat mode is to allow the virtual system to use the NAT (Network address translation) function, the host machine is located in the network to access the public network that is, using NAT mode can be implemented in the virtual system access to the Internet. The TCP/IP configuration information for a virtual system in NAT mode is provided by the DHCP server of the VMNET8 (NAT) virtual network in other words, that is, the IP address of the shared native. (Detailed procedure below)

(c) host-only

In some special network debugging environments, it is required to isolate the real environment from the virtual environment, then you can use the host-only mode. In host-only mode, all virtual systems can communicate with each other, but virtual systems and real networks are isolated and can take advantage of Windows XP comes with an Internet connection share (actually a simple routing nat) that allows the virtual machine to access the network through the host's real network card. The TCP/IP configuration information of the virtual system (such as the IP Address gateway address DNS server, etc.) is dynamically assigned by the DHCP server of the VMNET1 (host-only) virtual network.

 

The following document is a graphical interface for NAT network configuration.

1, activate the host VMnet8.

Open the network connection, locate VMnet8, right-click Properties-Configure-enable this device. Verify that the status is enabled, not disabled.

2. Set the virtual machine network mode.

Click "Nat Settings" to see the gateway IP that our virtual machine uses, then click "OK". (Don't change it.)

3, the network configuration.

In the virtual machine, click "System"-"manage"-"network" under the desktop. Will enter the following interface:

Double-click the device, set the gateway address to the address you see above, that is, 192.168.159.2;ip address: 192.168.159.5 (as long as the first three bits), select

then select "Hardware Devices", usually with the longest one selected.

after confirmation, "activate". (Ps: If there is a physical address overwrite error, processing method: Click "Detect", automatically get the address, or ifconfig, after the address, modify the MAC address)

4. Open service:

5, verify that the network is unblocked

First look at the native IP, command: ipconfig

(I use wireless here)

Ping each other.


Virtual Machine Linux Network configuration

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.