gorndog
asked on
Is DNS result cached locally? How long should take for a DNS update to be recognized?
I saw the following PAQ here on EE
https://www.experts-exchange.com/jsp/qShow.jsp?ta=winntnet&qid=10117368
And in it is said:
> Immediately start pinging again, new address
> added by change for that hostname will be used.
What if that isn't happening?
Lets say I have two machines on dialup.
One Dialup A I can say:
ping www.mydomain.com
and it will return the ip, lets say 1.2.3.4
then I go into the DNS server and update the
resolution for www.mydomain.com to 4.3.2.1
Then I go to Dialup B, and
ping www.mydomain.com, and it says
4.3.2.1
This tells me that the zone update on DNS was
successful.
Then I go back to dialupA and do the ping, but it
still says:
1.2.3.4
If I wait a length of time (several minutes) ..., it then
will say 4.3.2.1 even though I didn't change anything
on the DNS server.
So there must be some type of name resolution cached
locally so that it isn't going out to the DNS server for
each ping.
My question ..., if so, how long before it will recognize the change?
The reason I ask? I have a backup web site for use
when my primary goes down. But the backup is on
a dynamic ip. So if I go in and change ip# on my DNS
to point to the backup, and then some time later when
I revert IP# to the original, ..., how long then must I
wait before I can "turn off" the backup web server.
Hopefully after 10 minutes or so after the change back
I should not have anyone re-visiting the domain and
getting to the backup website. But that is exactly
what appears to be happening.
https://www.experts-exchange.com/jsp/qShow.jsp?ta=winntnet&qid=10117368
And in it is said:
> Immediately start pinging again, new address
> added by change for that hostname will be used.
What if that isn't happening?
Lets say I have two machines on dialup.
One Dialup A I can say:
ping www.mydomain.com
and it will return the ip, lets say 1.2.3.4
then I go into the DNS server and update the
resolution for www.mydomain.com to 4.3.2.1
Then I go to Dialup B, and
ping www.mydomain.com, and it says
4.3.2.1
This tells me that the zone update on DNS was
successful.
Then I go back to dialupA and do the ping, but it
still says:
1.2.3.4
If I wait a length of time (several minutes) ..., it then
will say 4.3.2.1 even though I didn't change anything
on the DNS server.
So there must be some type of name resolution cached
locally so that it isn't going out to the DNS server for
each ping.
My question ..., if so, how long before it will recognize the change?
The reason I ask? I have a backup web site for use
when my primary goes down. But the backup is on
a dynamic ip. So if I go in and change ip# on my DNS
to point to the backup, and then some time later when
I revert IP# to the original, ..., how long then must I
wait before I can "turn off" the backup web server.
Hopefully after 10 minutes or so after the change back
I should not have anyone re-visiting the domain and
getting to the backup website. But that is exactly
what appears to be happening.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ahaa!!! Awesome!
For some reason I was (wrongly) thinking it would be a local cache setting on the client. Of course, it makes much more sense that this is a setting issued by the DNS host!
I then found this link which describes each field of the DNS record:
http://support.microsoft.com/support/kb/articles/Q163/9/71.ASP
So, in my case, the zone record in my .dns shows:
@ IN SOA mydomain.com. admin.mydomain.com. (
22 ; serial number
3600 ; refresh
600 ; retry
86400 ; expire
3600) ; minimum TTL
So it is cached locally for one hour (3600 seconds).
I was trying to figure out the discrepancy then as, in my example, Dialup A got the correct update in less than 10 minutes after I changed the DNS. But then I realized why.
I had first done a ping www.mydomain.com on Dialup A 50 minutes before I had changed the DNS record. Then about 10 minutes after the change, Dialiup A finally used the change. Thus it had to go back to the DNS exactly 60 minutes from the first ping. It is so obvious, now!
Thanks so much!
For some reason I was (wrongly) thinking it would be a local cache setting on the client. Of course, it makes much more sense that this is a setting issued by the DNS host!
I then found this link which describes each field of the DNS record:
http://support.microsoft.com/support/kb/articles/Q163/9/71.ASP
So, in my case, the zone record in my .dns shows:
@ IN SOA mydomain.com. admin.mydomain.com. (
22 ; serial number
3600 ; refresh
600 ; retry
86400 ; expire
3600) ; minimum TTL
So it is cached locally for one hour (3600 seconds).
I was trying to figure out the discrepancy then as, in my example, Dialup A got the correct update in less than 10 minutes after I changed the DNS. But then I realized why.
I had first done a ping www.mydomain.com on Dialup A 50 minutes before I had changed the DNS record. Then about 10 minutes after the change, Dialiup A finally used the change. Thus it had to go back to the DNS exactly 60 minutes from the first ping. It is so obvious, now!
Thanks so much!
ASKER