none
Scripting DNS entries RRS feed

  • Question

  • I'm a bit new to this and this was dropped on my department's desk.

    The scenario:

    My organization has a DNS zone for our primary production domain, and all of our IP's for production machines are managed as static assignments. We use third party applications that depend on the A-record to resolve (else an error occurs for IP mapping). There is usually no issue, except that on occasion, the primary network connection for a site may go down. When this occurs, every site in our org has a workstation fitted with a dial-up modem that the affected site can fail-over to, so that they are not dead in the water in the meantime.

    What happens is that our DNS server is set up such that when a center is on dial-up and their primary network begins functioning again, DNS is smart enough to automatically wipe out the mapping of the dial-up IP and divert back to the primary 172.19.xxx.xxx IP. The same is NOT true of the inverse... if you're on primary network connection (the 172.19.xxx.xxx) and you fail-over to dial-up, DNS is NOT smart enough to create the dial-up record entry automatically.

    In the past, whenever this happens, we simply create an A-record in our domain zone to map the new dial-up modem IP (on a 172.18.xxx.xxx) to the host with the modem, and all is good. Once the primary network comes back, the manually created record drops off, and mapping resumes for the 172.19 entry. However, what we've noticed recently, is that if a site's primary network is flapping, we have to continuously remap the dial-up IP over the course of the workday.

    So my question is as follows:

    Is there a way through PS to script the querying of sites that have failed over to dial-up modem IPs, and then create the A-records for those that have been found to be failed over? I don't need to go the other way, just creation of A-records for the dial-up change overs would be sufficient.

    The caveat is that I'll need to automate this without changing our DNS server configuration, which is why I'm looking for a scripted solution.

    Any suggestions, from an actual script, to pointers in the right direction are much appreciated.

    Thank you everyone in advance for any advice or pointers you can throw my way.

    • Moved by Bill_Stewart Thursday, December 20, 2018 9:53 PM This is not "scripts on demand"
    Monday, October 22, 2018 6:24 PM