Set a fixed IP address for centos in vmwarevm

Source: Internet
Author: User

Because you need to configure a fixed IP address, I found a feasible example on the Internet for a long time and configured it myself.

1. First obtain your gateway

To facilitate later use in CentO system configuration, select the menu bar: Edit-> Virtual Network Editor

Select vmnet8 and click Nat settings to view the gateway address. The gateway IP address here is 192.168.110.2.

Next, you can go to the topic.

2. Set the centos static IP Address:

Three configuration files are involved:

/Etc/sysconfig/Network

/Etc/sysconfig/network-scripts/ifcfg-eth0

/Etc/resolv. conf

A. First Modify/etc/sysconfig/network as follows:

Specify the gateway address.

B. Then modify/etc/sysconfig/network-scripts/ifcfg-eth0:

C. Finally, configure/etc/resolv. conf: (in fact, this step can be omitted. After the DNS server address is set above, the system will automatically modify this configuration file .)

After a few steps, the IP address of the VM is 192.168.110.129.

After the IP address is fixed, you can set the host

 

Finally, we need to change the network connection mode of the virtual machine configuration to the NAT mode.

Reference self-http://www.centoscn.com/image-text/config/2014/0617/3148.html

Set a fixed IP address for centos in vmwarevm

Related Article

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.