DNS lookup with multiple IPs

Joseph S D Yao jsdy at cospo.osis.gov
Wed Jul 12 16:20:56 UTC 2000


On Wed, Jul 12, 2000 at 10:41:35AM +0200, Pat Verner wrote:
> I have a (mail) server which is configured with 6 IP addresses, 5 of
> which are on Local private network addresses, ie 192.168.[01235].18, and
> the last is the public internet address.
> 
> This allows for a number of projects, each of which uses a different
> Class-C address in these ranges to see the mail server as local to their
> particular subnet.
> 
> Each of the machines on the project subnet is supposed to be configured
> in such a way that their mail host is always 192.168.x.18 (where x is
> determined by the particular project), and similarly their default
> gateway and nameserver should always be configured as 192.168.x.1
> This gateway does an IP-Masquerade to the Internet, and will masquerade
> between the project networks, although this latter should only be the
> case if machines are incorrectly configured.
> 
> So far, so good.
> The internal DNS is configured to return all of the addresses for the
> host. I have always been under the impression that if a client goes a
> "gethostbname" and gets multiple responses, it checks first to see if
> one of the responses is on the local subnet, and if so will use that
> address in preference to any other.

Certain Unix programs may do this.  Not all programs will.

> I find however, that hosts seem to choose any of these addresses, and
> then try to use that address.  Because of the masquerading host, any of
> the addresses will reach the host succesfully, but obviously at the cost
> of going through the masquerade gateway, (which is running out of
> sockets!)
> 
> Is there any rule which should be followed in selecting a particular IP
> address from a list?  And are such rules implicit in the resolver, or
> must they be implemented in the client?

Best suggestion: have a different subdomain for each network, or at
least a different name for the mail server from each network.

-- 
Joe Yao				jsdy at cospo.osis.gov - Joseph S. D. Yao
COSPO/OSIS Computer Support					EMT-B
-----------------------------------------------------------------------
This message is not an official statement of COSPO policies.



More information about the bind-users mailing list