When Double-Take Availability failover occurs, DNS is not automatically updated. If the end-users use DNS to resolve server names and the source IP address was not failed over to the target, additional DNS updates will be required because the host records for the source will remain intact after failover. You can automate this process by scripting the DNS updates in the failover and failback scripts. You have two options for scripting the DNS updates.
DNS updates can be added to your failover and failback scripts by using the Windows DNSCMD command as long as dynamic updates are enabled on the DNS zone and the account running the Double-Take service is a member of the DNSAdmins security group. (See your Microsoft documentation to verify if dynamic updates are enabled.) Add the following commands to your failover and failback scripts to delete the host and reverse lookup entries and add new entries associating the source to the target.
Variable | Description |
---|---|
DNS_servers’s_FQDN | The fully qualified domain name of the DNS server |
DNS_zone | The name of the DNS zone |
source_server_name | The name of the source server |
source_server_IP_address | The IP address on the source |
www.xxx | The first two octets of the source’s IP address. For example, if the source’s IP address is 192.168.1.108, this variable would be 192.168. |
zzz.yyy | The last two octets, in reverse order, of the source’s IP address. For example, if the source’s IP address is 192.168.1.108, this variable would be 108.1. |
source_server’s_FQDN | The fully qualified domain name of the source server |
target_server_IP_address | The IP address on the source |
aaa.bbb |
The first two octets of the target’s IP address. For example, if the target’s IP address is 116.123.2.47, this variable would be 116.123. |
ddd.ccc |
The last two octets, in reverse order, of the target’s IP address. For example, if the target’s IP address is 116.123.2.47, this variable would be 47.2. |
For example, suppose you had the following environment.
You would add the following to your failover script to delete the host and reverse lookup entries and add new entries associating the source to the target.
dnscmd DNSServer.domain.com /RecordDelete domain.com alpha A 192.168.1.108 /f dnscmd DNSServer.domain.com /RecordDelete 192.168.in-addr.arpa 108.1 PTR alpha.domain.com /f dnscmd DNSServer.domain.com /RecordAdd domain.com alpha A 116.123.2.47 dnscmd DNSServer.domain.com /RecordAdd 116.123.in-addr.arpa 47.2 PTR alpha.domain.com |
You would add the following to your failback script to delete the host and reverse lookup entries and add new entries associating the source with its original identity.
dnscmd DNSServer.domain.com /RecordDelete domain.com alpha A 116.123.2.47 /f dnscmd DNSServer.domain.com /RecordDelete 116.123.in-addr.arpa 47.2 PTR alpha.domain.com /f dnscmd DNSServer.domain.com /RecordAdd domain.com alpha A 192.168.1.108 dnscmd DNSServer.domain.com /RecordAdd 192.168.in-addr.arpa 108.1 PTR alpha.domain.com |
See your Windows documentation or the Microsoft web site for more details on the DNSCMD command.
DNS updates can be added to your failover and failback scripts by using the Double-Take Availability DFO utility as long as the utility has been registered and the proper privileges are configured.
Command |
dfo |
Description |
Used in script files to failover the DNS server name |
Syntax |
dfo [/dnssrvname [dnsservername] /srcname [sourceFQDN] /srcip [sourceip] /tarip [targetip] /tarname [targetFQDN] /recordtype [recordtype] /username [username] /password [password] /dnszone [dnszonename] /dnsdomain [dnsdomainname] /logfile [logfilename] /failback [fbswitch] /setpassword [username] [password] /getpassword /lock /unlock /trustee [trusteename] /sourceDN [sourceDN] /verbose /flushdns /machine [machineFQDN] /TTL [seconds] /test /debug /? | /help ] |
Options |
|
Password Encryption |
NOTE: This function must be run separate from a modify or list activity.
|
General Examples |
Lists all resource records on the specified DNS server that match the source criteria
Modifies all resource records on the specified DNS server that match the source criteria, using the credentials of the account running the program to connect to the DNS server
Modifies (fails back) all resource records on the specified DNS server that were changed on failover
Modifies all resource records on the specified DNS server that match the source criteria, using the username and password to connect to the DNS server |
Password Encryption Examples |
Stores the username (mydomain.com\admin) and password (mypassword) in the default credentials file (dfo_credentials.dat)
Modifies all resource records on the specified DNS server that match the source criteria, using the username and /getpassword to retrieve the correct password for connecting to the DNS server |