Here  I am going to show how to configue your pc to get two ip adresses.

First of all some basic information.

Information about /etc/hosts file

 This file contains IP addresses and their corresponding hostnames.

When your system tries to resolve a hostname to an IP address or determine the hostname for an IP address, it refers to the /etc/hosts file before using the name servers. If the IP address is listed in the /etc/hosts file, the name servers are not used. If your  network contains computers whose IP addresses are not listed in DNS, add them to the /etc/hosts file.

Never remove the localhost entry. Even if the system does not have a network connection or have a network connection running constantly, some programs need to connect to the system via the localhost loopback interface.

Information about /etc/host.conf file

To change lookup order, edit the /etc/host.conf file. The line order hosts, bind  specifies that the /etc/hosts takes precedence over the name servers. Changing the line to order bind, hosts configures the system to resolve hostnames and IP addresses using the name servers first. If the IP address cannot be resolved
through the name servers, the system then looks for the IP address in the /etc/hosts file.

For my objective I used NEAT  "Network Administration tool" in linux

The interface of neat looks like this.
I have captured this image using GIMP

image


From this I could obtain the ip adresses of all machines connected to the network in eclass.
They are as follows.
   
     
192.168.168.168.2
eclass.csa.iisc.ernet.in
eclass
192.168.168.168.11
ashwini.csa.iisc.ernet.in ashwini
192.168.168.168.12
bharani.csa.iisc.ernet.in
bharani
192.168.168.168.13
rohini.csa.iisc.ernet.in
rohini
192.168.168.168.14
punarvasu.csa.iisc.ernet.in
punarvasu
192.168.168.168.15
hastaa.csa.iisc.ernet.in
hastaa
192.168.168.168.16
chitta.csa.iisc.ernet.in
chitta
192.168.168.168.17
swati.csa.iisc.ernet.in
swati
192.168.168.168.18
anooradha.csa.iisc.ernet.in
anooradha
192.168.168.168.19
jyeshta.csa.iisc.ernet.in
jyeshta
192.168.168.168.20
moola.csa.iisc.ernet.in
moola
192.168.168.168.21
shravana.csa.iisc.ernet.in
shravana
192.168.168.168.22
dhanishta.csa.iisc.ernet.in
dhanishta
192.168.168.168.23
kritika.csa.iisc.ernet.in
kritika
192.168.168.168.24
pushya.csa.iisc.ernet.in
pushya
192.168.168.168.25
aalesha.csa.iisc.ernet.in
aalesha
192.168.168.168.26
revathi.csa.iisc.ernet.in
revathi
192.168.168.168.27

This is the other ip adress
I created for pushya
pushya.csa.iisc.ernet.in
pushya
 

Device Alias:

Device aliases are virtual devices associated with the same physical hardware, but they can be activated at the same time to have different IP addresses. They are commonly represented as the device name followed by a colon and a number (for example, eth0:1). They are useful if you want to have multiple IP address for a
 system, but the system only has one network card.

After configuring the Ethernet device, such as eth0, to use a static IP address (DHCP does not work with aliases), go to the Devices tab and click New. Select the Ethernet card to configure with an alias, set the static IP address for the alias, and click Apply to create it. Since a device already exists for the Ethernet card, the one just created is the alias such as eth0:1.

After following these instructions the resulting figure is depicted below:

image

Verification:


To verify that the alias has been activated, use the command

    /sbin/ifconfig. 
OUTPUT:

eth0    Link encap:Ethernet  HWaddr 00:08:A1:3E:77:D5
          inet addr:192.168.168.24  Bcast:192.168.168.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:256520 errors:0 dropped:0 overruns:0 frame:0
          TX packets:345587 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:86050713 (82.0 Mb)  TX bytes:186131503 (177.5 Mb)
          Interrupt:22 Base address:0xac00
 
eth0:1 Link encap:Ethernet  HWaddr 00:08:A1:3E:77:D5
          inet addr:192.168.168.27  Bcast:192.168.168.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:256520 errors:0 dropped:0 overruns:0 frame:0
          TX packets:345587 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:86050713 (82.0 Mb)  TX bytes:186131503 (177.5 Mb)
          Interrupt:22 Base address:0xac00
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:471436 errors:0 dropped:0 overruns:0 frame:0
          TX packets:471436 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:190307031 (181.4 Mb)  TX bytes:190307031 (181.4 Mb)