Set static IP in centos6.7 in VMware

Source: Internet
Author: User


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

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.