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.

3 comments:

fifi said...

You have a wonderful site. Excellent blog post! Isn’t it a wonderful feeling to share to others what we have learned? Keep on sharing! :)

www.n8fan.net

sarah lee said...

I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


edupdf.org

Leslie Lim said...

You have done a great work. Thanks for making this blog. You helped me a lot on my research topic. Keep it up guys!

www.imarksweb.org

Design by infinityskins.blogspot