In general, the use of VMware Workstation Pro Linux system by default may be automatically assigned IP address, if you change to static IP address change how to set it.
This method is NAT mode non-bridging
First look at the current host IP configuration for running the virtual machine environment
IP address of IPv4:192.168.254.1
Link Linux system execution
Vim Etc/sysconfig/network-scripts/ifcfg-eth0
Edit the configuration of this file:
Set to static IP
bootproto= "Static"
To configure the IP address, IP field above the IP segment of the IPv4 we queried
ipaddr=192.168.254.129
Sub-off Network code
netmask=255.255.255.0
Default Gateway Segment
gateway=192.168.254.2
Access to DNS (not available for the current virtual machine system to access the extranet)
dns1=114.114.114.114
dns2=8.8.8.8
After modification:
Service Network restart Restart IP configuration
See if IP has been modified after completion
#ifconfig
And check if you can access the extranet
#ping www.baidu.com
Bridging mode, if bridged mode is used, the IP segment of the routing configuration is used as a reference, and no records and demonstrations are made here.
Linux virtual machine CentOs set static IP