Change your Network IP with CentOS

For some purpose, you might want to change the Network IP from your CentOS server such as switching the data center, etc.

To done this, just simply check your main network interface with typing ifconfig from the server.Then get the network interface name.

Next, edit the file from
/etc/sysconfig/network-scripts/ifcfg-<interface-name>

You shall see the following setting.
# Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
BROADCAST=127.0.0.255
HWADDR=00:e0:81:c0:b1:ae
IPADDR=127.0.0.100
NETMASK=255.255.255.0
NETWORK=127.0.0.0
ONBOOT=yes
GATEWAY=127.0.0.1
TYPE=Ethernet

Change the IPADDR to the new server IP.

Note: You might need to change the Broadcast, Netmask, Network or Gateway with the need.

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.