Thursday, January 15, 2009

DNS Alias (CNAME) resource record

Alias (CNAME) resource records are also called as canonical name resource records. If one wants to use more than one dns name to a single dns host, Alias (CNAME) resource records is the better solution.

To create a Alias do the following:

1. Assume the domain is "myrootdns.com", DNS server for domain myrootdns.com is "dnsserver", the host name of the dns client for which alias is to be created is "dnsclient", IP address of the dnsclient is 192.168.1.200, FQDN name is dnsclient.myrootdns.com and name of the alias to be created is "myalias".

2. Run the command "dnsmgmt.msc"
3. In the console tree, expand the node "dnsserver", go to forward lookup zone and right click on "myrootdns.com" and select New Alias (CNAME) menu item.

4. In the create new alias dialog box, enter the alias name "myalias" and Fully qualified name of the client machine is "dnsclient.myrootdns.com" and click ok.

5. Now you can check the alias is working fine by running the ping command
"ping myalias". The dnsclient will respond to the ping.

To Create alias (CNAME) through command click here

Alias (CNAME) resource records are particularly useful for things like hosting File Transfer Protocol (FTP) server and a Web server on the same host but with different names.

DNS alias (CNAME) resource records are needed in the following scenarios:

1. When a host that is specified in an host (A) resource record in the same zone must be renamed

2. When a generic name needs to be used for a group of redundant Web servers. This is needed for a situation like "if one web server is down then the other redundant web server will take on".

3. When a host with an existing host (A) resource record in the zone is renamed, then use an alias (CNAME) resource record temporarily to allow a grace period for users and programs to switch from the old host name to the new host name.
The following illustrates on how to do this.

i . If the host is renamed with a new DNS domain name in the zone, then add a new host
(A) resource record to the zone.
ii. For the host's old DNS domain name, create an alias (CNAME) resource record that points to the new host (A) resource record.
iii. Remove the original host (A) resource record for the old host and its pointer (PTR) resource record from the zone.

Note: Remove alias (CNAME) record for original host, if the original host's host (a) record is deleted. This is save the server resources.
To add alias using dndcmd, then go to Create alias on command line

0 comments:

Design by infinityskins.blogspot