Hi
How can I set the NAV 3.6, to use /etc/hosts file instead of dns server names in the column Name in the report.
Med vennlig hilsen / Best Regards
Tor Pretorius Senior konsulent Data Instrumenttjenesten AS Frederik A. Dahlsvei 20 1432 Ås 91716759 / 64949840 www.it-as.nohttp://www.it-as.no/
On Thu, Oct 14, 2010 at 10:35:22AM +0200, Tor Pretorius wrote:
How can I set the NAV 3.6, to use /etc/hosts file instead of dns server names in the column Name in the report.
You can't. The report itself only lists the names stored in the database. Those names are set by ipdevpoll, which uses DNS reverse-lookups to find names.
Morten Brekkevold wrote:
On Thu, Oct 14, 2010 at 10:35:22AM +0200, Tor Pretorius wrote:
How can I set the NAV 3.6, to use /etc/hosts file instead of dns server names in the column Name in the report.
You can't. The report itself only lists the names stored in the database. Those names are set by ipdevpoll, which uses DNS reverse-lookups to find names.
But won't a DNS reverse lookup first look in /etc/hosts before querying the dns server? I thought that was default behaviour.
- Vidar
I don't know what changed from gDD to ipdevpoll regarding this, but in earlier versions, NAV would update the name of a switch if rDNS was broken the day you added the device in NAV - if you later fixed rDNS. And by adding the given host to /etc/hosts (give you have the right order in nsswitch.conf) shouldn't the same thing happen with ipdevpoll?
-Vidar
-----Original Message----- From: Vidar Faltinsen [mailto:vidar.faltinsen@uninett.no] Sent: 26. oktober 2010 18:09 To: Morten Brekkevold Cc: Tor Pretorius; nav-users@uninett.no Subject: Re: use the /etc/hosts file
Morten Brekkevold wrote:
On Thu, Oct 14, 2010 at 10:35:22AM +0200, Tor Pretorius wrote:
How can I set the NAV 3.6, to use /etc/hosts file instead of dns server names in the column Name in the report.
You can't. The report itself only lists the names stored in the database. Those names are set by ipdevpoll, which uses DNS reverse-lookups to find names.
But won't a DNS reverse lookup first look in /etc/hosts before querying the dns server? I thought that was default behaviour.
- Vidar
On Wed, Oct 27, 2010 at 09:09:43AM +0200, Stokkenes Vidar wrote:
I don't know what changed from gDD to ipdevpoll regarding this, but in earlier versions, NAV would update the name of a switch if rDNS was broken the day you added the device in NAV - if you later fixed rDNS. And by adding the given host to /etc/hosts (give you have the right order in nsswitch.conf) shouldn't the same thing happen with ipdevpoll?
As I explained to the other Vidar, ipdevpoll doesn't use the socket library mechanisms for DNS lookups, since it needs to work asynchronously. /etc/nsswitch.conf is irrelevant in this case.
On Tue, Oct 26, 2010 at 06:09:10PM +0200, Vidar Faltinsen wrote:
You can't. The report itself only lists the names stored in the database. Those names are set by ipdevpoll, which uses DNS reverse-lookups to find names.
But won't a DNS reverse lookup first look in /etc/hosts before querying the dns server? I thought that was default behaviour.
Not for a DNS protocol client. It doesn't know about /etc/hosts, it just talks DNS over IP.
ipdevpoll uses Twisted's names framework, which has multiple resolvers. The primary resolver is a DNS protocol client. The secondary is a '/etc/hosts' resolver, but apparently, this doesn't support reverse lookups using /etc/hosts, only forward lookups.
This will need further investigation before we can conclude.
On 2010-10-14 10:35, Tor Pretorius wrote:
Hi
How can I set the NAV 3.6, to use /etc/hosts file instead of dns server names in the column Name in the report.
Hi,
I have a defective corporate DNS so I hacked toghether something who dumps the netbox-info from NAV, asks each device it's SNMP-hostname and builds a bind-configuration who overrides those records in the corporate DNS.
Drop me an email if you'd like a copy of the script. It's about 130ish lines of perl and you need to know a bit of bind configuration.
Cheers,
-Sigurd