How can I add an IP address to my Linux Server


Adding an IP address to a CentOS server is very easy.
Go to the network configuration directory /etc/sysconfig/network-scripts
Create a file with the name ifcfg-eth0:1 (This file increments, so if you already have several IP addresses you need to add the next increment, such as ifcfg-eth0:3 for the 4th IP)
Paste the following contents into the file:
DEVICE=eth0:1
BOOTPROTO=static
IPADDR=
ONBOOT=yes
Adding an IP address to a CentOS server is very easy.
  • Go to the network configuration directory /etc/sysconfig/network-scripts
  • Create a file with the name ifcfg-eth0:1 (This file increments, so if you already have several IP addresses you need to add the next increment, such as ifcfg-eth0:3 for the 4th IP)
  • Paste the following contents into the file:
DEVICE=eth0:1
BOOTPROTO=static
IPADDR=YOUR_NEW_IP_HERE

ONBOOT=yes


  • In order for the IP change to effect, you can either reboot your server or you can run the following command:
ifconfig eth0:1 up

This article has been provided by Codero Hosting, the leading provider of reliable dedicated, managed and cloud hosting services. Need more information on this topic or to learn more about Codero’s hosting services please visit 
www.codero.comchat with us online or give us a call at 866-2-CODERO. Posted in
Last update:
2015-12-03 20:39
Average rating:0 (0 Votes)