IP Address Access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Folks,

I find myself in a bit of a quandary.  I have four CPUs in a rack, each with
two ethernet cards, and therefore two IP addresses.  My Client/Server
software would like to access each of the IP addresses as necessary
(redundancy, don't you know).  My laptop running Linux has the following
/etc/hosts file:

------------begin file-------------------------

127.0.0.1	localhost 

192.9.205.0	NFCSTEST

#Rack CPUs
192.9.205.1 NFCS-1.NFCSTEST NFCS-1
192.9.205.2 NFCS-1.NFCSTEST NFCS-1
192.9.205.3 NFCS-2.NFCSTEST NFCS-2
192.9.205.4 NFCS-2.NFCSTEST NFCS-2
192.9.205.5 NFCS-3.NFCSTEST NFCS-3
192.9.205.6 NFCS-3.NFCSTEST NFCS-3
192.9.205.7 NFCS-4.NFCSTEST NFCS-4
192.9.205.8 NFCS-4.NFCSTEST NFCS-4

#Test Laptop
192.9.205.13 C40NFCS.NFCSTEST C40NFCS

---------------end file-----------------------------

My C/S code on the laptop is written in Java and I'm trying to get both IP
addresses for each machine.  I am calling getAllByName() to do this, but I
never get more than one IP address returned, whether I use a name or IP
address as an argument.

I assume at this point that I have mis-created the /etc/hosts file for this
purpose, but I can't seem to find either a man page or a HOW-TO that tells
me how to properly access it.

Can someone out there help me?



   In Harmony's Way, and In A Chord,

   Tom  :-})

+-----------------------------------------------------+
| Thomas A. Condon   email: tcondon@kpt.nuwc.navy.mil |
| Computer Engineer  phone: (360) 315-7609            |
| Barbershop Singer  Sailor and Singer of Chanteys    |
|                    Left Handed and In My Right Mind |
+-----------------------------------------------------+

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux