VM virtual machine network configuration bridge mode method steps

The VM virtual machine is configured with bridging mode, which allows the virtual machine to exist in the same local area network as the physical host, and can communicate with the host, the Internet, and other hosts in the LAN.

Vmware provides us with three network working modes, they are: Bridged (bridge mode), NAT (network address translation mode), Host-Only (host-only mode).

What is 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 function of bridging, it is similar to virtualizing the physical host as a switch. All the virtual machines set up by bridging are connected to an interface of this switch, and the physical host is also plugged into this switch, so all network cards and network cards under the bridge are connected. It is in exchange mode and can be accessed without interfering with each other. In bridge mode, the IP address of the virtual machine needs to be on the same network segment as the host. If networking is required, the gateway and DNS need to be consistent with the host network card.

1. View the network configuration information of the machine

1. Method one;

CMD enters the command line mode and enters the command: ipconfig -all to view;

2. Enter the network adapter settings to view;

 2. Modify the "Virtual Network Editor" information

1. "Edit Virtual Machine Settings" - "Network Adapter" - check "Bridge Mode";

 2. Follow the steps below;

 3. Note: If VMnet0 is not displayed in the third step, operate according to the figure below;

 4. Start the virtual machine.

3. Settings after the virtual machine is turned on

1. Switch root account;

2. Use the command to switch to the directory where the network card is located, command: cd /etc/sysconfig/network-scripts/ ;

3. Enter the command: vi ifcfg-ens33 to set the network card, save and exit after editing;

 4. Restart the virtual machine, command: reboot;

5. Ping command detection;

 

Guess you like

Origin blog.csdn.net/weixin_47401101/article/details/131886429