DNS lookup with multiple IPs

Pat Verner pat at isis.co.za
Wed Jul 12 08:41:35 UTC 2000


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.

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?

Any advice would be appreciated.

Regards
=Pat 




More information about the bind-users mailing list