Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on Cname in DNS

Status
Not open for further replies.
May 20, 2005
6
0
0
US
I am trying to undersrtand how a Cname record works in DNS?

I was told a Cname is an alias to a real host name.

CAn someone give an example of how and or why a Cname would need to be used??

thx in advance,

harvey
 
harveymasons,

I'll try to find you a link to some good, simple documentation online, but in the meantime, here's a simple explanation.

Say you have a DNS zone for xyz.com. Within xyz.com, you have a few hosts: server1, server2, etc. These would be A records in the xyz.com zone.

Now, you want to have a DNS record for and have it point to server1.xyz.com. How do you do this? With a CNAME record that aliases the host host server1.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
To elaborate:

Suppose you set up your web server on server1, but set up a CNAME of to server1 and publish your web address as server1 blows up and you quickly set up the web site on server2, then rather than telling everyone a new address, you simply change the CNAME entry to point to server2.

Also, if you have a mail server, you can reference it as imap.xyz.com, pop3.xyz.com and mail.xyz.com for imap, pop3 and smtp services. At a later date you can then split them up onto different servers to spread the load.

Lastly, you can do a very crude loadbalancing by setting up multiple CNAMES to different servers, eg you have 3 CNAME entries for www, pointing to server1, server2, server3. DNS will then do a round robin load balancing, directing the first request to server1, the second to server2, etc.

HTH

Darren.
 
Suppose you set up your web server on server1, but set up a CNAME of to server1 and publish your web address as server1 blows up and you quickly set up the web site on server2, then rather than telling everyone a new address, you simply change the CNAME entry to point to server2.

Using a CNAME here would be of no benefit at all. If you didn't use a CNAME there would be nothing stoping you from simply changing the IP address of the A record for www. Even with a CNAME there has to be an A record somewhere down the line.

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 


Thanks alot guys. I Really appreciate it.

I understand it much better now.

thanks again,
HArvey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top