Date: Sun, 12 Mar 2000 16:27:10 -0600 (CST) From: Ryan Thompson <ryan@sasknow.com> To: Doug Barton <Doug@gorean.org> Cc: Matthew Joseff <mjoseff@hellenco.com>, FreeBSD Questions List <freebsd-questions@FreeBSD.ORG> Subject: Re: CNAME vs A records (clarification) Message-ID: <Pine.BSF.4.21.0003121607290.7591-100000@ren.sasknow.com> In-Reply-To: <38CC0982.B54CC5@gorean.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Barton wrote to Matthew Joseff: > Matthew Joseff wrote: > > > > Can someone correct and/or confirm my understanding of CNAME vs A records: > > > > CNAME should be used for a host that exists on (potentially) another > > server but uses that domain. > > > > A records should be used as an alias for a host but co-exists with other > > hosts. > > There is no such concept as "alias" in DNS. Erase it from your > mind. Sorry, Doug, but I'm afraid you are wrong. CNAME records are just that--aliases that point to a host's canonical name. Rather than restate much of the same information that I put in a previous post, please read my last post in this thread for a bit more clarification, including an impromptu definition of CNAMEs according to O'Reilly's DNS and BIND, 3rd ed. > A records point hostnames to IP addresses. CNAME records point > hostnames to other hostnames. Except for very rare and temporary cases > you shouldn't use CNAME's at all, especially if you don't really > understand all of the implications. To understand all of the implications, I suggest EVERYONE who uses BIND should pick up O'Reilly's DNS and BIND, 3rd edition. Consider this, Doug (snippets from a zone transfer for freebsd.org): ; <<>> DiG 8.2 <<>> @ns1.root.com freebsd.org axfr ; (1 server found) $ORIGIN freebsd.org. @ 30M IN SOA implode.root.com. hostmaster ( 100030701 ; serial 30M ; refresh 15M ; retry 1W ; expiry 30M ) ; minimum 30M IN NS ns1.root.com. 30M IN NS who.cdrom.com. 30M IN NS ns1.crl.com. 30M IN NS ns2.crl.com. 30M IN NS ns1.iafrica.com. 30M IN NS ns2.iafrica.com. 30M IN NS ns.gnome.co.uk. 30M IN A 204.216.27.18 30M IN MX 10 hub docs 30M IN CNAME freefall www2 30M IN CNAME www.ie www5 30M IN CNAME freebsd.ghis.net. www6 30M IN CNAME freebsd.ghis.net. ezine 30M IN CNAME peloton.physics.montana.edu. anoncvs 30M IN CNAME cvsup7 mail 30M IN CNAME hub current 30M IN CNAME usw2 ctm 30M IN CNAME ftp.uni-trier.de. beast 30M IN CNAME beast.cdrom.com. sup 30M IN CNAME burka.rdy.com. daemon-news 30M IN CNAME peloton.physics.montana.edu. irc 30M IN CNAME irc.nocturnal.net. 22beta 30M IN CNAME admin1.calweb.com. www 30M IN CNAME freefall people 30M IN CNAME freefall (MANY hosts snipped, including several more CNAMEs) ;; Received 213 answers (213 records). ;; FROM: ren.sasknow.com to SERVER: 209.102.106.178 ;; WHEN: Sun Mar 12 16:16:41 2000 There are examples like this all over the Internet. I would hesistate to call them either ``rare'' or ``temporary''. > I don't really understand your example, or what you're trying to get > at. But there is no reason at all you can't have multiple A records in > multiple zones pointing at the same IP address. If I've missed the > essence of your question, feel free to try and restate it... What about reverse lookups? Sooner or later, you're going to have to map the IP address in question back to a canonical name (mailers, for example, do this regularly). As DNS lookups on IPs return only a single hostname (the canonical name), if you want reverse lookups to work properly, you should normally use a CNAME. To illustrate: # nslookup ftp.freebsd.org Server: localhost Address: 0.0.0.0 Non-authoritative answer: Name: wizard.freesoftware.com Address: 209.155.82.20 Aliases: ftp.freebsd.org, ftp.freesoftware.com # nslookup 209.155.82.80 Server: localhost Address: 0.0.0.0 Name: wizard.freesoftware.com Address: 209.155.82.20 Is this clear? Hope this helps clarify things. - Ryan -- Ryan Thompson <ryan@sasknow.com> Systems Administrator, Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003121607290.7591-100000>