Setting multiple IPs on Linux or in this case Debian is rather straight forward… All the network info is stored in the file /etc/network/interfaces and you just need to add the info to the file…
Before making changes to this file, I recommend you check your values at least 3 times! If you have made a mistake and trying to do it from a remote location, YOU WILL LOCK YOURSELF OUT!
This is a sample configuration with device eth0 having the IP address of 192.168.1.2 on a Class C Network with 192.168.1.1 as the default gateway.
/etc/network/interfaces – configuration file for ifup(8), ifdown(8)
# the loopback interface
iface lo inet loopback
iface eth0 inet static
In order to add multiple IPs to the same interface, In this case eth0 You need to add it in the following method…
iface eth0:0 inet static
iface eth0:1 inet static
iface eth0:2 inet static
Thats it, after you have made all the necessary changes, you need to restart the networking by issueing the following command…
# /etc/init.d/networking restart