Using the VMWARE+CENTOS6 environment, you can log in to the virtual machine using putty ssh, and don't know why you can't connect to it every time.
Under study, the IP address of CentOS eth0 in virtual machine is changed automatically once every time (automatically plus 1).
Baffled, today suddenly think of possible reasons, look, sure enough: VMware configured DHCP, as follows:
。
Learning environment, in order to avoid the subsequent trouble, Baidu looked at how to configure the environment as a static IP, record:
1. Remove the "Assign IP address to virtual machine using local DHCP service" check:
2. View the gateway IP under NAT mode:
The above VMware configuration is complete, and the rest is to configure CentOS.
3. Configure the CentOS Gateway
Vi/etc/sysconfig/network
4. Configure the CentOS network card
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
5, modify the resolv.conf
Vi/etc/resolv.conf
6. Restart the network card
Service Network restart
VMware NAT static IP configuration