The bridge model

The principle of

  • VMware virtual outVMnet0This virtual “switch” Bridges to a physical network card. All virtual machines are connected toVMnet0On, and the physical unit into oneLocal area network (LAN), model diagram above (reprinted from Linux Commune).

Train of thought

  1. Set it in VMwareVMnet0Which physical network card to connect to, this step is “bridge”

VMnet0
The bridge model

Just a “physical” connection
Network adapter configuration
Compliance with protocol rules

details

  1. In VMware software:Virtual Web editorIn providingVMnet0Which physical NIC to bridge to
  2. In VMware software:Edit the VM configurationTo connect the virtual machine toVMnet0on
  3. On VMS: Modify vm configuration files. One way is to enable DHCP for VMS, or manually configure VM IP addresses, subnet masks, DNS, and gateways (certain network knowledge is required).

NAT

The principle of

  • VMware virtual outVMnet8thisswitchesTo connect to each VM, and then passVirtual NAT deviceConnect physical nics to all virtual machinesForm a separate LANTherefore, a DHCP server (with limited IP address range) must be created to serve each VM.
  • VMware Network AdapterVMnet8The vm does not access the InternetIs used only for communication between physical hosts and VMS. It can be found in Windows Network Adapter

Train of thought

  1. Connect the VIRTUAL machine toVMnet8(selectNAT modeWorks on the same principle),

DHCP Settings

  1. Configure a valid DNS address in the virtual machine, and you are now ready to go online. In NAT mode, a physical machine and a VM are on two different Lans (private addresses in different Lans cannot be pinged). Therefore, the connection between a physical machine and a VM depends on the following conditionsVMware Network AdapterVMnet8To implement.

VMware Network AdapterVMnet8
Physical network adapter andVMware Network AdapterVMnet8Able to communicate
VMware Network AdapterVMnet8
Virtual machine andVMware Network AdapterVMnet8In a local area network, can communicate with each other