Monday, January 19, 2009

Add DNS Alias (CNAME) on command line using dnscmd

The following shows on how to add a DNS alias (CNAME) resource record in a DNS Zone
for a domain or child domain (sub domain) using the command dnscmd.exe.

1. Assume your DNS Server Host name is "dnsserver", DNS zone is "myrootdns.com", hostname for which alias is created is "dnsclient.myrootdns.com" and name of the alias is "myalias".

2. Verify in the dns manager console diagram the dns zone "myrootdns.com" and dnsclient host A type records exits.

2. Now run the following command to create CNAME DNS alias "myalias"

dnscmd dnsserver myrootdns.com myalias CNAME dnsclient.myrootdns.com

After running the above you can ping the alias "myalias" as shown in the below diagram
Ping myalias
3. The CNAME resource record is can be aged and scavenged. This can be done using /Aging option as shown below. If this parameter is omitted, then the resource record remains in the DNS database unless it is manually updated or removed.
dnscmd dnsserver myrootdns.com myalias /Aging CNAME dnsclient.myrootdns.com

4. The following diagram explains creating alias with aging option.
5. Also CNAME (Alias) Resource Record modification permissions can be given to all users using the option /OpenAcl. If this parameter omitted, then only administrators of the DNS server can modify the new Alias record.
run the command shown below to create CNAME with OpenAcl option.

dnscmd dnsserver myrootdns.com myalias /Aging /OpenAcl CNAME dnsclient.myrootdns.com

The following diagram explains Adding CNAME (alias) with OpenAcl option.

0 comments:

Design by infinityskins.blogspot