Solved

How can I refresh/flush DNS on UNIX without rebooting?

Posted on 2004-04-22
8
48,987 Views
Last Modified: 2013-12-23
How can I refresh/flush DNS on UNIX without rebooting?

Terminating and restarting inet process doesn't work - machine needs to be rebooted afterwards.
System availability must be above 99,6% so I need to avoid rebooting. The DNS refreshes automatically after approximately 30 Minutes but business demands faster access...

So if you know how i can flush/refresh DNS pls write back.
0
Comment
Question by:Scypher
  • 3
  • 3
  • 2
8 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 10890751
Are we talking about a DNS server or client?

On a DNS server stopping and restarting named will clear out any cached information it may have.  However, on a server and a client the cached information may be further upstream and you simply have to wait for the TTL for the data to expire.

Also, the cache may not be in DNS. If the system runs nscd it may be caching the information.
0
 

Author Comment

by:Scypher
ID: 10891005
I am talking about a 2 Server Solution - Client gets IP from W2K Server and Unix (Reliant RM400) is used for other applications and printing over xprint spooler.
If the client IP is changed by the W2K and is sending a print job to the spooler on the Unix Server, xprint receives the job, works on it and tries to send it back to the client by dns name => due to the changed ip the Unix server can't look up the client and xprint gives an error, saying that the client cannot be reached. Writing the IP of the Client into the hosts is not an option.

I don't really know what "named" you mean ( /etc/named.boot is the only i know so far ;) ) and what it does - so far we tried to kill the inet process with flag -15 but it simply doesn't restart...

TTL is about 30 Minutes which is not the satisfying option we are searching for - users with notebooks who change servers alot a day don't really have time to wait for max. 30mins to print ;)

nscd? Sorry 4 being noob :/

something like ipconfig /flushdns would be perfekt ;)
0
 
LVL 9

Expert Comment

by:Alf666
ID: 10892352
You can change your TTL to 1 minute (or 30 seconds).

It will increase network traffic though.

You could also check on the box (which OS is that ?) if it runs a caching daemon.

Many (like Solaris) run something called nscd.

In this case, edit /etc/nscd.conf, and set enable-cache for hosts to no.
0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
LVL 40

Expert Comment

by:jlevie
ID: 10892757
You can even set the TTL on the W2K server down to 0, which will increase the DNS traffic but allow the Unix box to track changes as they occur.

Do look at nscd and see if it is caching hosts data. It is the most likely cause of your problem.
0
 

Author Comment

by:Scypher
ID: 10896606
It's Reliant Unix by Siemens Release 5.43/C3002 running on a RM400 Server.

Setting the TTL permanently to 1 would be impossible - the network is large and hundrets of servers correspond over hundrets of kilometres. Temporarily TTL 1 would be possible - but with TTL 1 on the W2K, the Unix will still update with it's own TTL which still is up to 30.
(Servers always come in pairs [1W2k &1Unix ----kilometres----1W2k & 1Unix----a.s.o.])

"enable-cache for hosts => No" sounds good to me but there is no nscd, I am currently searching my /etc/inet/ and alike dirs for daemons and .conf files :)

Yes - this is a very special thing ;)
0
 
LVL 40

Accepted Solution

by:
jlevie earned 300 total points
ID: 10901687
> but with TTL 1 on the W2K, the Unix will still update with it's own TTL which still is up to 30

No it won't unless things are being done with DNS that shouldn't be. The authoritative DNS server is the only one that can legally (RFC wise) set the TTL for a zone. Clients and DNS slaves are required to honor that TTL. That's not to say that a host might not cache data at a higher level, say with nscd or within an application, which is what I suspect may be happening here.

I'd suggest doing some checking when you know there's been a change in a given client's IP. I'd run a sniffer to see if this host issues a DNS query when you attempt an access of the client's IP. If there's no DNS query from the server you know it is a local cache problem and it becomes a matter of determing what is caching the data. If there is a query and it returns old data it becomes an issue with the DNS server.
0
 

Author Comment

by:Scypher
ID: 10905509
right => solved it! thx!
0
 
LVL 9

Expert Comment

by:Alf666
ID: 10908297
Thx for me ;-)
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question