Analysis of the implementation process of three modes of VMWare network adapter

Analysis of the implementation process of three modes of VMWare network adapter

Three modes

Bridged (bridge mode), NAT (network address translation mode), Host-Only (host-only mode)

After installing vmware, there will be the following two virtual network cards in the network connection:

VMnet1 works in host-only mode

VMnet8 works in NAT mode

1. Bridge Mode

The bridge mode is to use the virtual bridge to communicate between the host network card and the virtual network card of the virtual machine. Under the role of bridging, it is similar to virtualizing the physical host into a switch. All virtual machines with bridging settings are connected to an interface of this switch, and the physical host is also plugged into this switch. Therefore, all network cards under the bridge are in switching mode and can access each other without interfering with each other. In bridge mode, the virtual machine's IP address needs to be in the same network segment as the host. If networking is required, the gateway and DNS need to be consistent with the host's network card.

Select the bridge mode for the VMWare network adapter mode, click Edit in the menu bar-Virtual Network Editor, and click the lower right corner to change the settings:

Select VMnet0 (this is a virtual network card in bridge mode, only 1 and 8 are displayed in the network adapter of the physical host), bridge to it and select the network card you use for normal Internet access.

Open cmd, enter the ipconfig command, and check the IP information of your physical host:

Open the virtual machine, view and change the network card information (need to be in the same network segment as the physical host, with the same subnet mask and gateway):

Restart the network card (systemctl restart network) and test:

2. NAT Mode

If you are short of IP resources but want to connect polymorphic virtual machines to the Internet, NAT mode is the best choice.

NAT mode uses a virtual NAT device and a virtual DHCP server for networking. Note that the virtual machine does not need VMWare Network Adapter VMnet8 to connect to the external network. The reason for this virtual network card is to enable communication between the physical host and the virtual machine. Schematic diagram:

Change the virtual machine's network adapter to NAT mode, open the virtual network editor, and select VMnet8:

The subnet IP is set to: 192.168.100.0, and the subnet mask is set to: 255.255.255.0

Gateway IP in NAT settings: 192.168.100.2

Disable VMnet8:

Open the virtual machine and modify the network card information to:

Restart the network card and test it. You can ping the external network.

Note: You can Check it, set the IP segment in it, and set BOOTPROTO to dhcp in the virtual machine network card information. This is dynamic acquisition, and the subsequent IP, gateway and other information can be commented out.

At this time, open xshell and connect to this virtual machine, but it cannot be connected. Enable the virtual network card VMnet8, and then use xshell to connect. It can be connected. This shows that the virtual network card VMWare Network Adapter VMnet8 is only used to connect the physical host and the virtual machine.

3. Host-only mode

Host-Only mode is actually the NAT mode without the virtual NAT device, as shown in the figure:

By default, the virtual machine cannot connect to the external network. You can share the physical host network card with VMnet1 to achieve the purpose of Internet access.

Right-click the network card that the physical host uses to access the Internet, select Properties---Share, select Allow, and select VMnet1:

Open the Virtual Network Editor and select VMnet1:

Open the virtual machine and set the network card information (dynamic DHCP is used here):

The test can ping the external network.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • VMware's detailed tutorial on how to create a Linux virtual machine and set up a virtual machine network
  • CentOS7 network configuration under VMware virtual machine (host wireless Internet access)
  • VMWare virtual machine 15.X LAN network configuration tutorial diagram
  • Detailed explanation of the steps for configuring the Centos7 bridge network under VMware
  • Solution to Ubuntu 18.04 not being able to connect to the network in VMware virtual machine
  • How to set up VMWare Fusion network on MAC
  • Detailed introduction to CentOS 7 network settings in vmware
  • The difference between VMware's three network connection methods

<<:  Vue realizes the percentage bar effect

>>:  Mysql command line mode access operation mysql database operation

Recommend

How to implement a single file component in JS

Table of contents Overview Single file components...

Ubuntu installation Matlab2020b detailed tutorial and resources

Table of contents 1. Resource files 2. Installati...

Detailed process record of Vue2 initiating requests using Axios

Table of contents Preface Axios installation and ...

How to build ssh service based on golang image in docker

The following is the code for building an ssh ser...

Record a pitfall of MySQL update statement update

background Recently, I executed a DML statement d...

Detailed explanation of how to gracefully delete a large table in MySQL

Preface To delete a table, the command that comes...

Vue implements the countdown component for second kills

This article shares the specific code of Vue to i...

Learn about CSS label display mode in one article

Tag type (display mode) HTML tags are generally d...

JavaScript message box example

Three types of message boxes can be created in Ja...

Vue implements DingTalk's attendance calendar

This article shares the specific code of Vue to i...

Summary of MySQL lock knowledge points

The concept of lock ①. Lock, in real life, is a t...

Web designers also need to learn web coding

Often, after a web design is completed, the desig...

Example analysis of interval calculation of mysql date and time

This article uses an example to describe the inte...

Analysis of the difference between Mysql InnoDB and MyISAM

MySQL supports many types of tables (i.e. storage...

Example code for converting html table data to Json format

The javascript function for converting <table&g...