disable cashing
yossi
yossi.zadah at audiocodes.com
Wed Nov 5 15:14:04 UTC 2003
Kevin Darcy <kcd at daimlerchrysler.com> wrote in message news:<bo96u3$2i8d$1 at sf1.isc.org>...
> yossi wrote:
>
> >phn at icke-reklam.ipsec.nu wrote in message news:<bo6j2e$2hfe$1 at sf1.isc.org>...
> >
> >
> >>yossi <yossi.zadah at audiocodes.com> wrote:
> >>
> >>
> >>>How I can configure the dns, to disable cashing?
> >>>thanks
> >>>
> >>>
> >>You can't. It's a built in part of the design.
> >>
> >>
> >
> >How can an application actively query the name server in order to
> >detect the possible change, regardless of the Time To Live (TTL)
> >associated with the DNS record?
> >
> If "the name server" is the master for the zone, then it's a moot point,
> since it's already giving the most up-to-date information available.
>
> If "the name server" is a slave server, then, short of going out of band
> and forcing the slave to refresh, your application is at the mercy of
> replication delays.
>
> If "the name server" is a non-authoritative (caching) server,then,
> again, short of going out of band and forcing the server to purge the
> old cache entry, there's no way to make it fetch the new data.
>
> Of course, if your application is smart enough, it can try to find the
> master server itself. But the master server might be "hidden", i.e. it
> might be behind a firewall and not even on the same network as wherever
> your app lives. So there are no guarantees here.
>
>
> - Kevin
>
>
>
> - Kevin
Thank you all for the detailed answer.
To be more specific,
my OS is:
# uname -a
SunOS client65 5.8 Generic_108528-07 sun4u sparc
SUNW,UltraSPARCengine_CP-60
In order to activate DNS I made two modifications as follows:
In the file resolv.conf:
nameserver 192.168.101.6 (DNS server IP)
and in the file :
# /etc/nsswitch.files:
hosts: files dns ## <--- Change here
My understanding in DNS is very limited; I assume that I am working in
a "slave server mode".
In my application I am working with ' gethostbyname', it is very
convenient since then I don't have to take care of TTL. The only
problem is where I need to make a query regardless the TTL, calling
'gethostbyname' will return the answer (from the cash) since the last
query, which have been initiated as a result of TTL epoch (no new
query).
I can use the res_nquery to force query whenever it is needed, but
then I will need to take care of the TTL.
I thought that it is a good idea to combine these two commands, the
problem with that is: res_nquery doesn't refresh the 'gethostbyname'
tables.
How I can to make the slave to refresh?
How I can force the DNS to issue a query whenever I calling
gethostbyname'?
Thanks again
Yossi
More information about the bind-users
mailing list