Detailed description of vmwarevm network settings

Source: Internet
Author: User

If you are a computer enthusiast, you will often encounter problems that can be easily solved, and you will have a sense of accomplishment. For example, after the vmwarevm is installed, two NICs (vmnet1 and vmnet8) are automatically added. The entire machine structure can be abstracted as: vmwarevm System (vmnet0) -(vmnet1 vmnet8)-actual system (NIC ).

1. Nic settings for VMware

(1) bridged (bridging) Mode

In this way, the IP address of the virtual system can be set to the same network segment as the local system. The virtual machine is equivalent to an independent machine in the network and is inserted in a hub together with the local machine, other machines in the network can access virtual machines, and virtual machines can also access other machines in the network. Of course, two-way access to the local system is not a problem. at this time, VMWare will simulate a bridge function, and only use the vmnet1 Nic, And the vmnet8 won't be used;

(2) NAT (Network Address Translation)

This method can also achieve two-way access between the local system and the virtual system, but other machines in the network cannot access the virtual machine. The virtual system can access other machines in the network through the local system using the NAT protocol.

Now VMware is simulating a vrodhcp with DHCP function. At this time, it will use vmnet8.

(3) Host-only mode

In this way, only the network communication between the VM and the host can be performed. Other machines in the network cannot access the virtual system or other machines.

(4) not use method

This method does not use the network. The virtual system is a single machine.

2. How to set the network

After VMware is installed, two automatically generated NICs, vmnet1 and vmnet8. Do not change these two settings. You only need to directly enter the Virtual Machine and set the system virtual network card in the system.

(1) If you use the bridging method, you can directly set vmnet0. The specific setting method is the same as that in the XP system, but you must have redundant IP addresses, the IP address of the VM must be in the same CIDR block as the host.

My XP configuration is IP Address: 222.198.135.219, mask is 255.255.255.0, Gateway is 222.198.135.1, and my RedHat configuration is the IP address of eth0: 222.198.135.210 mask is 255.255.255.0, the other DNS configurations of the gateway are exactly the same as those of the host.

(2) If there are no redundant IP addresses, only the NAT method is used. The key points are as follows:

First, make sure that the virtual network card vmnet0 and vmnet1 on the virtual machine have the same network number;

Second, set the network attribute in the virtual system and set the gateway address to the address of vmnet1;

Third, enable the routing function of the main system to make it a router.

The specific settings are as follows:

A. Select the NAT mode in VM-Ethernet.

B. Open edit -- Virtual Network editor and check DHCP enable. In the NAT option, the vmnet8 gateway is 192.168.105.2. This is the DNS in the virtual machine.

C. Enter ipconfig-all under xp. You can see that the automatically assigned vmnet8 IP address is 192.168.105.1.

D. enable the network configuration in the virtual system. In the DNS, enter 192.168.105.2 as the gateway of vmnet8.

E. Select static IP address in the device. The settings are as follows:

Address: 192.168.105.10 (the IP address of vmnet8 can be in the same network segment. Do not repeat it with the gateway)

Subnet Mask: 255.255.255.0

Default Gateway: 192.168.105.2

Now the configuration is complete. Restart the network service # service network restart

I can ping all IP addresses in a virtual machine, but I cannot ping the Virtual Machine IP address in XP. I don't know why, but I can access the Internet the same way.

(3) Host-only:

A. Share the local connection in XP and use vmnet1 for connection. At this time, the IP address of vmnet1 is automatically changed to 192.168.0.1 and the firewall is disabled.

B. Enable network settings in the virtual machine, Red Hat icon-> system settings-> network, and set eth0 as follows:

IP: 192.168.0.2 (or other addresses on this network segment)
Netmask: 255.255.255.0
Default Gateway: 192.168.0.1
DNS: 202.202.0.33
202.202.0.34

After the vmwarevm is set up, you can easily access the Internet cafe.

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.