Setting up Second IP address or Virtual IP address in Ubuntu
If you want to configure more Static IP address you need to edit the /etc/network/interfaces and you need to enter the following lines replace eth0 with your network interface card

 For your first interface you have:

 

 

sudo vi /etc/network/interfaces

# The primary network interface

auto eth0
iface eth0 inet static
address 192.168.3.90
gateway 192.168.3.1
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255

 

To assign a second ipaddress to your  machine  you need to edit the /etc/network/interfaces file. The second IP is named eth0:, the thirs eth0:2 and so on... So just add them in the file:

 

 

sudo vi /etc/network/interfaces

auto eth0:1
iface eth0:1 inet static
address 202.170.126.175
netmask 255.255.255.128
gateway 202.170.126.254

 

After entering all the details you need to restart networking services using the following command

sudo /etc/init.d/networking restart