3

Our company is moving offices and we're signing up for an new Internet provider. We self host web and email servers at static public IP addresses - these need to be moved to the new offices. My belief is that if we update the records the day of the move, then we'll see a service outage until the record changes are propagated to DNS servers worldwide.

We'd like to switch off servers at the old site and have, people instantly redirected to servers at the new site. Is it possible to setup records with our DNS service ahead of the move so that if someone contacts www.mysite.com and there's no response from the server at the old IP adderss, then the second (new site) IP address is used?

Same question for MX records and A records.

What special sauce do I need to specify?

3 Answers 3

1

You can put multiple IP address in the record few days before the move, and a good client (web, mail) will accept multiple IP and try it one by one. Once you are settled at the new office (with new IP), remove the old IP

Example:

Define multiple MX records with the same priority:

; zone file fragment
      IN  MX  10  mail.example.com.
      IN  MX  10  mail1.example.com.
      IN  MX  10  mail2.example.com.
....
mail  IN  A       192.168.0.4
mail1 IN  A       192.168.0.5
mail2 IN  A       192.168.0.6

An alternate approach is to define multiple A records with the same mail server name:

; zone file fragment
        IN  MX  10  mail.example.com.
....
mail    IN  A       192.168.0.4
        IN  A       192.168.0.5
        IN  A       192.168.0.6


ftp   IN  A   192.168.0.4
      IN  A   192.168.0.5
      IN  A   192.168.0.6
www   IN  A   192.168.0.7
      IN  A   192.168.0.8

More info here:

http://www.zytrax.com/books/dns/ch9/rr.html

5

You could first learn how DNS works. DNS records don't get propagated "worldwide", they get cached by clients that request them (and only those clients. clients that don't query for your DNS records don't know anything about your DNS records and they never will unless and until they query for them).

The amount of time they're cached for is based on the TTL of the record. Set the TTL to a reasonable amount of time (like 1 hour) well ahead of the change and when you make the change you'll have at most 1 hour of unavailability (but only for DNS clients that have the record cached already. DNS clients that don't have the record cached already will get the new record immediately upon querying for it).

EDIT

The only name servers that will cache your DNS records are those name servers whose clients have queried for your DNS records. All other name servers are completely unaware that your domain even exists. Technically the parent servers for your domain (the gTLD servers) know about your domain but they don't "propagate" your DNS records. When my DNS client queries for your DNS records, my DNS server queries one of the gTLD servers to find your name servers, the gTLD server tells my DNS server who your name servers are and then my DNS server queries your name servers for the DNS records that my client queried for. Those DNS records are cached on my DNS server an my DNS client and that's it. The gTLD servers cache your name server records and that's it. They don't cache any other records for your domain (except maybe the SOA record). As you can see, no name servers other than your name servers have a copy of your zones nor do they cache any of your DNS records unless queried for those records by one of their clients.

7
  • Well... I guess when I said "propagated worldwide" I meant "cached by hundreds of thousands of nameservers worldwide"? Is that precisely correct?
    – user14645
    Jan 11, 2013 at 2:20
  • No it's not. See my edit.
    – joeqwerty
    Jan 11, 2013 at 2:52
  • I don't think "propagate" implies either pulled over pushed.
    – user14645
    Jan 11, 2013 at 3:13
  • The point is that you're DNS records don't exist anywhere untill they're requested. My DNS servers don't even know that you're domain exists until my DNS client queries for your domain. Your statement that "we'll see a service outage until the record changes are propagated to DNS servers worldwide" is patently incorrect. Your DNS records don't propagate unsolicited (whether pushed or pulled). In order for my DNS server to cache any of your DNS records, my DNS client has to query for them. Until that happens my DNS server and my DNS client don't know anything about your domain.
    – joeqwerty
    Jan 11, 2013 at 3:28
  • So the bottom line is this: If you have a TTL of 1 hour on one or more of your DNS records and you change those records then any DNS servers or clients that have those records cached will use the old DNS records until the TTL expires, upon which they'll issue a new query and get the new record. For DNS servers and clients that don't have those records cached, they'll issue a query and get the new record immediately.
    – joeqwerty
    Jan 11, 2013 at 3:30
2

You need to reduce the TTL value of DNS records.

Suppose, if your current TTL value is 12 hour. Reduce that value to something like 5 seconds.

One question: Where is your Name Server located. Will that also change during this office migration? Or will it be the same after office migration?

From comment - A low TTL is useful, but some ISP DNS servers simply ignore low TTLs, and will only go as low as an hour, though I have seen people say that they have seen servers that ignore a TTL lower then 24 hours.

Yea, some times thats true. In that case, if you really want maximum possible low DNS issues, do following:

Force your users to use a specific good open DNS server and ask them to clear their DNS caches. Teach them how to change the DNS server or you do yourself for them or inside the office I am assuming that your gateway device can do it for you via DHCP. So, at least people who are using your web services from office will not face DNS the issues.

3
  • 3
    A low TTL is useful, but some ISP DNS servers simply ignore low TTLs, and will only go as low as an hour, though I have seen people say that they have seen servers that ignore a TTL lower then 24 hours.
    – Zoredache
    Jan 11, 2013 at 0:37
  • Force your users - For a web site your users could be every single person on the planet. It simply isn't practical to force everyone in the world to have a good DNS server. Sure you can fix the problem within your network, but what if you your web site happens to be an online retail site.
    – Zoredache
    Jan 11, 2013 at 20:21
  • So, at least people who are using your web services from office will not face DNS the issues. I meant his users who is working from his office.
    – Suku
    Jan 12, 2013 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .