VMware configuration VMnet8 network method steps

VMware configuration VMnet8 network method steps

1. Introduction

1. NAT mode (VMnet8) can realize network communication between virtual machines, between virtual machines and hosts, and between virtual machines and the outside world;
2. The IP of the virtual machine only needs to be configured with the IP in the NAT network segment, and access to the external host can be accessed through the host IP. It does not need to have an independent IP in the external network (i.e. the IP in the physical switch segment);
3. Once the network configuration of the virtual machine is determined, it can rarely be changed. Because the NAT configuration remains unchanged, changes in the network connected to the host machine do not affect the virtual machine.

2. Configuration steps

1. Turn off the host's firewall (it seems that it is not necessary to turn it off)

insert image description here

2. Turn off the virtual machine's firewall and switch to root user. Enter the following command
The firewall used by centos7 is not iptables, but firewalle
systemctl status firewalld.service View firewall status command

insert image description here

Systemctl stop firewalld service closes the firewall command

insert image description here

In the previous method, once the operating system is restarted, the firewall will be automatically turned on. Should I execute the following command to set it to permanently turn off the firewall?

Enter the command:

systemctl disable firewalld.service , disable the firewall server at startup
systemctl enable firewalld.service , start the firewall server at boot

insert image description here

4. Check the host IP information and record it, open the CMD window, and enter the following command

ipconfig -all 

insert image description here

5. Host settings for VMnet8 virtual network card network sharing

insert image description here

6. Check the default configuration of the virtual machine NAT mode (record the IP segment, subnet mask, and gateway for use in the next configuration)

insert image description here

insert image description here

7. Configure the virtual machine network card information: switch to the root user, enter the following command, enter the VI editor, and save the configuration.

Note: The IP address, subnet mask, and gateway information come from the default configuration of the virtual machine's NAT mode, and the DNS comes from the host's preferred DNS

vi /etc/sysconfig/network-scripts/ifcfg-eth0

**Problem:** There is no ifcfg-eth0 file.
**Solution:** Change the NAME and DEVICE items of ifcfg-ens33 to eth0, save and exit, and rename the ifcfg-ens33 file to ifcfg-eth0.
**Command execution:**vi /etc/sysconfig/network-scripts/ifcfg-ens33
Enter i to enter the edit mode, and then press esc to exit the edit mode. mv ifcfg-ens33 ifcfg-eth0
Edit the /etc/default/grub file, and insert "net.ifnames=0 biosdevname=0" in the GRUB_CMD_LINE_LINUX="" item (separate it with a space from the original item), save the file and exit.

Modify the content of ifcfg-eth0: (after modification)

insert image description here

service network restart Restart the network

Check ifconfig, but there is no such command. Solution:

Run yum search ifconfig to check which tool package the command is in. However, it displays the message: cannot find a valid baseurl repo. Then check whether the ONBOOT option in ifcfg-eth0 is yes and the location is locked in: /etc/yum.repos.d/. Use the ls command to check whether there are the following repo files:

insert image description here

Modify the file extension to make the file invalid, for example:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

Conclusion: The ifconfig problem was not solved in the end. CentOS 7 has abandoned this command and uses ip addr instead.

insert image description here

8. Configure the host VMnet8 network card information: the IP address segment and the virtual machine IP segment (192.168.119) can be the same, subnet mask: 255.255.255.0

insert image description here

9. The virtual machine pings the host

insert image description here

**Problem:** The host cannot ping the virtual machine, probably because the virtual machine's firewall is not disabled

insert image description here

This is the end of this article about the steps to configure VMnet8 network in VMware. For more relevant content about configuring VMnet8 in VMware, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed configuration and usage of VMWare VMNet 8
  • Detailed explanation of the problem in VMware: Unable to connect Ethernet0 to virtual network "VMnet8"

<<:  How to point the target link of a tag to iframe

>>:  Responsive Web Design Learning (3) - How to improve the performance of web pages on mobile devices

Recommend

Next.js Getting Started Tutorial

Table of contents Introduction Create a Next.js p...

Vue uses Amap to realize city positioning

This article shares the specific code of Vue usin...

Users need to know why

When I was in the securities company, because the ...

Solution to the garbled problem of web pages when the encoding is set to utf-8

Recently, when I was writing web pages with PHP, I...

Markup Languages ​​- Lists Again

Click here to return to the 123WORDPRESS.COM HTML ...

mysql workbench installation and configuration tutorial under centOS

This article shares the MySQL Workbench installat...

MySQL 8.0.18 installation tutorial under Windows (illustration)

Download Download address: https://dev.mysql.com/...

Layui implements sample code for multi-condition query

I recently made a file system and found that ther...

Mysql keeps the existing content and adds content later

This command modifies the data table ff_vod and a...

Installation and daemon configuration of Redis on Windows and Linux

# Installation daemon configuration for Redis on ...

How to dynamically modify container port mapping in Docker

Preface: Docker port mapping is often done by map...

Solution to JS out-of-precision number problem

The most understandable explanation of the accura...

MySQL 5.7.11 zip installation and configuration method graphic tutorial

1. Download the MySQL 5.7.11 zip installation pac...

Detailed explanation of MySQL semi-synchronization

Table of contents Preface MySQL master-slave repl...