Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2003 19:40:09 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Resolver Issues (non valid hostname characters)
Message-ID:  <200303251840.h2PIe9EK004915@lurza.secnetix.de>
In-Reply-To: <086701c2f2ed$1f7ecd90$e1db7bd1@kenxp>

next in thread | previous in thread | raw e-mail | index | archive | help
Ken Menzel <kenm@icarz.com> wrote:
 > I am not sure where you think freebsd needs support for underscores in
 > the resolver.
 > freebsd2# hostname -s free_bsd2
 > freebsd2# hostname
 > free_bsd2.icarz.com
 > freebsd2#vi /etc/hosts   (edit host file here adding new name)
 > freebsd2# ping free_bsd2
 > PING free_bsd2.icarz.com (207.99.22.11): 56 data bytes
 > 64 bytes from 207.99.22.11: icmp_seq=0 ttl=64 time=0.128 ms

Neither the machine's hostname nor /etc/hosts have got anything
to do with DNS or BIND.  In fact, you can set the machine's
hostname to anything you like, including not setting it at all,
or setting it to something completely different from the machine's
DNS name.  It might confuse a few programs or scripts, though.

In fact, I was working for some time on a Solaris machine before
I noticed that its hostname was "-s" (yes, a dash followed by the
letter s).  It turned out that a cow-orker had run a configure
script of some crappy Linux software a few days before.  That
configure script used "hostname -s" to find out the hostname, but
that particular version of Solaris did not support that option.
Instead, it just set the hostname to whatever was given as the
first argument.

On another pool of machines, /etc/hosts contains MAC addresses.
Those wouldn't be legal names in DNS (because of the colons),
but they work perfectly fine in /etc/hosts, so you can easily
lookup and ping MAC addresses.  That has been very handy in
that environment.

But in DNS, anything except letters, digits and dashes is not
allowed (apart from the separating dots, of course).

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"If you do things right, people won't be sure you've done
anything at all." -- God in Futurama season 4 episode 8

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303251840.h2PIe9EK004915>