How To Configure Static IP On CentOS 6.5

In order to set static IP and complete this configuration, You will need the following information:
– IP Address
– Netmask
– Gateway Address
– DNS Server Addresses

Step-1: First you have to stop NetworkManager:

Step-2: Make sure NetworkManager does not start at boot:

Step-3: Make sure the network service is set to start at boot:

Now NetworkManager is out of the way we need to edit these three files.
1. /etc/sysconfig/network-scripts/ifcfg-eth0
2. /etc/sysconfig/network
3. /etc/resolv.conf

First of all edit “/etc/sysconfig/network-scripts/ifcfg-eth0” file to configure eth0:

Note: change IP address according to you.

Configure Default Gateway by editing “/etc/sysconfig/network” file:

Note: change IP address according to you.

Restart Network Interface

Add these lines to “vi /etc/resolv.conf” to configure DNS Server

Note: change IP address according to you.

About the author

Ishtiyaq Husain

Ishtiyaq Husain is a Software Engineer and founder of Lessons4you.info. He has been in the field nearly 10+ years, and have been loving every minute of it. He is a Blogger, YouTuber, Developer, Thinker, and Photographer.