Operating System - HP-UX
1820390 Members
3607 Online
109623 Solutions
New Discussion юеВ

How to clear the DNS cache

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

How to clear the DNS cache

We have several HPUX server 11.i and 11.0
And we have an DNS server.
We are doing some tests and we would like
to know if a command or methode exists to
clear the DNS cache on our servers.

Thanks
Look before you leap
18 REPLIES 18
Joel Girot
Trusted Contributor

Re: How to clear the DNS cache

Hi Franck

rndc flush

see man rndc

Joel
spex
Honored Contributor

Re: How to clear the DNS cache

Steven E. Protter
Exalted Contributor

Re: How to clear the DNS cache

Shalom,

Indirectly changing the serial number on the zone record should trigger an immediate flush for that zone on all clients.

2006051301 becomes 2006091201 (today's date change 1).

Then restart bind.

Editing the zone records may be rough on named 4.9.7, I hope you are using Bind 8 or 9.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: How to clear the DNS cache

rndc flush

or stop/restart bind

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Frank de Vries
Respected Contributor

Re: How to clear the DNS cache

When I try to man mdc it doesn't work or
exist ?
Where can I find the executable ?

[root@orasrv1:]/picnew/export/tp/backup/tp<>>> man mdc
No manual entry for mdc.
[root@orasrv1:]/picnew/export/tp/backup/tp<>>
Look before you leap
Joel Girot
Trusted Contributor

Re: How to clear the DNS cache

not mdc but RNDC in lowercase : rndc
man 1 rndc

Joel
spex
Honored Contributor

Re: How to clear the DNS cache

Hi Frank,

/usr/sbin/rndc

R N D C

PCS
Frank de Vries
Respected Contributor

Re: How to clear the DNS cache

Is that standard on 11.i ?
I do not have it on any of my machines,
which include a couple of 11.00 also.

[vwbsrv1:/root]# ls -altr /usr/sbin/mdc
/usr/sbin/mdc not found
[vwbsrv1:/root]#

Where can I download this or get this ?
Look before you leap
Joel Girot
Trusted Contributor

Re: How to clear the DNS cache

it is standard on 11i Franck but it is not mdc (MDC) but rndc (RNDC : r n d c)
$ ls -altr /usr/sbin/rndc
lrwxr-xr-x 1 root sys 31 Jan 18 2005 /usr/sbin/rndc -> /usr/contrib/bind/usr/sbin/rndc
Joel
Frank de Vries
Respected Contributor

Re: How to clear the DNS cache

Sorry about that, I am not paying attention to well.

In any case I tried the rdnc too
[vwbsrv1:/root]# ls -altr /usr/sbin/rndc
/usr/sbin/rndc not found
[vwbsrv1:/root]# ls -altr /usr/contrib/bind/usr/sbin/rndc
/usr/contrib/bind/usr/sbin/rndc not found
[vwbsrv1:/root]#

Still no joy.

I wonder why we do not have it.
Did I miss something during the installation years ago ??
Look before you leap
Joel Girot
Trusted Contributor

Re: How to clear the DNS cache

In my hpux 11.11 box rndc come with bind (v920)
# swlist -l product | grep -i bind
BINDv920 B.11.11.01.006 BIND 9.2.0 special release upgrade
PHKL_32038 1.0 Psets Enablement, Kernel Binding
PHNE_30068 1.0 Bind 8.1.2 Patch
Frank de Vries
Respected Contributor

Re: How to clear the DNS cache

Well thanks;
I seem to have nada

[vwbsrv1:/root]# swlist -l product | grep -i bind
[vwbsrv1:/root]# uname -a
HP-UX vwbsrv1 B.11.11 U 9000/871 2001097676 unlimited-user license
[vwbsrv1:/root]#

Look before you leap
Geoff Wild
Honored Contributor

Re: How to clear the DNS cache

RNDC only comes with recent versions of Bind.

Depending on the versions you have installed, you may or may not have it...

What version of bind is running?

You can use dig (if installed):

dig @yourserver version.bind chaos txt

Or with nslookup:

nslookup -q=txt -class=CHAOS version.bind. yourserver

You could also just run a find command...

Rgds...Geoff


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Joel Girot
Trusted Contributor
Solution

Re: How to clear the DNS cache

on client side I don't think that it have dns cache. Only on server side. No need to flush on client side. Possibly see your /etc/hosts file.
spex
Honored Contributor

Re: How to clear the DNS cache

Hi Frank,

For older verions of BIND,

# /sbin/init.d/named stop
# /sbin/init.d/named start

will flush the cache.

PCS
Frank de Vries
Respected Contributor

Re: How to clear the DNS cache

Mr Spex

Is /sbin/init.d/named supposed to be running
on each client, or is this only
necessary on the DNS server ??
Look before you leap
Joel Girot
Trusted Contributor

Re: How to clear the DNS cache

Only on dns server Frank.
Frank de Vries
Respected Contributor

Re: How to clear the DNS cache

All your answers make me understand
where I stand.

The problem is that here we have dns not
on hpux (I wish it was) but on Windows (yeak).

thanks
Look before you leap