Operating System - Tru64 Unix
1827712 Members
2659 Online
109967 Solutions
New Discussion

DNS Client - how does it work?

 
SOLVED
Go to solution
john_ ouellette
Advisor

DNS Client - how does it work?

Does a Tru65 5.1b DNS Client cache Data? Or does it continually make requests to the DNS server? Where is the DNS client binary located? And the cache if one exists? I have looked at docs, but haven't found the right one.....Thanks for any info!!!!

-john
2 REPLIES 2
Al Licause
Trusted Contributor
Solution

Re: DNS Client - how does it work?

Does a Tru65 5.1b DNS Client cache Data?

I have been told that it does, but it is also my experience that each request
even for repeated requests for the same address or name always generates
a request to the server. You can see this for yourself by running tcpdump
and tracing on port 53.


Where is the DNS client binary located? And the cache if one exists?

It is also my understanding that the client is not really a binary image,
but a system call, not to be confused with nslookup which is a binary image
in /usr/bin.

The system actually makes calls to gethostbyname() and gethostbyaddress()
when ever a program or user requests hostname or address information that
requires an dns lookup.


Perhaps someone more familiar with the code can correct any misinformation
I've posted.
Stuart Fuller_2
Valued Contributor

Re: DNS Client - how does it work?

Specifically, the user program calls the gethostbyname() and gethostbyaddress() to perform the lookups. These calls then refer to the /etc/svc.conf (or /etc/nsswitch.conf for newer versions) to figure out where to do the lookups. The common configuration in those .conf files is to look in the local file (/etc/hosts), and if not found, look on a DNS server (listed in /etc/resolv.conf).