-1

I have host h1 running a few services. It registers with a central server and the server requires its FQDN and IP. I can specify any FQDN here. At run time, if h1 were to be replaced with another host h2 then the server would reject h2 because its FQDN and IP are different than what are registered with the server.

All hosts are part of same subnet and are never exposed to internet.

So, I was hoping (with my very limited networking knowledge) that I can try something like this?

  1. Use FQDN f1 at registration time with central server.
  2. In DNS assign a FQDN (f1) with A record mapping to a IP which points to h1.
  3. When replacement is needed, update this IP to point to h2's IP.

Some basic questions, I am having:

  1. Would this approach work?
  2. Do I need a VIP here?
  3. Would individual hostnames of h1 and h2 not cause conflicts with fqdn in DNS?
  4. Can CNAME help better with FQDNs?

Thank you!

1 Answers1

1

The way you are seeing it is way complicated. Common approach is as follows: - determine the current TTL (and nor the IP) of the A-RR you are working with - diminish the TTL of the A-RR in the DNS to 3-5 minutes - wait for the amount of time from first step, so all the caches will update to the new TTL for this record - change the A-RR so it points to the new IP - notice that for the amount of time, equal to the TTL from the step two, two hosts will server whatever they are serving.

I didn't quite understand the passage about someone rejecting someone, but, anyway, it would rather be another additional step to make it possible for the two hosts to serve requests simultaneously, not an obstacle.

drookie
  • 8,051
  • 1
  • 17
  • 27
  • Thank you @drookie. In my case, only 1 of those 2 hosts can be active (either h1 or h2). It is only when either h1 goes down or requires a replacement that h2 comes into picture. However, h2 needs to have same FQDN as h1 for central server to accept it. So, to handle this can I just have FQDN in DNS updated to point to h2's IP? Is CNAME more helpful? – Sumit Nigam Sep 22 '15 at 10:17
  • Nope, CNAME isn't helpful in this case (at least I don;t see it). If both of your servers cannot acct inthe same time - you will definitely lose some of yor traffic, so in your case just make the TTL of the record minimal - 60 seconds. This way you will minimize the traffic loss, at the price of increasing DNS load by times. Anyway, I've rarely seen the case when only one of the two server can process request or whatever. – drookie Sep 22 '15 at 13:24
  • Thank you @drookie. So, can I just have FQDN fdn in DNS mapped to h1 IP with a small TTL. When h1 goes down, manually update DNS A mapping to point same FQDN fdn to h2's IP. I hope in this case whatever hostnames are set in h1 and h2 would not conflict. – Sumit Nigam Sep 22 '15 at 13:48
  • Yup. Should not. – drookie Sep 22 '15 at 13:51
  • Sure, If you can mark your previous comment as answer, then I can accept the same. – Sumit Nigam Sep 22 '15 at 14:00
  • That would be difficult, since I don't want to add another answer because it's too short. In the same time it loses its meaning when moved outside comments. – drookie Sep 23 '15 at 06:59