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

Detailed explanation of the difference between flex and inline-flex in CSS

inline-flex is the same as inline-block. It is a ...

The perfect solution to the Chinese garbled characters in mysql6.x under win7

1. Stop the MySQL service in the command line: ne...

Sample code for batch deployment of Nginx with Ansible

1.1 Copy the nginx installation package and insta...

Several ways to encrypt and decrypt MySQL (summary)

Table of contents Written in front Two-way encryp...

How to achieve the maximum number of connections in mysql

Table of contents What is the reason for the sudd...

How to create a database in navicat 8 for mysql

When developing a website, you often need to use ...

How to use VUE to call Ali Iconfont library online

Preface Many years ago, I was a newbie on the ser...

Detailed explanation of the use of HTML header tags

HTML consists of two parts: head and body ** The ...

JavaScript Basics: Error Capture Mechanism

Table of contents Preface Error Object throw try…...

CSS3 achieves conic-gradient effect

grammar: background-image: conic-gradient(from an...

docker logs - view the implementation of docker container logs

You can view the container logs through the docke...

Summary of the unknown usage of "!" in Linux

Preface In fact, the humble "!" has man...

Basic learning tutorial of table tag in HTML

Table label composition The table in HTML is comp...

Detailed explanation of html download function

The new project has basically come to an end. It ...

How to implement vue page jump

1. this.$router.push() 1. Vue <template> &l...