[svlug] to hosts or not to hosts

Jeremiah Wuenschel jeremiah.wuenschel at gmail.com
Wed Jan 21 13:58:46 PST 2009

Hi Skip,

It has been my experience that using DNS for this purpose is the most
desirable and flexible solution. Accessing your systems via DNS makes them
easy to remember and far more manageable than tracking IP addresses
everywhere. As an example, if you were to grow enough that you wanted to
split mantis off onto a different server, you would prefer to have to make a
change in one location, rather than having everyone use a different URL or
change their /etc/hosts file. You will notice no performance differences at
all, due to DNS caching and the speed of your LAN.

For local DNS, my favorite lightweight DNS server is called Dnsmasq. It
could not be simpler to configure, and it can be used to cache external DNS
for your LAN as well as resolving names locally. You just install it, and
add lines to the /etc/hosts file on the Dnsmasq server. Then on each LAN
box, you change the primary resolver in /etc/resolv.conf to point to the new
server. From this point on, every time you update /etc/hosts on the Dnsmasq
box, everyone else will begin pointing to the new IP. If a domain name is
requested that Dnsmasq doesn't recognize, it will request the entry from
your external DNS and cache the result. Dnsmasq can even be configured to
handle your DHCP for you, making it unnecessary to edit the /etc/resolv.conf

Good Luck!

On Wed, Jan 21, 2009 at 6:57 AM, Skip Evans <skip at bigskypenguin.com> wrote:

> Hey all,
> Here on our LAN we have a couple of development servers where
> all our client code sits as happy as clams. For code editing
> we just mount them as NFS points and edit away, but web based
> systems we use for project management (dotProject) and issues
> tracking (Mantis), we of course connect through http.
> My question is this:
> Is it more efficient or desirable to put an entry in
> /etc/hosts
> like say
>   dotproject.venomouspenguin.com
>   mantis.venomouspenguin.com
> for these applications?
> I have tried it both ways and see no discernible performance
> increase.
> I would guess one advantage would be these apps would still be
> accessible if the connection to the outside went down?
> Does it resolve the local apps to a 192.168 internal address
> even without the entries (I would guess not), or does it
> always go outside first?
> Does it also depend on the entries in resolv.conf which way ti
> goes (inside or out)?
> --
> ====================================
> Skip Evans
> Big Sky Penguin, LLC
> 503 S Baldwin St, #1
> Madison WI 53703
> 608.250.2720
> http://bigskypenguin.com
> ------------------------------------
> Those of you who believe in
> telekinesis, raise my hand.
>  -- Kurt Vonnegut
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.svlug.org/archives/svlug/attachments/20090121/0fd8bb05/attachment.htm

More information about the svlug mailing list