We've had a client ask a question about DNS Caching and NetDB.
When does NetDB do a reverse lookup to find the hostname of a visible ip address? Does it do it at the time of the scan? And if so does it cache the result??
I want to know for instance if NetDB logs into a switch and gets the mac address and ip address at 6am and finds:
Ip address 1.1.1.1 on Switch 1 Port 1, does a reverse lookup and Sees HostnameA against it
When NetDB goes back and does a scan at 7am and finds:
IP address 1.1.1.2 on Switch 1 Port 1, does a reverse lookup and sees Hostname B against it.
Is the DNS lookup done at the time of the scan/logon or at the time that we've logged into NetDB to lookup the details.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So NetDB does a reverse lookup on every IP it doesn't have a hostname for every time it runs an update. Once a hostname has been learned, it is only updated with the netdbctl -f update. I have this set in my /etc/crontab to do an update once a day.
You could schedule a full reverse lookup once an hour or during every update if you append the -f flag to your update routine in the crontab. Just be aware of the increased load on your DNS server of course. Also keep in mind if you are using a local caching DNS server and the record is updated on your authoritative server, it may take a while to cache out if NetDB is not pointed to the authoritative server.
Hope this helps,
Jonathan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We've had a client ask a question about DNS Caching and NetDB.
When does NetDB do a reverse lookup to find the hostname of a visible ip address? Does it do it at the time of the scan? And if so does it cache the result??
I want to know for instance if NetDB logs into a switch and gets the mac address and ip address at 6am and finds:
Ip address 1.1.1.1 on Switch 1 Port 1, does a reverse lookup and Sees HostnameA against it
When NetDB goes back and does a scan at 7am and finds:
IP address 1.1.1.2 on Switch 1 Port 1, does a reverse lookup and sees Hostname B against it.
Is the DNS lookup done at the time of the scan/logon or at the time that we've logged into NetDB to lookup the details.
Chris,
So NetDB does a reverse lookup on every IP it doesn't have a hostname for every time it runs an update. Once a hostname has been learned, it is only updated with the netdbctl -f update. I have this set in my /etc/crontab to do an update once a day.
5 13 * * * netdb /opt/netdb/netdbctl.pl -f -k /var/lock/netdb-dns-force.lock > /dev/null
You could schedule a full reverse lookup once an hour or during every update if you append the -f flag to your update routine in the crontab. Just be aware of the increased load on your DNS server of course. Also keep in mind if you are using a local caching DNS server and the record is updated on your authoritative server, it may take a while to cache out if NetDB is not pointed to the authoritative server.
Hope this helps,
Jonathan