gethostbyaddr

Barry Margolin barmar at alum.mit.edu
Tue Apr 27 19:22:27 UTC 2004


In article <c6m33t$1b7a$1 at sf1.isc.org>, jose.a.campos at exxonmobil.com 
wrote:

> Hello,
> I've got a problem with this function. This has been discussed here before
> but I could not find a resolution.
> I'm running on HPUX 11 - bind 4.9.
> 
> Looks like the function is running in what's been called 'paranoid mode' -
> it invokes gethostbyname, and if the IP addresses do not match, it'll flag
> it as an error.  I know the A and PTR records should match, but in my case
> I'm dealing with router interfaces and my monitoring tool gets very upset
> when finding multiple 'A' records for the same device.  So, I only have one
> 'A' record, but mant PTR records that point to the same name.
> 
> Anyhow, gethostbyaddr flags this as an error.  It's been mentioned here
> before that this 'paranoid mode' can be disabled - ie, it won't call
> gethostbyname.  Does anyone know how to disable it ?

This isn't a direct answer to your question, but a suggestion for a 
different naming scheme.  I believe this is a better setup, and it also 
resolves the "paranoid mode" problem.

Create a separate name for each router interface, e.g. routername-s0 for 
serial0, routername-s1 for serial1, routername-e0 for ethernet0, etc.  
These names will each have a single, consistent A and PTR records.

To avoid having to type these longer names when using things like 
telnet, create an alias with just the router name, that points to one of 
the interface names (if you use loopback interfaces, this is a good one 
to use).  Or if you want this name to automatically fail over among the 
addresses, you can keep this name with multiple A records.  So you might 
have something like:

router IN A 1.2.3.4
       IN A 5.6.7.8
router-s0 IN A 1.2.3.4
router-e0 IN A 5.6.7.8

4.3.2.1.in-addr.arpa. IN PTR router-s0.<yourdomain>
8.7.6.5.in-addr.arpa. IN PTR router-s0.<yourdomain>

The advantage of this is that output of programs like traceroute will 
clearly indicate which interface was involved.

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


More information about the bind-users mailing list