How long will an MX record and A record change take when DNS server is not being changed

domain-name-system

I am trying to estimate whether it is realistic for me to change the IP of a mail server overnight or will this mess with people retrieving their email the day after. Basically, the facility where the mail server is will be changing its IP pool and this forces me to have to change the A and MX record for the mail server. Since I am not changing the DNS server itself (not moving the records to a different authoritative server), will the change be near instantaneous or will it still take up to 48 hours because of caching on different non authoritative DNS servers that may have queried recently?

Thanks for any insight,

M

Best Answer

Every DNS resource record is cached; whether the DNS server itself is moving or not is immaterial. As Yahia said, how long the record is cached is determined by the TTL of the record. Before performing a DNS change, it is common practice to lower the TTL from it's regular value (a day or more, typically) down to something really small, like 5 minutes.

Complicating this procedure is the fact that some badly-behaved dns caching resolvers ignore the specified TTL and substitute their own values. (The people running these systems need to die in a fire, and if I ever get elected Grand overlord of The Internet, they will). As such, if it's an important system or one used by people outside your direct control, you would be well advised to setup DNAT rules on the system being migrated away from to redirect traffic that does get sent to the previous IP address to the new one.