Subject: [netmod] revised domain-name typedef

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 31 Mar 2009 21:38:42 +0200

Hi,

we received valuable feedback on the domain-name typedef and the
current definition is attached below. This is still being reviewed by
the DNS directory but I think we are close in getting this right.

   typedef domain-name {
     type string {
       pattern '(([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*'
            +  '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?';
       length "1..253";
     }
     description
      "The domain-name type represents a DNS domain name. The
       name SHOULD be fully qualified whenever possible.

       Internet domain names are only loosely specified. Section
       3.5 of RFC 1034 recommends a syntax (modified in section
       2.1 of RFC 1123). The pattern above is intended to allow
       for current practise in domain name use, and some possible
       future expansion. It is designed to hold various types of
       domain names, including names used for A or AAAA records
       (host names) and other records, such as SRV records. Note
       that Internet host names have a stricter syntax (described
       in RFC 952) than the DNS recommendations in RFCs 1034 and
       1123, and that systems that want to store host names in
       objects using the domain-name type are recommended to adhere
       to this stricter standard to ensure interoperability.

       The encoding of DNS names in the DNS protocol is limited
       to 255 characters. Since the encoding consists of labels
       prefixed by a length bytes and there is a trailing NULL
       byte, only 253 characters can appear in the textual dotted
       notation.

       The description clause of objects using the domain-name
       type MUST describe how (and when) these names are
       resolved to IP addresses. Note that the resolution of a
       domain-name value may require to query multiple DNS records
       (e.g., A for IPv4 and AAAA for IPv6). The order of the
       resolution process and which DNS record takes precedence
       depends on the configuration of the resolver.

       The canonical format for domain-name values uses the
       US-ASCII encoding and case-insensitive characters are set
       to lowercase.";
     reference
      "RFC 1034: Domain Names - Concepts and Facilities
       RFC 1123: Requirements for Internet Hosts -- Application
                 and Support
       RFC 3490: Internationalizing Domain Names in Applications
                 (IDNA)";
   }

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>