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

JavaScript implements mouse drag to adjust div size

This article shares the specific code of JavaScri...

An article to understand what is MySQL Index Pushdown (ICP)

Table of contents 1. Introduction 2. Principle II...

How to use the yum command

1. Introduction to yum Yum (full name Yellow dogU...

Implementation of WeChat applet message push in Nodejs

Select or create a subscription message template ...

How to install redis5.0.3 in docker

1. Pull the official 5.0.3 image [root@localhost ...

How to implement insert if none and update if yes in MySql

summary In some scenarios, there may be such a re...

React implements infinite loop scrolling information

This article shares the specific code of react to...

How to create a basic image of the Python runtime environment using Docker

1. Preparation 1.1 Download the Python installati...

js to implement a simple bullet screen system

This article shares the specific code of native j...

vue-cropper component realizes image cutting and uploading

This article shares the specific code of the vue-...

Summary of Common Problems with Mysql Indexes

Q1: What indexes does the database have? What are...