VMWare virtual machine 15.X LAN network configuration tutorial diagram

VMWare virtual machine 15.X LAN network configuration tutorial diagram

Recently, I have been working on several virtual machines to learn about distributed and big data technologies. First, I need to set up the virtual machines. The first step is to install the system and then configure the network.

VMware provides us with three network working modes, namely: Bridged (bridge mode), NAT (network address translation mode), and Host-Only (host-only mode).

1. Bridged

The bridge mode is equivalent to the virtual machine and the host being in the same real network segment, and VMWare acts as a hub (a network cable is connected to the router connected to the host), so if the computer changes the intranet, the statically assigned IP must be changed. The picture is as follows:

2. NAT (Network Address Translation)

NAT mode can access the Internet just like bridge mode, except that the virtual machine will create a virtual intranet, and both the host and the virtual machine are in this virtual LAN. In NAT, VMWare is equivalent to a switch (generating a local area network in which IP addresses are assigned to the host and virtual machine respectively)

step:

1. Set the default gateway of VMVare (equivalent to setting up a router):
Edit -> Virtual Network Editor -> Change Settings -> Select VM8 > Click NAT Settings and set the default gateway to 192.168.182.2.

2. Set the host IP address, click VMnet8, set the IP address to 192.168.182.1, and the gateway to the gateway set above.

3. Set the network configuration on the Linux virtual machine, the interface is the same as above.

cd /etc/sysconfig/network-scripts/ //Enter the network adapter folder mv /ifcfg-ethXXX /ifcfg-eth0 //Change the name to ifcfg-eth0
vi ifcfg-eth0 //Edit file TYPE=Ethernet 
DEFROUTE=yes 
PEERDNS=yes 
PEERROUTES=yes 
IPV4_FAILURE_FATAL=no 
IPV6INIT=yes 
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes 
IPV6_PEERDNS=yes 
IPV6_PEERROUTES=yes 
IPV6_FAILURE_FATAL=no 
NAME=eth0 
UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11 
ONBOOT=yes #Turn on automatic network connection, this must be changed IPADDR=192.168.182.3 #Set IP address NETMASK=255.255.225.0 #Set subnet mask GATEWAY=192.168.182.2 #Set gateway DNS1=61.147.37.1 #Set primary DNS 
DNS2=8.8.8.8 #Set backup DNS 
BOOTPROTO=static # Enable static IP address, default is dhcp
:wq! #Save and exit service network restart #Restart the network ping www.baidu.com #Test whether the network is normal ip addr #Check the IP address

Test OK

After pinging the network, you can download the ifconfig command

yum provides ifconfig # Check which package provides the ifconfig command, showing net-tools
yum -y install net-tools #Install the package that provides ifconfig

3. Host-Only (Host-Only Mode)

The host mode is very similar to the NAT mode, except that you cannot access the Internet. It is equivalent to VMware virtualizing a LAN, but this LAN is not connected to the Internet.

After the virtual machine is installed, if you use xshell to directly drag and drop files, you need to execute the following command

yum -y install lrzsz

Summarize

The above is the VMWare virtual machine 15.X LAN network configuration tutorial illustrated by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

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)
  • 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
  • Analysis of the implementation process of three modes of VMWare network adapter

<<:  MySQL Server 8.0.3 Installation and Configuration Methods Graphic Tutorial

>>:  js to implement web calculator

Recommend

A detailed introduction to for/of, for/in in JavaScript

Table of contents In JavaScript , there are sever...

Docker uses nextcloud to build a private Baidu cloud disk

Suddenly, I needed to build a private service for...

Implementation of one-click TLS encryption for docker remote api

Table of contents 1. Change the 2375 port of Dock...

Docker deploys nginx and mounts folders and file operations

During this period of time, I was studying docker...

Node.js makes a simple crawler case tutorial

Preparation First, you need to download nodejs, w...

Class in front-end JavaScript

Table of contents 1. Class 1.1 constructor() 1.2 ...

MySQL database optimization: index implementation principle and usage analysis

This article uses examples to illustrate the prin...

Implementation example of JS native double-column shuttle selection box

Table of contents When to use Structural branches...

How to dynamically add modules to Nginx

Written in front Often, after we install Nginx ba...

Several ways to add timestamps in MySQL tables

Scenario: The data in a table needs to be synchro...

Detailed steps to install mysql in Win

This article shares the detailed steps of install...

Share 20 excellent web form design cases

Sophie Hardach Clyde Quay Wharf 37 East Soapbox Rx...

HTML table markup tutorial (6): dark border color attribute BORDERCOLORDARK

In a table, you can define the color of the lower...