Solved

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

Posted on 2004-04-22
8
48,977 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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
NetScaler Deployment Guides and Resources

Citrix NetScaler is certified to support many of the most commonly deployed enterprise applications. Deployment guides provide in-depth recommendations on configuring NetScaler to meet specific application requirements.

 

Author Comment

by:Scypher
Comment Utility
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
Comment Utility
> 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
Comment Utility
right => solved it! thx!
0
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
Thx for me ;-)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Let’s list some of the technologies that enable smooth teleworking. 
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now