From: peter@abbnm.com (Peter da Silva)
Subject: Re: gethostbyname returns only single IP address
Date: Sat, 24 Apr 2004 01:32:44 +0000 (UTC) [thread overview]
Message-ID: <c6cg3s$im6$1@jeeves.eng.abbnm.com> (raw)
In-Reply-To: 5d1678ff.0404230504.2eb35ac4@posting.google.com
In article <5d1678ff.0404230504.2eb35ac4@posting.google.com>,
Calista <calista_heart@yahoo.com> wrote:
> hostname is passed to this function.
The name "gethostbyname" is deceptive, because in DNS hosts don't
have name, interfaces do.
Typically the interfaces on a multihomed host are given a name like:
hostname.subnet1.dom.ain
hostname.subnet2.dom.ain
By convention, one of these interfaces is often considered the "primary"
interface, and the machine is referred to by that name, but there's no
such thing in DNS.
> Now I print all IP addresses. It prints only one IP address although my
> machine has multiple interfaces (two ip addresses).
DNS doesn't know that the machine has multiple interfaces, though.
You need to talk to the people who designed the DNS namespace to find out
whether there's some name that's had both interfaces assigned to it (for
example, for quick-and-dirty round-robin load-balancing).
--
I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
of London. I've watched kite-strings glitter in the sun at Hyde Park Gate. All
these things will be lost in time, like chalk-paintings in the rain. `-_-'
Time for your nap. | Peter da Silva | Har du kramat din varg, idag? 'U`
next prev parent reply other threads:[~2004-04-24 1:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-22 15:43 gethostbyname returns only single IP address Calista
2004-04-23 1:42 ` Stuart Fuller
2004-04-23 13:04 ` Calista
2004-04-24 1:32 ` Peter da Silva [this message]
2004-04-26 14:05 ` Brian Haley
2004-04-26 20:54 ` Calista
2004-04-26 22:51 ` Brian Haley
2004-04-27 16:54 ` Calista
2004-04-27 20:36 ` Brian Haley
2004-05-03 3:15 ` Peter da Silva
2004-04-23 13:15 ` Calista
2004-04-23 20:43 ` Rick Jones
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox