Valid charecter set in DNS

"dhiraj Dhiraj" <gdhiraj@novell.com> Wed, 17 April 2002 03:40 UTC

Received: from nic.cafax.se (nic.cafax.se [192.71.228.17]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id XAA00213 for <dnsop-archive@lists.ietf.org>; Tue, 16 Apr 2002 23:40:58 -0400 (EDT)
Received: from nic.cafax.se (localhost [127.0.0.1]) by nic.cafax.se (8.12.3/8.12.3) with ESMTP id g3H3OVTB019939 for <dnsop-outgoing@nic.cafax.se>; Wed, 17 Apr 2002 05:24:31 +0200 (MEST)
Received: from localhost (localhost [[UNIX: localhost]]) by nic.cafax.se (8.12.3/8.12.3/Submit) id g3H3OVED019938 for dnsop-outgoing; Wed, 17 Apr 2002 05:24:31 +0200 (MEST)
X-Authentication-Warning: nic.cafax.se: majordom set sender to owner-dnsop@cafax.se using -f
Received: from prv-mail25.provo.novell.com (prv-mail25.provo.novell.com [137.65.81.121]) by nic.cafax.se (8.12.3/8.12.3) with ESMTP id g3H3OTTB019933 for <dnsop@cafax.se>; Wed, 17 Apr 2002 05:24:30 +0200 (MEST)
Received: from INET-PRV1-MTA by prv-mail25.provo.novell.com with Novell_GroupWise; Tue, 16 Apr 2002 21:24:26 -0600
Message-Id: <scbc968a.050@prv-mail25.provo.novell.com>
X-Mailer: Novell GroupWise Internet Agent 6.0.1
Date: Tue, 16 Apr 2002 21:24:09 -0600
From: "dhiraj Dhiraj" <gdhiraj@novell.com>
To: <dnsop@cafax.se>, <namedroppers@ops.ietf.org>
Subject: Valid charecter set in DNS
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Sender: owner-dnsop@cafax.se
Precedence: bulk
Content-Transfer-Encoding: 7bit

Hi all,
               I have a question regarding the valid character set in
DNS. I have seen RFC 1034, 1123, 2181. It seems RFC 2181 removes the
restrictions of RFC 1034,1123 which says that only  letters, digits, and
hyphen are allowed. I wanted to know whether this interpretation is
correct or not and if it is, then what are the applications that require
other characters? I am aware of that underscores are required bcoz of
the SRV RR. 


RFC 1034 section 3.5: The labels must follow the rules for ARPANET host
names.  They must start with a letter, end with a letter or digit, and
have as interior characters only letters, digits, and hyphen.  There are
also some restrictions on the length.  Labels must be 63 characters or
less.

<domain>      ::= <subdomain> | " "
<subdomain>   ::= <label> | <subdomain> "." <label>
<label>       ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str>     ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig>     ::= <letter> | <digit>
<letter>      ::= any one of the 52 alphabetic characters A through Z
in
                  upper case and a through z in lower case
<digit>       ::= any one of the ten digits 0 through 9

RFC 1123 2.1  Host Names and Numbers:  The syntax of a legal Internet
host name was specified in RFC-952 [DNS:4].  One aspect of host name
syntax is hereby changed: the restriction on the first character is
relaxed to allow either a letter or a digit.  Host software MUST support
this more liberal  syntax. Host software MUST handle host names of up to
63 characters and SHOULD handle host names of up to 255 characters.

RFC 2181 11. Name syntax: The DNS itself places only one restriction on
the particular labels that can be used to identify resource records. 
That one restriction relates to the length of the label and the full
name.  The length of any one label is limited to between 1 and 63
octets.  A full domain name is limited to 255 octets (including the
separators).  The zero length full name is defined as representing the
root of the DNS tree, and is typically written and displayed as ".". 
Those restrictions aside, any binary string whatever can be used as the
label of any resource record.  Similarly, any binary string can serve as
the value of any record that includes a domain name as some or all of
its value (SOA, NS, MX, PTR, CNAME, and any others that may be added).
Implementations of the DNS protocols must not place any restrictions on
the labels that can be used.  In particular, DNS servers must not refuse
to serve a zone because it contains labels that might not be acceptable
to some DNS client programs.  A DNS server may be configurable to issue
warnings when loading, or even to refuse to load, a primary zone
containing labels that might be considered questionable, however this
should not happen by default.


Regards
dhiraj