Skip to main content

IP ALIASING -CREATING OR ADDING NEW NETWORK ALIAS TO A NETWORK CARD


Centos:
In linux we can add multiple ip to a single nic card.
#cd /etc/sysconfig/network-scripts/
#vi ifcfg-eth0


#cp ifcfg-eth0 ifcfg-eth0:1
Change the ip,device

Similarly for third ip again copy ifcfg-eth0 as ifcfg-eth0:2 and make necessary changes inside file as above.
#service network restart
#ifconfig.
Now we can see multiple ip assigned to it

Ubuntu:
In ubuntu the network configuration file is /etc/network/interfaces.Open it and make necessary changes as follows
#vi /etc/network/interfaces
The default file will be as follows:

Make changes to obtain configuration as follows


#service networking restart