Two commands:

$ /sbin/ifconfig eth0:0
$ /sbin/route add -host dev eth0:0

(replace that IP with the one you’d like to add)
This change will no longer be in effect after rebooting. Therefor you must add the two commands to the bottom of your /etc/rc.local file. Your NIC should now be listening and responding on both this and the original IP address found in /etc/sysconfig/network-scripts/ifcfg-eth0

If you want to add add more than one additional IP address, continue like this:

$ /sbin/ifconfig eth0:0
$ /sbin/ifconfig eth0:1
$ /sbin/ifconfig eth0:2
$ /sbin/route add -host dev eth0:0
$ /sbin/route add -host dev eth0:1
$ /sbin/route add -host dev eth0:2

Post By Editor (2,827 Posts)

Website: →