Additional Ip Address
After you’ve requested an additional IP address, there are a few steps you need to take to start using it. You’ll need to add an ‘alias’ ethernet device, and start it up.
This is easy:
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0:0
NOTE:The “:0” is your first alias address. Future addresses would be :1,:2,etc.
Add the folowing:
DEVICE=eth0:0 BOOTPROTO=static ONBOOT=yes IPADDR=xxx.xxx.xxx.xxx # Replace with your second assigned assigned IP NETMASK=255.255.255.0
Now run:
sudo /sbin/ifup ifcfg-eth0:0
Your second IP is now functional.
As a last step, verify that the file /etc/init.d/ifaliases exists on your server.
If not, run this to ensure the new interface to starts on boot:
sudo su -
wget http://pastie.caboo.se/108892.txt
mv 108892.txt /etc/init.d/ifaliases
chmod +x /etc/init.d/ifaliases
chkconfig ifaliases on
exit
