大网数据广告活动
服务器运维问答

How to transfer DNS records to new DNS provider with very little or no downtime in resolution

· 52CE 我爱测

I'd like to transfer DNS records from Network Solutions to DNS Made Easy, mainly to take advantage of "DNS Failover" provided by DNS Made Easy to automatically fail a couple of key A records over to new IPs in my data center wher…

问题原文

原帖链接 · Tedwin · CC BY-SA 4.0

I'd like to transfer DNS records from Network Solutions to DNS Made Easy, mainly to take advantage of "DNS Failover" provided by DNS Made Easy to automatically fail a couple of key A records over to new IPs in my data center where I replicate servers to for DR if DNS Made Easy senses that the primary IP on prem is unavailable.

This guide is helpful, but I don't understand the first step regarding TTLs. My understanding of TTLs has always been that hosts cache records for an amount of time as told by the TTL when querying records. If that understanding is correct, how can I have any control over expiration?

My plan is to:

  1. Create new zone files on new DNS provider at my leisure
  2. Change existing nameservers at the registrar to the new DNS Made Easy nameservers at night, cross my fingers and wait for morning

What can I do in relation to the TTLs to improve my chances of making this seamless?

已采纳解答

原帖链接 · Patrick Mevzek · CC BY-SA 4.0

My understanding of TTLs has always been that hosts cache records for an amount of time as told by the TTL

This is right. TTLs were defined like this, from the venerable RFC1034:

TTL which is the time to live of the RR. This field is a 32 bit integer in units of seconds, an is primarily used by resolvers when they cache RRs. The TTL describes how long a RR can be cached before it should be discarded.

Note in passing:

  • it is a maximum value, resolvers are free to empty their cache before reaching the TTL value (for policy reasons or to make space in the cache)
  • some resolvers will clamp TTL values to a minimum if the value in the wild is deemed too low; typically below 5 minutes you risk to have some resolvers not honoring it

Normally a change for any record is recommended to be that way:

  1. You lower the TTL of the current record, to something like 5 minutes
  2. You wait at least the value of the previous TTL, before going to next step
  3. You change the record, keeping the small value
  4. You test everything is right
  5. You then can put back an higher TTL value

To be complete, depending on your NS infrastructure you might also need:

  • to lower the SOA MINIMUM value, which is in fact the "negative TTL": this is only relevant if you add a record that was not there previously
  • to lower the SOA REFRESH value, if you do not control the secondary nameservers, so that they will get the new value faster (or send them NOTIFY messages and make sure it triggers AXFR/IXFR queries from them shortly after).

Your case is slightly different:

  • if you change the set of nameservers
  • and if the new nameservers are configured with exactly the same zone content as the previous ones
  • then it means that contacting the old nameservers or the new ones will have the exact same effect
  • hence you can change them without changing any TTLs.
  • but you need to wait at least the TTL of the NS records in the parent zone, after the change, to consider that all resolvers will have received the new set of nameservers. This is only after this delay that you can start to make changes in the content of the zone.

Some examples:

$ for tld in com biz info org guru fr de ; do echo -n $tld ' '; dig @`dig $tld. NS +short|head -1` nic.$tld NS +noall +auth | grep "IN NS" | head -1 | awk '{ print $2}' ; done
com  2d
biz  2h
info  1d
org  1d
guru  1d
fr  2d
de  1d

PS: in case of a signed domain name (DNSSEC) things are a tad more complicated.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-04-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。