Unix Technical Forum

Flushing the nameserver cache on AIX

This is a discussion on Flushing the nameserver cache on AIX within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi All, Can anyone help me with flushing the nameserver cache on AIX? Solaris has an equivalent nscd daemon ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 11:22 AM
Jigs
 
Posts: n/a
Default Flushing the nameserver cache on AIX

Hi All,

Can anyone help me with flushing the nameserver cache on AIX? Solaris
has an equivalent nscd daemon that caches name service requests. Does
AIX have a similar daemon?

If not, how can I do this programatically?

Thanks,
Jigar

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 11:22 AM
base60
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

Jigs wrote:
> Hi All,
>
> Can anyone help me with flushing the nameserver cache on AIX? Solaris
> has an equivalent nscd daemon that caches name service requests. Does
> AIX have a similar daemon?


AIX and Solaris both use bind by default.

Depending upon the version installed, ncsd may not be used (it's
a bit dated).

Try checking the version and reading the man page.

You might also check the startup script, because there is probably
logic in it to flush the cache.

>
> If not, how can I do this programatically?
>
> Thanks,
> Jigar
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 11:23 AM
Roy
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

Jigs wrote:
> Hi All,
>
> Can anyone help me with flushing the nameserver cache on AIX? Solaris
> has an equivalent nscd daemon that caches name service requests. Does
> AIX have a similar daemon?
>
> If not, how can I do this programatically?
>
> Thanks,
> Jigar
>


With standard bind the command is

rndc flush

I always dump the named that comes with AIX and load in the latest from
http://www.isc.org/index.pl?/sw/bind/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 11:23 AM
Ian Northeast
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

On Wed, 06 Sep 2006 16:55:11 -0700, Jigs wrote:

> Hi All,
>
> Can anyone help me with flushing the nameserver cache on AIX? Solaris has
> an equivalent nscd daemon that caches name service requests. Does AIX have
> a similar daemon?


You seem to be confusing two different things here. Nscd is a client side
caching daemon which can cache hosts and user database information.
Caching hosts information is generally disabled by default these days as
nameserver caches work better - nscd does not IME respect TTLs.

The nameserver cache is in the namserver itself not on the client.

As far as I know nscd has never been available on AIX, nor is there any
equivalent. It's not normally needed as it primary purpose is to
address performance issues in large NIS+ networks and AIX doesn't use NIS+
by default. AIX clients do not ever cache hosts information AFAIK.

As Roy said, the normal way to flush a bind nameserver's cache is "rndc
flush", but as far as I can see IBM do not ship rndc with AIX. You could
install it from a regular bind distribution. Otherwise you can stop and
restart bind, which flushes the cache as it is in memory. This was the
only way with earlier versions.

Regards, Ian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 11:28 AM
Jigs
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

Thank you all for your responses.

I was actually looking to flush the client side cache. It seems that
AIX does not cache nameserver entries on the client side. Is there a
way to confirm this? Can I run some tests to confirm?

Thanks,
Jigar


Ian Northeast wrote:
> On Wed, 06 Sep 2006 16:55:11 -0700, Jigs wrote:
>
> > Hi All,
> >
> > Can anyone help me with flushing the nameserver cache on AIX? Solaris has
> > an equivalent nscd daemon that caches name service requests. Does AIX have
> > a similar daemon?

>
> You seem to be confusing two different things here. Nscd is a client side
> caching daemon which can cache hosts and user database information.
> Caching hosts information is generally disabled by default these days as
> nameserver caches work better - nscd does not IME respect TTLs.
>
> The nameserver cache is in the namserver itself not on the client.
>
> As far as I know nscd has never been available on AIX, nor is there any
> equivalent. It's not normally needed as it primary purpose is to
> address performance issues in large NIS+ networks and AIX doesn't use NIS+
> by default. AIX clients do not ever cache hosts information AFAIK.
>
> As Roy said, the normal way to flush a bind nameserver's cache is "rndc
> flush", but as far as I can see IBM do not ship rndc with AIX. You could
> install it from a regular bind distribution. Otherwise you can stop and
> restart bind, which flushes the cache as it is in memory. This was the
> only way with earlier versions.
>
> Regards, Ian


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 11:28 AM
Frank Fegert
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

Jigs wrote:
> Thank you all for your responses.
>
> I was actually looking to flush the client side cache. It seems that
> AIX does not cache nameserver entries on the client side. Is there a
> way to confirm this? Can I run some tests to confirm?


Do a lookup on the client, change the DNS entry for the looked-
up address, tell your DNS server about the changed zone files,
redo a lookup on the client. If the old DNS entry comes up as
an answer, there is caching involved somewhere. If the new DNS
entry comes up, no caching is involved.

Regards,

Frank
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 11:29 AM
Rick Jones
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

Jigs <jigar.jigar@gmail.com> wrote:
> I was actually looking to flush the client side cache. It seems that
> AIX does not cache nameserver entries on the client side. Is there a
> way to confirm this? Can I run some tests to confirm?


After verifying you are not running a local caching-only name server
(ie cheching your resolv.conf file), write a little program that asks
for the same name a few times in a row. While that program is running
use tcpdump or the like to watch traffic to/from port 53. If you see
the DNS query for the same name more than once (ie as many times as
your program asks for the name) then there is no caching.

rick jones
--
No need to believe in either side, or any side. There is no cause.
There's only yourself. The belief is in your own precision. - Jobert
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-05-2008, 11:30 AM
Jigs
 
Posts: n/a
Default Re: Flushing the nameserver cache on AIX

Thanks you all for the help!

I ran a test program that used gethostbyname() to get the DNS entry and
when the program was running, I updated the entry on the DNS server. I
found that as soon as the entry was updated, the next call to
gethostbyname() fetched the updated record. Hence no caching was done
on the client side.

thanks again ..


Rick Jones wrote:
> Jigs <jigar.jigar@gmail.com> wrote:
> > I was actually looking to flush the client side cache. It seems that
> > AIX does not cache nameserver entries on the client side. Is there a
> > way to confirm this? Can I run some tests to confirm?

>
> After verifying you are not running a local caching-only name server
> (ie cheching your resolv.conf file), write a little program that asks
> for the same name a few times in a row. While that program is running
> use tcpdump or the like to watch traffic to/from port 53. If you see
> the DNS query for the same name more than once (ie as many times as
> your program asks for the name) then there is no caching.
>
> rick jones
> --
> No need to believe in either side, or any side. There is no cause.
> There's only yourself. The belief is in your own precision. - Jobert
> these opinions are mine, all mine; HP might not want them anyway...
> feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com