Hostname configuration (was: Need help debugging...)

Ben Scott dragonhawk at gmail.com
Sun Feb 19 17:54:01 EST 2006


On 2/19/06, Steven W. Orr <steveo at syslang.net> wrote:
> 526 > hostname
> saturn.syslang.net

  When setting my system's hostname, I *prefer* (emphasis indicates a
subjective opinion) to set the system's hostname to the short
(unqualified) name.  For example:

	$ hostname
	wildfire

Then, I place an entry in my /etc/hosts file to provide the FQDN:

	$ grep wildfire /etc/hosts
	10.10.10.10     wildfire.bscott.local   wildfire

That means anything asking for the FQDN gets the right answer:

	$ hostname -f
	wildfire.bscott.local

  I find this strategy has the best track record in getting things to
work the way I want them to.  It means that just prints the hostname
for informational purposes doesn't fill the screen or file with half a
line of FQDN.  To me, it just looks neater.  Meanwhile, anything
asking for the FQDN will still get it, properly.  It means the FQDN is
only set in one place.  It also means that as domain names change, my
hostname remains the same.

  Put another way, my main personal computer's name is "wildfire". 
That's it's name regardless of where it is.  It has been
wildfire.bscott.local, wildfire.inside.nyisys.com,  and
wildfire.sr.unh.edu, to name a few that I remember.

  Again, this is just the way *I* prefer to do things.  There are
other ways that work just fine for other people.

  For example, it was recently pointed out to me that, for the case of
"a 2LD has only one server, and that server handles only that domain",
setting the system hostname to the 2LD means one does not have to
configure certain other things to know the difference between the
hostname and the domain name.  That is to say, if your FQDN is
"server.example.com", you might want to tell Sendmail to masquerade as
"example.com".  If you instead set the hostname to "example.com", you
do not need to do that.

  Personally, I think the 2LD==hostname strategy is suboptimal (i.e.,
I think it's totally wrong, but have little objective evidence to back
that up ;-) ) .  The way I look at things, a 2LD should be treated as
a thing separate from a hostname.  There's nothing in DNS that says
you need to do things that way; I just like to think of a 2LD as a
container, not a host.  This matters more if you have more than one
server to worry about.

  I'm wondering what others on the list think about this topic?  Since
it's so subjective, I'm sure we can get a real good flamewar going
over it.  ;-)

-- Ben



More information about the gnhlug-discuss mailing list