NAT mode of vmware network connection: how to use IP address for shared host

Edit === "Virtual Network Editor

insert image description here

change settings

insert image description here

Select VMnet8 NAT mode === "NAT settings

insert image description here

You can also customize the gateway IP by default, as long as there is no conflict.

insert image description here

DHCP settings

insert image description here
insert image description here

Go back to the virtual machine option === "Edit virtual machine settings

insert image description here

Network adapter === "Network connection select NAT mode

insert image description here

Restart the virtual machine

Set IP or use dynamic IP i.e. DHCP

Edit network configuration file

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

insert image description here

Restart the network after configuration

systemctl restart network

check ip address

ip addr

128 is the address provided by dhcp, and 130 is the static ip address.
insert image description here

Start VMnet8

If VMnet8 is not enabled, connection tools such as xshell cannot be used. Because the virtual machine communicates with the host network through VMnet8.
insert image description here

insert image description here

Turn off the firewall of the virtual machine, otherwise the virtual machine and the host may not be able to ping each other

systemctl stop firewalld && systemctl disable firewalld

Use our custom network ip address to connect to the virtual machine through tools such as xshell

insert image description here

Guess you like

Origin blog.csdn.net/weixin_43933728/article/details/131451614