nat+ has been used to automatically obtain HDCP mode, theoretically so that the virtual machine can be connected to the network, and the IP is fixed, and so used for a period of time. But later found that the IP will still change, the use of inconvenient.
The following is The configuration of our virtual machines using nat+ to set the static IP mode.
1. First Configure our VMnet8 nic on our window,
Set as follows:
2.edit->virtual Network Editor
Select VMnet8and remove the use local DHCP service to distribute IP address to VMs option. Click NAT Settings to view the GATEWAY Address:
Click OK to do it.
To set up a CentOS static IP:
Three configuration files are involved, namely:
/etc/sysconfig/Network/etc/sysconfig/network-scripts/ifcfg-eth0/etc/resolv.conf
First Modify /etc/sysconfig/network as follows:
networking=Yes
HOSTNAME=Localhost.localdomain
gateway=192.168. - . 2
Specifies the gateway address.
Then modify the /etc/sysconfig/network-scripts/ifcfg-eth0:
device= "Eth0"
#BOOTPROTO="DHCP"
bootproto= "Static"
ipaddr=192.168. - . 121
netmask=255.255.255.0
HWADDR="00:0c:29:56:8f:ad"
Ipv6init="No"
nm_controlled="Yes"
Onboot="Yes"
TYPE="Ethernet"
UUID="BA48A4C0-F33D-4E05-98BD-248B01691C20"
dns1=192.168. - . 1
Note : here DNS1 is required to be set otherwise the domain name resolution cannot be performed.
Last configuration under /etc/resolv.conf:
nameserver 192.168 . - . 1
In fact, this step can be omitted, the above set the DNS Server address after the system will automatically modify this configuration file.
This is very simple after a few steps, the IP of the virtual machine has been 192.168. It's 20.121.
Set static IP in centos6.7 in VMware