VMware Workstation15 configure network

1. Briefly describe the environment

Software used:VMware Workstation 15

linux version:Linux version 3.10.0-1160.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Mon Oct 19 16:18:59 UTC 2020

2. Set the virtual machine network editor mode

2.1 Click "Edit - Virtual Network Editor - NAT Mode - NAT Settings"

insert image description here
记住这里的 子网IP、子网掩码和网关IP,等等会用到 配置linux网卡配置

2.2 Configure the linux network configuration file

[root@lkk /]# vi /etc/sysconfig/network-scripts/ifcfg-ens33

insert image description here
The modification details are as follows:

DNS1=8.8.8.8
DNS2=8.8.4.4
IPADDR=192.168.75.128
PREFIX=250.250.250.0
GATEWAY=192.168.75.2

Save and exit after modification

2.3 Restart the linux network card

[root@lkk /]# service network restart

After restarting, try again pingand get the following results to prove that pingthe domain name is successful
insert image description here

Guess you like

Origin blog.csdn.net/weixin_42039228/article/details/131406315