Oldie: underscores in 'names ... on -stable?

Mark Andrews Mark_Andrews at isc.org
Mon Sep 12 17:51:48 PDT 2005


> Hello,
> 
> Just a quick repeat of an old question (because it's late, I'm tired and
> want to go to bed instead of spending the next few hours googling this
> subject):
> 
> I run FreeBSD 5.4-stable on my main workstation. When  I try to use an
> URL on the form some_name.example.org (note the '_' (underscore)
> character) in a browser (Mozilla, Opera, Firefox) it complains that it
> can't find the name.
> On other platforms (windows, Mac OS X) this works with the same
> browsers.

	They just have a more liberal gethostbyname() implementation
	that doesn't check the syntax of the strings past to it.
	
> If I try it with ping in a shell (on FreeBSD), it also fails.
> However both 'host' and 'nslookup' happily foes a lookup of that name.
> so it seems that our resolver (on FreeBSD) is to blame.
> 
> I have seen a few old (ok, from 2003) mailing list posts, which seems to
> indicate that the official rules says that 'underscores are not allowed
> in hostnames'. Is this still the case?

	It has ALWAYS been the case.  See RFC 952 and RFC 1123 and
	their predecessors.  See RFC 1034 which says ...

3.3. Technical guidelines on use

For hosts, the mapping depends on the existing syntax for host names
which is a subset of the usual text representation for domain names,
together with RR formats for describing host addresses, etc.  Because we
need a reliable inverse mapping from address to host name, a special
mapping for addresses into the IN-ADDR.ARPA domain is also defined.

3.5. Preferred name syntax

The DNS specifications attempt to be as general as possible in the rules
for constructing domain names.  The idea is that the name of any
existing object can be expressed as a domain name with minimal changes.
However, when assigning a domain name for an object, the prudent user
will select a name which satisfies both the rules of the domain system
and any existing rules for the object, whether these rules are published
or implied by existing programs.

	That is the DNS doesn't change what is legal in a hostname.
 
> If so, why is FreeBSD in rwo minds about it (nslookup and host working,
> resolver not)?

	Nslookup and host take domain names not hostnames.  Not everything
	in the DNS is a host.
 
> Good night everybody.
> -- 
> Regards,
> Torfinn Ingolfsen,
> Norway
> 
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews at isc.org


More information about the freebsd-stable mailing list