Centos-6.5-Static-IP-Address

Centos how to make Centos 6.5 have static IP address

By default the Centos 6.5 doesn’t activate or configure the Ethernet card.

This page is a tutorial on how to configure Centos 6.5  to turn on this service at bootup and to have static IP address.


Step 1

Edit the file:

etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=yes

BOOTPROTO=static

IPADDR=192.168.0.5

NETMASK=255.255.255.0

(Of course your IP address should reflect your own setup configuration).


Step 2

Edit the file:

etc/sysconfig/network

GATEWAY=192.168.0.255

(Of course your GATEWAY configuration may differ from the one above).


Step 3

Edit the file:

etc/resolve.conf

NAMESERVER 192.168.0.1

NAMESERVER 8.8.8.8

This id the default name servers to resolve DNS. 8.8.8.8 can be used as it is googles public DNS server.


Step 4

Restart the network service to enable the new configuration