Due to how many servers are involved in my network, I have a hard time keeping them all organized. Some of them don't have static IP's, so I thought it might be nice if I made a config.mydomain.com domain. On this domain, I could store A records and the IP for each of the servers. This is how I set it up:
s1.config.mydomain.com. A 10.0.0.1 #ttl 60 s2.config.mydomain.com. A 10.0.0.2 #ttl 60 s3.config.mydomain.com. A 10.0.0.3 #ttl 60 # etc
Each of those records have a TTL of 60, in case I need to change an IP quickly, but I don't necessarily want clients connecting every 60 seconds to update. Now let's say I setup my domains to use them, like this:
mydomain.com. CNAME s2.config.mydomain.com. #ttl 3600 mail.mydomain.com. CNAME s2.config.mydomain.com. #ttl 10800 svn.mydomain.com. CNAME ns1.config.mydomain.com. #ttl 21600
The TTLs for the CNAMES are higher, so let's say I go to mydomain.com. It asks my DNS server for the IP of
mydomain.com, and my server returns
CNAME s2.config.mydomain.com. Then it asks my server for the IP of
s2.config.mydomain.com, and my server returns
Would it cache the
CNAME s2.config.mydomain.com record for 3600 seconds, and the
A 10.0.0.1 record for 60 seconds? Meaning that every 60 seconds it will still ask my server for the IP address?
Or will it cache the see
CNAME s2.config.mydomain.com, get the
A 10.0.0.1, and cache them both for 3600 seconds.
If it's the first, I'll probably have to find another way to manage them, so I'm hoping it's the second, but I'm not sure. Do you know of a better way to keep track of them?