Binary Labels in the Domain Name System
RFC 2673

Document Type RFC - Historic (August 1999; Errata)
Obsoleted by RFC 6891
Updated by RFC 3364, RFC 3363
Updates RFC 1035
Author Matt Crawford 
Last updated 2020-01-21
Stream IETF
Formats plain text html pdf htmlized with errata bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 2673 (Historic)
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                        M. Crawford
Request for Comments: 2673                                      Fermilab
Category: Standards Track                                    August 1999

                Binary Labels in the Domain Name System

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1999).  All Rights Reserved.

1.  Introduction and Terminology

   This document defines a "Bit-String Label" which may appear within
   domain names.  This new label type compactly represents a sequence of
   "One-Bit Labels" and enables resource records to be stored at any
   bit-boundary in a binary-named section of the domain name tree.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   document are to be interpreted as described in [KWORD].

2.  Motivation

   Binary labels are intended to efficiently solve the problem of
   storing data and delegating authority on arbitrary boundaries when
   the structure of underlying name space is most naturally represented
   in binary.

3.  Label Format

   Up to 256 One-Bit Labels can be grouped into a single Bit-String
   Label.  Within a Bit-String Label the most significant or "highest
   level" bit appears first.  This is unlike the ordering of DNS labels
   themselves, which has the least significant or "lowest level" label
   first.  Nonetheless, this ordering seems to be the most natural and
   efficient for representing binary labels.

Crawford                    Standards Track                     [Page 1]
RFC 2673        Binary Labels in the Domain Name System      August 1999

   Among consecutive Bit-String Labels, the bits in the first-appearing
   label are less significant or "at a lower level" than the bits in
   subsequent Bit-String Labels, just as ASCII labels are ordered.

3.1.  Encoding

      0                   1                   2
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2     . . .
     |0 1|    ELT    |     Count     |           Label ...         |

   (Each tic mark represents one bit.)

   ELT       000001 binary, the six-bit extended label type [EDNS0]
             assigned to the Bit-String Label.

   Count     The number of significant bits in the Label field.  A Count
             value of zero indicates that 256 bits are significant.
             (Thus the null label representing the DNS root cannot be
             represented as a Bit String Label.)

   Label     The bit string representing a sequence of One-Bit Labels,
             with the most significant bit first.  That is, the One-Bit
             Label in position 17 in the diagram above represents a
             subdomain of the domain represented by the One-Bit Label in
             position 16, and so on.

             The Label field is padded on the right with zero to seven
             pad bits to make the entire field occupy an integral number
             of octets.  These pad bits MUST be zero on transmission and
             ignored on reception.

   A sequence of bits may be split into two or more Bit-String Labels,
   but the division points have no significance and need not be
   preserved.  An excessively clever server implementation might split
   Bit-String Labels so as to maximize the effectiveness of message
   compression [DNSIS].  A simpler server might divide Bit-String Labels
   at zone boundaries, if any zone boundaries happen to fall between
   One-Bit Labels.

3.2.  Textual Representation

   A Bit-String Label is represented in text -- in a zone file, for
   example -- as a <bit-spec> surrounded by the delimiters "\[" and "]".
   The <bit-spec> is either a dotted quad or a base indicator and a
   sequence of digits appropriate to that base, optionally followed by a

Crawford                    Standards Track                     [Page 2]
RFC 2673        Binary Labels in the Domain Name System      August 1999

   slash and a length.  The base indicators are "b", "o" and "x",
   denoting base 2, 8 and 16 respectively.  The length counts the
   significant bits and MUST be between 1 and 32, inclusive, after a
   dotted quad, or between 1 and 256, inclusive, after one of the other
   forms.  If the length is omitted, the implicit length is 32 for a
   dotted quad or 1, 3 or 4 times the number of binary, octal or
   hexadecimal digits supplied, respectively, for the other forms.

   In augmented Backus-Naur form [ABNF],
Show full document text