Configure Static IP CentOs 6.6 Minimal on vmware

after installing centos minimal on a vmware vmachine you will have no internet access at all, the default dhcp client on the vm should be started using command “dhclient” only.

this is good cause by default the network settings for a virtual machine on vmware is set on NAT. once we start the dhcp we can see the information needed for the static ip configuration using ifconfig.

to see what your current ip on dhcp is type:

[root@localhost ~]# ifconfig | grep addr

in this case the result for me was:

[root@localhost ~]# ifconfig | grep addr
eth0      Link encap:Ethernet  HWaddr 00:0C:29:B3:ED:01
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::20c:29ff:feb3:ed01/64 Scope:Link
          Interrupt:19 Base address:0x2000
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host

this means my ip address given through vmware dhcp server is What I want to do is to give the ip address of to my minimal machine. this will make it easier for future use.

there are few files that has to be edited. I usually use nano as the text editor, by default this does not come in centos minimal, so if you want to install it run “yum install nano -y”.

ok the first file we need to edit is the eth0 adapter file. it is located at: /etc/sysconfig/network-scripts/ifcfg-eth0

so to edit it with nano we need to run:

[root@localhost ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0

so at the end it should look like this:


notice I have changed the bootproto to none! now its time to edit “/etc/sysconfig/network”. use nano in the same way.

enter you gateway like this which in my case is :


after doing above it’s suggested you to add DNS servers to resolv.conf file within /etc/ directory.

Open “/etc/resolv.conf” and add dns server IP’s with “nameserver” before them, let say if you are going to use Google DNS servers which are &, the content of /etc/resolv.conf will be:


thats all. restart your network and you are good to go.



Incoming search terms:

  • centos 6 6 ip address
  • centos 6 6 network configuration
  • centos 6 static ip
  • Network configuration CentOS 6 6
  • centos 6 6 static ip
  • static ip centos 6 6
  • centos 6 6 interfaces with terminal
  • 6 6 ip configuration
  • install centos vmware ip address
  • vsphere 6 change database centos ip address

Join the Conversation


  1. in my case it was necesary to change the “ONBOOT=no” to “ONBOOT=yes” in order to make the network interface take the IP address i gave it when i restart the network service.

    All the other tips, work like a charm.

    Thnx a lot!

Leave a comment

Leave a Reply