Is there a way to use DiG or nslookup to determine if a server is set to Master or Slave? And if a server is slave, return the Master's IP address?
Answer
As far as I know, the answer is no -- certainly no standard way, since there are a billion different DNS server variants. One option would be to have a 'masterdns.mydomain.com' record, guaranteed to contain the IP address of the master (don't even expose it, no need) -- then all you need to do is compare the IP of the DNS server to the IP it gives you for the master, and you're all set. This is also imperfect, because of aliasing / multi-homing / whatever-the-hell (you can't guarantee that it's a different server), but ..
.. you seem to be implying that you're setting all this up yourself, in which case you should just have the masterdns.mydomain.com record.
No comments:
Post a Comment