Configure a fixed IP address for the vmwarevm centos

Source: Internet
Author: User
1. first, vmware needs to set it to the bridging mode so that the virtual machines are regarded as a computer with the host in a LAN, and then in centos, it can be set like the host in a LAN, for example, the host Ip address is 192.168.1.8, the gateway is 192.168.1.1, then centos is set as follows: vim/etc/sysconfig/network-scripts/ifcfg-eth0DEVIC

1. first, vmware needs to set the bridging mode.

In this way, virtual machines are regarded as a computer with the host in a LAN.

In centos, you can set the Ip address of the host in the same LAN as that of the host. for example, if the Ip address of the host is 192.168.1.8 and the gateway is 192.168.1.1, then centos is set as follows:

Vim/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE = "eth0"
BOOTPROTO = "static"
HWADDR = "00: 0C: 29: 4F: 6C: CA"
IPV6INIT = "no"
NM_CONTROLLED = "yes"
ONBOOT = "yes"
TYPE = "Ethernet"
UUID = "5b994a6b-e8ae-4b12-8bd3-42f40292ebae"
IPADDR = 192.168.1.69
NETMASK = 255.255.255.0
GATWAY = 192.168.1.1
DNS1 = 192.168.1.1
DNS2 = 58.20.127.170

 

Save and execute service network restart.

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.