1. Click Edit in VMware-Virtual Network Editor
2. In the virtual network editor, select the bridge mode
3. View the network configuration file :
cd /etc/sysconfig/network-scripts
ll
You can see that there are two files ifcfg-ens33 and ifcfg-lo at the top, mainly focusing on ifcfg-ens33
4. View the ip address :
ip addr
you can see the name of the network card corresponding to the above, mainly focusing on the mac address and ip address
5. Modify ip address :
vim /etc/sysconfig/network-scripts/ifcfg-ens33
(Note: use the administrator to edit , or can only be read but not changed, switch administrator command: su root
)
Will be BOOTPROTO="static"
changed to static , so that the ip address will not be dynamically allocated, that is, it will not change
The following part, if there is, modify it, if not, add it in
IPADDR=192.168.0.244
//this is the ip address given by yourself
GATEWAY=192.168.0.1
//gateway, write your own
DNS1=218.104.111.114
//network service provider DNS
NETMASK=255.255.255.0
//subnet mask
HWADDR=00:0c:29:13:b4:c4
//mac address queried above , Paste it
6. Restart the network card :
ifdown ens33
ifup ens33
7. Check the ip address again :
ip addr
You can see that the ip address has been modified to what you want (if it is still the original address, then restart the network card a few times, if it still fails, check the network configuration file)
Any questions are welcome to discuss. much love!