LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-23-2009, 01:32 PM   #1
scottyp55
Member
 
Registered: Oct 2009
Posts: 53

Rep: Reputation: 21
Change client-side DNS cache time out value


Hello,

My problem is that I have 2 domain controllers/DNS servers and when one goes down, clients hang on to the DNS cache for 1 day (by default on Windows) so they don't automatically find the other DNS server. I was able to find this setting on Windows machines in the registry and change it to a lower value, but i also have Linux servers using these for DNS. Does anyone know how I can make these changes on Red Hat Linux?

Thanks,
Scott
 
Old 10-23-2009, 01:37 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,993
Blog Entries: 5

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
You would set it in /etc/resolv.conf.

From "man resolv.conf" on CentOS 5:

Quote:
timeout:n
sets the amount of time the resolver will wait for a
response from a remote name server before retrying the
query via a different name server. Measured in seconds,
the default is RES_TIMEOUT (currently 5, see <resolv.h>).
 
Old 10-23-2009, 04:05 PM   #3
scottyp55
Member
 
Registered: Oct 2009
Posts: 53

Original Poster
Rep: Reputation: 21
Thanks. I'll give that a shot.
Is the n value seconds? The default of 5 seems quick, considering Microsoft's is 24 hrs.
 
Old 10-26-2009, 12:09 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,993
Blog Entries: 5

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
It is seconds.

24 hours seems extremely long. If you had one DNS server down would you really want to wait a whole day before another DNS server responded?

I suspect you're confusing TTL (time to live) settings with client side lookup. The client uses what is called a stub resolver. DNS servers often cache records as well. The TTL deals with how long to cache a record before asking again. Windows clients (stub resolvers) do cache entries however, UNIX/LINUX clients don't typically cache - they always ask the question of the name server which itself might have cached the answer.

So the TTL deals with how long to cache an answer once you've gotten it.

The timeout I mentioned in my prior response deals with how long to wait until you ask a different server which isn't the same thing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tweaking dhcp client configuration to change the default DNS servers to Open DN LXer Syndicated Linux News 0 08-14-2009 02:10 AM
Bind takes long time to replicate A record change to secondary DNS server tech_contact Linux - Networking 3 10-23-2007 07:14 AM
Client DNS Cache-ing krmayfield Linux - Networking 1 01-13-2006 10:23 AM
dns entry - client side without proxy basbosco Linux - General 0 03-08-2004 04:57 AM
Dynamic DNS Troubles (client-side) samus8zero2x Linux - Networking 2 02-26-2004 11:52 AM


All times are GMT -5. The time now is 05:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration