CentOS 8 network configuration ON VMware

VMware虚拟机安装CentOS 8,网络配置如下所示:

HOST

VMware Network Adapter VMnet8:

 IPv4 地址 . . . . . . . . . . . . : 192.168.159.1

VMware

CentOS

cd /etc/sysconfig/network-scripts
vim ifcfg-ens33

ONBOOT=yes

IPADDR=192.168.159.201

GATEWAY=192.168.159.2

SUBNETMASK=255.255.255.0

DNS1=8.8.8.8

BOOTPROTO=none

or

BOOTPROTO=static

Restart network

systemctl restart network