Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Jun 2000 18:33:15 -0400
From:      "Troy Settle" <troy@picus.com>
To:        "Doug Barton" <DougB@gorean.org>, <webmaster@wmptl.com>
Cc:        <questions@freebsd.org>
Subject:   RE: IP vs CNAME
Message-ID:  <FCEELIAEIIECDGKKJLMIAECHCAAA.troy@picus.com>
In-Reply-To: <3938892F.FC65E69A@gorean.org>

next in thread | previous in thread | raw e-mail | index | archive | help

** -----Original Message-----
** From: Doug Barton
**
** Nathan Vidican wrote:
** >
** > We are a relatively small ISP looking to grow. We're now
** starting to do
** > virtualhosting for people, and thus far I've been setting up
** > virtualhosts using cnames.
**
** 	Why are you using CNAME's? You are needlessly doubling
** the traffic to
** your nameservers for every lookup. It's much better to define each host
** as an A record that points to the IP address of your vhost'ing server.

There is nothing wrong with using a CNAME.  With the original poster's
setup, renumbering is a snap.  Change the A record for the server, and all
the hosted domains magically follow right along (not that it would be
difficult to change the A record in 10's of thousands of domains with a
single command line).  The extra bandwidth is pretty much a non-issue.

** > The thing is, we've currently three almost
** > entirely free class C banks of IP addresses, and I was
** wondering if it
** > would be better to use IP based virtualhosting, or stick with our
** > current scheme of using cnames to one host?
**
** 	Better to keep the IP's for something more useful down
** the road. With
** the current IP situation, it's foolish to waste them if you don't need
** to, and would be frowned on by ARIN when it comes time to SWIP.

Which "Ip situation" is that?  Shortage?  Don't make me laugh.  ARIN
doesn't care that you use IPs, they care that you use them efficiently.
IOW, don't use a whole class C for a leased line customer with 5
workstations.  The situation with IP address allocations, is that we need
to reduce the number of routes in the global routing tables.  There are
still hundreds of thousands of blocks availiable for assignment.

**
** >         Could anyone explain the performance differences if
** any involved in
** > using IP vs CNAME virtualhosts?
**
** 	There is no connection between name based vhosts and
** CNAME's. The only
** requirement for a name based vhost is that it resolve to the IP of your
** server. By not using CNAME's you can have much more
** flexibility for your
** customers down the road because you can offer them custom DNS entries
** (like MX records, etc.) that you won't be able to do if you use CNAME's
** for their hosts.

Uh... MX has nothing to do with the web hosting side of things.  In fact,
the MX record doesn't have much to do with ANY other record in a given
zone.  You can have a zone file that has *nothing* but an MX record in it,
and mail will arrive at the specified target.

As for your basic DNS config, there's absolutely nothign wrong with the
following:

@       IN    CNAME    webhost.isp.net.
        IN    MX  10   mailhost.isp.net.
        IN    MX  20   spooler.isp.net.
	  IN    NS       ns1.isp.net.
        IN    NS       ns2.isp.net.
www     IN    CNAME    webhost.isp.net.
mail    IN    CNAME    mailhost.isp.net.

It's short, simple, and *never* has to be adjusted when renumbering or
moving the physical web or mail server.

**
** 	All that said, there are no performance differences
** between name and IP
** based vhosts. Why would there be?

You are right, there is no performance difference.


-Troy




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?FCEELIAEIIECDGKKJLMIAECHCAAA.troy>