VMware is a very popular virtual machine, in our usual work needs to be used frequently, this article simply summed up the usual use of the three kinds of network configuration, the specific principle did not go deep.
The virtual machine system is installed on a Linux system.
First, we view all network configuration connections on this computer, using the command: ipconfig
- C:\Documents 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 Internet access:
- 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 and Settings\user>
In the above, we can see local connections and other virtual connections, where VMware network Adapter VMnet8, vmware Network Adapter VMnet1, and local connections are the different connection network configurations we want to use in various modes.
Local connection: The host network card used when the machine interacts with the virtual machine using bridge mode;
VMware Network Adapter VMnet1: is the virtual network card used by this machine to interact with the virtual machine in host-only mode;
VMware Network Adapter VMNET8: is the virtual network card that is used when the computer interacts with the virtual machine in a NAT manner;
Next is the test conclusion:
1. Bridge Mode:
The NIC used in bridge mode is: local connection, and physical network card
Setup method:
A. At the command line, use the ipconfig command to obtain the network IP address of the local connection, as above: 172.16.2.41;
B. Set the IP address of the virtual machine to the IP address of the local connection in the same network segment, such as 172.16.2.241;
C. Restart the network configuration using the service network restart command;
D. Use the ping command to check if the network is unblocked, such as: Ping 172.16.2.41.
2. Host-only Mode:
The NIC used in Host-only mode is: VMware network Adapter VMnet1
Setup method:
A. Use the ipconfig command at the command line to obtain the network IP address of the VMware Networks Adapter VMnet1 on the host, as above: 192.168.2.1;
B. Set the IP address of the virtual machine with the IP address of the VMware network Adapter VMNET1 in the same network segment, such as 192.168.2.241;
C. Restart the network configuration using the service network restart command;
D. Use the ping command to check if the network is unblocked, such as: Ping 192.168.2.1.
3. Nat Mode:
The network card used by NAT mode is: VMware network Adapter VMNET8
Setup method:
A. Use the ipconfig command at the command line to obtain the network IP address of the VMware Networks Adapter VMnet8 on the host, as above: 192.168.74.1;
B. Set the IP address of the virtual machine with the IP address of the VMware network Adapter VMNET8 in the same network segment, such as 192.168.74.241;
C. Restart the network configuration using the service network restart command;
D. Use the ping command to check if the network is unblocked, such as: Ping 192.168.74.1.
VMware three ways to configure your network