Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Caching for Conditional Forwarding vs Secondary Zones

Status
Not open for further replies.

gmail2

Programmer
Jun 15, 2005
987
IE
Hi All

We're currently trying to consider whether we should use conditional forwarding vs secondary zones for our new mail hosting. The only thing I'm stuck on is how long records get cached for in each scenario. Is this pre-determined by the SOA record for both scenario ?

Scenario 1:
Conditional Forwarding for mydomain.com
SOA record for mydomain.com says the TTL is 2,592,000 (30 days)

On 1st of the month a user queries mail1.mydomain.com, the local DNS server doesn't have it in it's cache so it forwards it to the Primary DNS server for mydomain.com and caches the result.

Users continue doing their work, just querying mail.mydomain.com and always getting the cached record. On 15th of the month, a user queries webmail.mydomain.com, the local DNS server doesn't have this in it's cache, so it forwards it to the primary server for mydomain.com and caches the result

Question 1:
The cached record for mail.mydomain.com will expire on 30th of the month - but when will the cached record for webmail.mydomain.com expire ? Also on 30th of the month, or on 15th of the following month ?

Question 2:
If the server is restarted on 20th of the month, I presume it's cache is lost, is that correct ? In this case it has to forward the query for mail.mydomain.com to the Primary server and I presume this cached record would expire on 20th of the following month (assuming the query was done on the same day) ??

Scenario 2:
Secondary Zone for mydomain.com setup and trasnferred on 1st of the month
SOA record for mydomain.com says the TTL is 2,592,000 (30 days)

Question 3:
At the end of the month, what happens to my secondary zone ? Is the whole thing transferred again ? What about if there are no changes ?

Question 4:
If a new record is added to the Primary server on 10th of the month, am I right in saying there is no "trigger event" that can cause the new record to be transferred to the secondary zone on my local DNS server ? I will have to wait until the end of the month when the zone "expires" and then it will get transferred ?

Question 5:
Is there a limit on the amount of times a DNS query can be forwarded (I'm ignoring how long a client will wait for a reply here) ? For example, if I forward a query for mail.mydomain.com to dns1.someotherdomain.com and it then forwards to another DNS server etc ... etc ... etc until it finally gets to dns1.mydomain.com - what is the maximum number of DNS servers it can go through ?

Thanks in advance for any help






Irish Poetry - Karen O'Connor
Irish Poetry and Short Stories - Doghouse Books
Garten und Landschaftsbau
 
Sorry, I just had a look at my AD DNS SOA reord and realize there's more to it than the TTL ! I also found this link which helped explain the SOA record:


So, my question now is - when using conditional forwarders, is the DNS server (where the forwarder is configured) considered to be a DNS client or a DNS server ? ie, is the TTL value used or the refresh value used ?

Sorry for all the questions and confusion ! Thanks in advance for any help

Irish Poetry - Karen O'Connor
Irish Poetry and Short Stories - Doghouse Books
Garten und Landschaftsbau
 
I believe in Windows there is no caching of the forward query. It just tries it again, every time, every request.

On bind, the only options or whether to get it from cache if the forward fails. It doesn't get it from cache, only if "forward first" is set, and only if the original forward fails.

Your query will always get the TTL that is on the forwarded server...you can consider your dns server as a client. It is like your queried the forwarded server DIRECTLY.

SOA values have no part in RR caching, nor the TTL of the SOA itself. Use dig to check the TTL value for each RR record.

So if you are forwarding to a caching server only, that isn't authoritative for the zone, the record will expire when it expires on that caching server.

If the forwarded server is authoritative, you will get an updated answer because it forwards EVERY time.





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top