VMware NAT static IP configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.