In this tutorial, I will show you how to convert from DHCP to Static IP address in CentOS 6.5. In CentOS, Fedora or RHEL, you can configure network interfaces by using configuration files located in:
DEVICE=eth0 HWADDR=08:00:27:76:4c:d5 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPV6INIT=no USERCTL=no NM_CONTROLLED=yes PEERDNS=yes IPADDR=192.168.174.128 NETMASK=255.255.255.0
Configure Default Gateway:
Edit the network file:
NETWORKING=yes HOSTNAME=centos6.5 GATEWAY=192.168.1.1
Configure DNS Server:
nameserver 188.8.131.52 # Replace with your DNS1 nameserver 192.168.1.1 # Replace with your DNS2
Restart Network Interface:
# /etc/init.d/network restart
Check it now:
Now check the connectivity:
Done, This was all about setting static IP in CentOS 6.5.
You may also like to know how to reset forgotten root password in CentOS . So, do check it out.
Give your opinion below if you experience any issues or to discuss your ideas and experiences.