简略写下,有空补充详细。
VMware Workstation
windows
find the VMware Workstation NAT Network Adapter, then change the IPV4 config:
CentOS network config
sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33
content:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=7ef0da97-7e3f-4052-85e5-e90c8386167f
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.11.6
GATEWAY=192.168.11.2
NETMASK=255.255.255.0
DNS1=192.168.11.2
network.service
isn't available on CentOS8 by default, so we should use NetworkManager.service
and restart it:
sudo systemctl restart NetworkManager
# or use the below command:
# sudo nmcli connection reload
Check either IP is changed:
ip addr
output:
done!