Network Working Group R. Rosenbaum
Request for Comments: 1464 Digital Equipment Corporation
May 1993
Using the Domain Name System To Store Arbitrary String Attributes
1. Introduction
The Domain Name System is designed to store information that has both a predefined type and structure. Examples include IP addresses of hosts and names of mail exchangers. It would be useful to take advantage of the widespread use and scaleability of the DNS to store information that has not been previously defined.
2. Format of TXT record
To store new types of information, the TXT record uses a structured format in its TXT-DATA field. The format consists of the attribute name followed by the value of the attribute. The name and value are separated by an equals sign (=). For example, the following TXT records contain attributes specified in this fashion:
Rosenbaum [Page 1]
RFC 1464 Storing Arbitrary Attributes in DNS May 1993
host.widgets.com IN TXT "printer=lpr5" sam.widgets.com IN TXT "favorite drink=orange juice"
Rosenbaum [Page 2]
RFC 1464 Storing Arbitrary Attributes in DNS May 1993
Examplesequation a=4 equation=a=4 "equation=a=4" a=a true a`=a=true "a`=a=true" a\=a false a\`=a=false "a\\`=a=false"= \= `==\= "`==\\="
novalue novalue= "novalue="
a b c d a b=c d "a b=c d"
abc<sp> 123<sp> abc` =123<sp> "abc` =123 "
3. Application Usage
The attributes can be accessed by the standard resolver library, but it is recommended that a library routine designed specially for this attribute format be used. Such a routine might provide an analogue to gethostbyname:
getattributebyname(objectname, name of object
attributename, name of attribute
attributevalue, pointer to buffer attributevaluelen) length of buffer
4. Attribute Name Registration
To permit ease of interoperability and to reduce the chance of naming conflicts, a registration process for well known attribute names might be established. This could be a periodically updated list of names and/or adherence to other name registration mechanisms such as published object identifiers.
Rosenbaum [Page 3]
RFC 1464 Storing Arbitrary Attributes in DNS May 1993 5. RestrictionsSome DNS server implementations place limits on the size or number of TXT records associated with a particular owner. Certain implementations may not support TXT records at all.
6. REFERENCES and BIBLIOGRAPHY
[1] Stahl, M., "Domain Administrators Guide", RFC 1032, Network
7. Security Considerations
Security issues are not discussed in this memo.
8. Author's Address
Rich Rosenbaum Digital Equipment Corporation 550 King Street, LKG2-2/Z7 Littleton, MA 01460-1289