Configure Static IP Address in CENTOS

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

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.2.255
HWADDR=00:00:00:00:00:00
IPADDR=192.168.2.123
IPV6ADDR=192.168.2.123/64
IPV6INIT=yes
DNS1=8.8.8.8
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=yes

then restart the service

/etc/init.d/network restart

Leave a Reply