Mark Andrews
INTERNET DRAFT CSIRO
Expires: September 1996 March May 1996
Updates RFC-1035
ASCII Encoding for Domain Names
draft-andrews-dns-ascii-00.txt
draft-andrews-dns-ascii-01.txt
1. Status of This Memo
This document is an Internet Draft. Internet Drafts are working
documents of the Internet Engineering Task Force (IETF), its Areas,
and its Working Groups. Note that other groups may also distribute
working documents as Internet Drafts.
Internet Drafts are draft documents valid for a maximum of six
months. Internet Drafts may be updated, replaced, or obsoleted by
other documents at any time. It is not appropriate to use Internet
Drafts as reference material or to cite them other than as a "working
draft" or "work in progress."
Please check the 1id-abstracts.txt listing contained in the internet-
drafts Shadow Directories to learn the current status of any Internet
Draft.
2. Abstract
At the protocol level, DNS domain names and records may contain
arbitrary binary data. There is not however a standard way of
representing these domains as ASCII strings. This RFC
[RFC 1035 Section 5.1] describes how to encode domain names as a single
character strings. It however allows non printable characters to be
used. It also allows for encodings of text files which would not
survive intact ftp ASCII string containing no white
space. mode transfers, different end of line
conventions. This document addresses these problems by stating where
octal escapes MUST be used.
While a applications MUST continue to read the full range as
expressed by [RFC 1035 5.1]. They MUST emit only this selected
subset.
3. Encoding
Octets within the follow ranges are encoded as backslash followed by
three octal digits, 0x00 - 0x08, 0x0b - 0x0c, 0x0e - 0x1f, 0x20, 0x7f - 0xff.
e.g.
0x00, \000
0x1f, \177
0xff, \377
Period (".") when NOT used as a domain separator is encoded as the
sequence backslash period, e.g. "\.". Un-escaped periods indicate
label separators.
Backslash ("\") is encoded as two consecutive backslashes, e.g. "\\".
The follow are special encoding for particular characters.
0x09, "\t", Horizontal Tab
0x0a, "\n", Newline
0x0d, "\r", Carriage Return
0x20, "\s",
Double quotes ('"') should always be represented as backslash quote
as a common nameserver implementation mis-parses strings containing
quotes, e.g. '\"'.
Semi-colon (";") should always be encoded as backslash semi-colon
otherwise it will be interpreted as a comment. e.g. "\;".
Space may be a literal space when the string is enclosed by double
quotes.
All other characters represent their literal ASCII encoding eighth
bit not set.
4. Security
This draft introduces no known security problems. It may however
remove some latent security problems in applications where the
encoding is NOT reversible leading to unexpected changes in domain
names.
5.
4. References
[RFC-1035]
P. Mockapetris, ``DOMAIN NAMES - IMPLEMENTATION AND
SPECIFICATION'', RFC-1035, ISI, November 1987.
6. Author's Address
Mark Andrews
CSIRO
Division of Mathematics and Statistics
Locked Bag 17
North Ryde NSW 2113
AUSTRALIA
Mark.Andrews@dms.csiro.au [MA88]