[TriLUG] resolving hostnames

Chris Merrill cmerrill at nc.rr.com
Tue Jul 1 13:45:40 EDT 2003


If I have multiple IP addresses aliased to a single adapter (i.e. eth0:0
and eth0:1, etc) and have then assigned to the same hostname in /etc/hosts:
   192.168.1.51    testhost
   192.168.1.52    testhost
   192.168.1.53    testhost
how can I verify that testhost is 'registered' to all those addresses
within the Linux networking config?

In more detail:  There is a Java API to get the list of addresses that
are associated with a hostname.  On our RH box, this correctly returns
a list of IP addresses...on another it does not (a customer's box, of
course).  I'm trying to verify that the customer has properly configured
the addresses.  Other than looking at /etc/hosts, is there a way to
get this information.  For instance, IFCONFIG tells me exactly what
configuration the network service is using, rather than what's in the
config files.

I hope that made sense...

TIA,
Chris

*********************************
Chris Merrill
cmerrill at nc.rr.com
*********************************




More information about the TriLUG mailing list