Setup Virtual IP Address in Ubuntu Jaunty (9.04)


For your ubuntu, is more than one ip address (second IP address), you simply edit /etc/network/interface file, for more complete and he went on, we follow these steps:
Login as root by type :

$ sudo su
$ gedit /etc/network/interfaces



auto eth0
iface eth0 inet static
address 192.168.2.3
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x

 # add following line to last. for second ip address

auto eth0:1
iface eth0:1 inet static
address 192.168.2.30
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
 After you added the following line, restart your network service by type :

$ /etc/init.d/networking restart


Happy Testing...!!

1 comment:

  1. This blog is helpful for those how are new to Ubuntu. Ubuntu is little bit different then other OS. Its not user friendly.

    ReplyDelete

Please Comment...!!