rfc883.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,582 行 · 第 1/5 页
TXT
1,582 行
Network Working Group P. Mockapetris
Request for Comments: 883 ISI
November 1983
DOMAIN NAMES - IMPLEMENTATION and SPECIFICATION
+-----------------------------------------------------+
| |
| This memo discusses the implementation of domain |
| name servers and resolvers, specifies the format of |
| transactions, and discusses the use of domain names |
| in the context of existing mail systems and other |
| network software. |
| |
| This memo assumes that the reader is familiar with |
| RFC 882, "Domain Names - Concepts and Facilities" |
| which discusses the basic principles of domain |
| names and their use. |
| |
| The algorithms and internal data structures used in |
| this memo are offered as suggestions rather than |
| requirements; implementers are free to design their |
| own structures so long as the same external |
| behavior is achieved. |
| |
+-----------------------------------------------------+
+-----------------------------------------------+
| |
| ***** WARNING ***** |
| |
| This RFC contains format specifications which |
| are preliminary and are included for purposes |
| of explanation only. Do not attempt to use |
| this information for actual implementations. |
| |
+-----------------------------------------------+
Mockapetris [Page i]
RFC 883 November 1983
Domain Names - Implementation and Specification
TABLE OF CONTENTS
INTRODUCTION........................................................3
Overview.........................................................3
Implementation components........................................2
Conventions......................................................6
Design philosophy................................................8
NAME SERVER TRANSACTIONS...........................................11
Introduction....................................................11
Query and response transport....................................11
Overall message format..........................................13
The contents of standard queries and responses..................15
Standard query and response example.............................15
The contents of inverse queries and responses...................17
Inverse query and response example..............................18
Completion queries and responses................................19
Completion query and response example...........................22
Recursive Name Service..........................................24
Header section format...........................................26
Question section format.........................................29
Resource record format..........................................30
Domain name representation and compression......................31
Organization of the Shared database.............................33
Query processing................................................36
Inverse query processing........................................37
Completion query processing.....................................38
NAME SERVER MAINTENANCE............................................39
Introduction....................................................39
Conceptual model of maintenance operations......................39
Name server data structures and top level logic.................41
Name server file loading........................................43
Name server file loading example................................45
Name server remote zone transfer................................47
RESOLVER ALGORITHMS................................................50
Operations......................................................50
DOMAIN SUPPORT FOR MAIL............................................52
Introduction....................................................52
Agent binding...................................................53
Mailbox binding.................................................54
Appendix 1 - Domain Name Syntax Specification......................56
Appendix 2 - Field formats and encodings...........................57
TYPE values.....................................................57
QTYPE values....................................................57
CLASS values....................................................58
QCLASS values...................................................58
Standard resource record formats................................59
Appendix 3 - Internet specific field formats and operations........67
REFERENCES and BIBLIOGRAPHY........................................72
INDEX..............................................................73
Mockapetris [Page ii]
RFC 883 November 1983
Domain Names - Implementation and Specification
INTRODUCTION
Overview
The goal of domain names is to provide a mechanism for naming
resources in such a way that the names are usable in different
hosts, networks, protocol families, internets, and administrative
organizations.
From the user's point of view, domain names are useful as
arguments to a local agent, called a resolver, which retrieves
information associated with the domain name. Thus a user might
ask for the host address or mail information associated with a
particular domain name. To enable the user to request a
particular type of information, an appropriate query type is
passed to the resolver with the domain name. To the user, the
domain tree is a single information space.
From the resolver's point of view, the database that makes up the
domain space is distributed among various name servers. Different
parts of the domain space are stored in different name servers,
although a particular data item will usually be stored redundantly
in two or more name servers. The resolver starts with knowledge
of at least one name server. When the resolver processes a user
query it asks a known name server for the information; in return,
the resolver either receives the desired information or a referral
to another name server. Using these referrals, resolvers learn
the identities and contents of other name servers. Resolvers are
responsible for dealing with the distribution of the domain space
and dealing with the effects of name server failure by consulting
redundant databases in other servers.
Name servers manage two kinds of data. The first kind of data
held in sets called zones; each zone is the complete database for
a particular subtree of the domain space. This data is called
authoritative. A name server periodically checks to make sure
that its zones are up to date, and if not obtains a new copy of
updated zones from master files stored locally or in another name
server. The second kind of data is cached data which was acquired
by a local resolver. This data may be incomplete but improves the
performance of the retrieval process when non-local data is
repeatedly accessed. Cached data is eventually discarded by a
timeout mechanism.
This functional structure isolates the problems of user interface,
failure recovery, and distribution in the resolvers and isolates
the database update and refresh problems in the name servers.
Mockapetris [Page 1]
RFC 883 November 1983
Domain Names - Implementation and Specification
Implementation components
A host can participate in the domain name system in a number of
ways, depending on whether the host runs programs that retrieve
information from the domain system, name servers that answer
queries from other hosts, or various combinations of both
functions. The simplest, and perhaps most typical, configuration
is shown below:
Local Host | Foreign
|
+---------+ +----------+ | +--------+
| | user queries | |queries | | |
| User |-------------->| |---------|->|Foreign |
| Program | | Resolver | | | Name |
| |<--------------| |<--------|--| Server |
| | user responses| |responses| | |
+---------+ +----------+ | +--------+
| A |
cache additions | | references |
V | |
+----------+ |
| database | |
+----------+ |
User programs interact with the domain name space through
resolvers; the format of user queries and user responses is
specific to the host and its operating system. User queries will
typically be operating system calls, and the resolver and its
database will be part of the host operating system. Less capable
hosts may choose to implement the resolver as a subroutine to be
linked in with every program that needs its services.
Resolvers answer user queries with information they acquire via
queries to foreign name servers, and may also cache or reference
domain information in the local database.
Note that the resolver may have to make several queries to several
different foreign name servers to answer a particular user query,
and hence the resolution of a user query may involve several
network accesses and an arbitrary amount of time. The queries to
foreign name servers and the corresponding responses have a
standard format described in this memo, and may be datagrams.
Mockapetris [Page 2]
RFC 883 November 1983
Domain Names - Implementation and Specification
Depending on its capabilities, a name server could be a stand
alone program on a dedicated machine or a process or processes on
a large timeshared host. A simple configuration might be:
Local Host | Foreign
|
+---------+ |
/ /| |
+---------+ | +----------+ | +--------+
| | | | |responses| | |
| | | | Name |---------|->|Foreign |
| Master |-------------->| Server | | |Resolver|
| files | | | |<--------|--| |
| |/ | | queries | +--------+
+---------+ +----------+ |
Here the name server acquires information about one or more zones
by reading master files from its local file system, and answers
queries about those zones that arrive from foreign resolvers.
A more sophisticated name server might acquire zones from foreign
name servers as well as local master files. This configuration is
shown below:
Local Host | Foreign
|
+---------+ |
/ /| |
+---------+ | +----------+ | +--------+
| | | | |responses| | |
| | | | Name |---------|->|Foreign |
| Master |-------------->| Server | | |Resolver|
| files | | | |<--------|--| |
| |/ | | queries | +--------+
+---------+ +----------+ |
A |maintenance | +--------+
| \------------|->| |
| queries | |Foreign |
| | | Name |
\------------------|--| Server |
maintenance responses | +--------+
In this configuration, the name server periodically establishes a
virtual circuit to a foreign name server to acquire a copy of a
zone or to check that an existing copy has not changed. The
messages sent for these maintenance activities follow the same
form as queries and responses, but the message sequences are
somewhat different.
Mockapetris [Page 3]
RFC 883 November 1983
Domain Names - Implementation and Specification
The information flow in a host that supports all aspects of the
domain name system is shown below:
Local Host | Foreign
|
+---------+ +----------+ | +--------+
| | user queries | |queries | | |
| User |-------------->| |---------|->|Foreign |
| Program | | Resolver | | | Name |
| |<--------------| |<--------|--| Server |
| | user responses| |responses| | |
+---------+ +----------+ | +--------+
| A |
cache additions | | references |
V | |
+----------+ |
| Shared | |
| database | |
+----------+ |
A | |
+---------+ refreshes | | references |
/ /| | V |
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?