Three Network Configuration Methods for VMware

Source: Internet
Author: User

VMware is a very popular virtual machine that is frequently used in our daily work. This article briefly summarizes the three network configuration methods used in normal times. The specific principles are not discussed in detail.

The virtual machine system is installed in Linux.

First, we can view all network configuration connections on the local machine and run the command: ipconfig

C: \ Documents ents and Settings \ User> ipconfig
Windows IP configuration
Ethernet Adapter VMware network adapter vmnet8:
Connection-specific DNS suffix .:
IP address ......: 192.168.74.1
Subnet Mask ......: 255.255.255.0
Default Gateway .........:
Ethernet Adapter VMware network adapter vmnet1:
Connection-specific DNS suffix .:
IP address ......: 192.168.2.1
Subnet Mask ......: 255.255.255.0
Default Gateway .........:
Ethernet Adapter wireless network connection:
Connection-specific DNS suffix .:
IP address ......: 192.168.1.209
Subnet Mask ......: 255.255.255.0
Default Gateway...: 192.168.1.1
Ethernet Adapter local connection:
Media State ......: Media disconnected
Ethernet Adapter virtualbox host-only network:
Connection-specific DNS suffix .:
IP address ......: 192.168.154.1
Subnet Mask ......: 255.255.255.0
Default Gateway .........:
C: \ Documents ents and Settings \ User>

In the above content, we can see the local connection and other virtual connections, among them, VMWare network adapter vmnet8, VMWare network adapter vmnet1, and local connections are different connection network configurations we will use in various modes.

Local Connection: it is the host Nic used when the bridge mode is used to interact with the virtual machine;

VMware network adapter vmnet1: Virtual Network Adapter used to interact with virtual machines in host-only mode;

VMware network adapter vmnet8: it is the virtual network adapter used for Nat mode interaction with virtual machines;

The following is the test conclusion:

1. Bridge Mode:

The NIC used in bridge mode is: Local Connection and physical Nic
Setting method:
A. Run the ipconfig command on the command line to obtain the network IP address of the local connection, as shown in Figure 172.16.2.41;
B. Set the IP address of the VM to be in the same network segment as the IP address of the local connection, for example, 172.16.2.241;

C. Run the service network restart command to restart the network configuration;

D. Run the ping command to check whether the network is smooth, for example, Ping 172.16.2.41.

2. Host-only mode:

The NIC used in host-only mode is VMware network adapter vmnet1.
Setting method:
A. Use the ipconfig command on the command line to obtain the network IP address of VMware network adapter vmnet1 on the host, as shown above: 192.168.2.1;
B. Set the IP address of the VM to be in the same network segment as the IP address of VMware network adapter vmnet1, for example, 192.168.2.241;

C. Run the service network restart command to restart the network configuration;

D. Run the ping command to check whether the network is smooth, for example, Ping 192.168.2.1.

3. Nat mode:

The NIC used in Nat mode is VMware network adapter vmnet8.
Setting method:
A. Use the ipconfig command on the command line to obtain the network IP address of VMware network adapter vmnet8 on the host, as shown above: 192.168.74.1;
B. Set the IP address of the VM to be in the same network segment as the IP address of VMware network adapter vmnet8, for example, 192.168.74.241;

C. Run the service network restart command to restart the network configuration;

D. Run the ping command to check whether the network is smooth, for example, Ping 192.168.74.1.

 

____________________________________________________________________________

Virtual Machine networkadapter

VMware installed two virtual NICs, vmnet1 and vmnet8, and vmnet0 by default. The configurations of these virtual NICs are automatically generated by the vmwarevm. In general, you do not need to set them by yourself. VMware provides three network connection modes: 1 and bridged (bridging mode). vmnet0 is used by default, and DHCP service is not provided.
In the bridge mode, the virtual machine is in the same status as the host computer, and the virtual machine exists in the LAN just like a real host. Therefore, in the bridge mode, we need to configure IP addresses, gateways, and subnet masks for other real computers. When we can freely allocate a lan ip address, we can use the bridge mode to virtualize a real host. 2. NAT (network address translation mode): by default, vmnet8 is used to provide the DHCP service www.2cto.com. In Nat mode, the host computer is equivalent to a vro with the DHCP function enabled, A virtual machine is a real host in the Intranet. The network parameters are dynamically obtained through DHCP on the router (host computer. Therefore, in Nat mode, virtual machines can access the external network, but not vice versa, because the virtual machines belong to the Intranet. The convenience of using the NAT mode is that we do not need to make any network settings, as long as the host computer can connect to the external network, the virtual machine can also. Nat mode is usually the most commonly used connection mode of VMware on the university campus network, because we generally have only one external IP address. Obviously, the NAT mode is very suitable in this case. 3. Host-only (host mode): by default, vmnet1 is used to provide the DHCP service. In host-only mode, the VM is directly connected to the host computer through twisted pair wires, the host computer does not provide any routing service. Therefore, in host-only mode, the virtual machine can access each other with the host computer, but the virtual machine cannot access the external network. When we want to form a virtual network isolated from the physical network, it is undoubtedly very suitable for the host-only mode. Reference: http://blog.sina.com.cn/s/blog_5384e78b0100fcal.html

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.