Add N Number of Ip's in Linux

How to Ad Ip Address

First, Login as root through ssh and change the current working directory to /etc/sysconfig/network-scripts

cd /etc/sysconfig/network-scripts

Second, find what network adapter is currently been used in your server:

ls ifcfg-* 

Third, In the above figure you can see ifcfg-eth0  ifcfg-lo  ifcfg-venet0 are shown but one must be your working adapter. To find that out use the command below:


In above figure your can see your Ethernet eth0 is having your server main ip address. So we will configure using that.

Fourth, you have to make a clone of etho and name it as eth0:0 using the command below:

cp ifcfg-eth0 ifcfg-eth0:0

Fifth, edit ifcfg-eth0:0 and change DEVICE to eth0:0 and change IPADDR to new ip address you want to add. See the picture below:

Sixth, Now everything is done and you just need to take the ip address live using the command below:

ifup eth0:0

Just follow step fourth to sixth to add N numbers of ip's by adding n number of interface to your server.

If you hang somewhere feel free to contact our support.
  • 1 Users Found This Useful
Was this answer helpful?