Previously, VMware dhcp was used for dynamic allocation, but the IP address is easily changed. In the case of multiple virtual machines, IP address changes are not conducive to testing.
At first, I wanted to bind an IP address and a MAC address, but I didn't find any related options. If anyone knows how to configure it, please let me know, thanks.
Configure the eth0 Nic in linux:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
ONBOOT = yes
HWADDR = XX: XX
BOOTPROTO = static
IPADDR = 192.168.161.141
NETMASK = 255.255.255.0
GATEWAY = 192.168.161.2 www.2cto.com
DNS1 = 8.8.8.8
====================
HWADDR: Check the vmx file of the VM for the mac address, which has the mac definition. Follow this value; otherwise, the NIC cannot be found.
GATEWAY: GATEWAY. view the NET configuration of the VM.
DNS1: I chose google DNS. Who should say yes?
Service network restart
From the column of ylqmf