Setting up dual ip address in ubuntu

Hi,

here is a simple way to setup dual ip in your ubuntu system if you already have eth0 as 192.168.0.10 then if you want 192.168.1.10 then use the following command to bring up a alias but this is temporary

sudo ifconfig eth0:0 192.168.1.11 up

To have a permanent dual ip update the /etc/network/interfaces file like the below

gksudo gedit /etc/network/interfaces

andadd the following content to the end of the file

auto eth0:0

iface eth0:0 inet static

address 192.168.1.10

netmask 255.255.255.0

broadcast 192.168.1.255

network 192.168.1.0

Save the file and restart system or restart the network using the following command

sudo /etc/init.d/networking restart

Permanent link to this article: https://blog.openshell.in/2011/08/setting-up-dual-ip-address-in-ubuntu/

Leave a Reply

Your email address will not be published.