📄 rfc1034.txt
字号:
For example, a mailer tying to send mail to Mockapetris@ISI.EDU mightask the resolver for mail information about ISI.EDU, resulting in aquery for QNAME=ISI.EDU, QTYPE=MX, QCLASS=IN. The response's answersection would be: ISI.EDU. MX 10 VENERA.ISI.EDU. MX 10 VAXA.ISI.EDU.while the additional section might be: VAXA.ISI.EDU. A 10.2.0.27 A 128.9.0.33 VENERA.ISI.EDU. A 10.1.0.52 A 128.9.0.32Because the server assumes that if the requester wants mail exchangeinformation, it will probably want the addresses of the mail exchangessoon afterward.Note that the QCLASS=* construct requires special interpretationregarding authority. Since a particular name server may not know all ofthe classes available in the domain system, it can never know if it isauthoritative for all classes. Hence responses to QCLASS=* queries canMockapetris [Page 17]RFC 1034 Domain Concepts and Facilities November 1987never be authoritative.3.7.2. Inverse queries (Optional)Name servers may also support inverse queries that map a particularresource to a domain name or domain names that have that resource. Forexample, while a standard query might map a domain name to a SOA RR, thecorresponding inverse query might map the SOA RR back to the domainname.Implementation of this service is optional in a name server, but allname servers must at least be able to understand an inverse querymessage and return a not-implemented error response.The domain system cannot guarantee the completeness or uniqueness ofinverse queries because the domain system is organized by domain namerather than by host address or any other resource type. Inverse queriesare primarily useful for debugging and database maintenance activities.Inverse queries may not return the proper TTL, and do not indicate caseswhere the identified RR is one of a set (for example, one address for ahost having multiple addresses). Therefore, the RRs returned in inversequeries should never be cached.Inverse queries are NOT an acceptable method for mapping host addressesto host names; use the IN-ADDR.ARPA domain instead.A detailed discussion of inverse queries is contained in [RFC-1035].3.8. Status queries (Experimental)To be defined.3.9. Completion queries (Obsolete)The optional completion services described in RFCs 882 and 883 have beendeleted. Redesigned services may become available in the future, or theopcodes may be reclaimed for other use.4. NAME SERVERS4.1. IntroductionName servers are the repositories of information that make up the domaindatabase. The database is divided up into sections called zones, whichare distributed among the name servers. While name servers can haveseveral optional functions and sources of data, the essential task of aname server is to answer queries using data in its zones. By design,Mockapetris [Page 18]RFC 1034 Domain Concepts and Facilities November 1987name servers can answer queries in a simple manner; the response canalways be generated using only local data, and either contains theanswer to the question or a referral to other name servers "closer" tothe desired information.A given zone will be available from several name servers to insure itsavailability in spite of host or communication link failure. Byadministrative fiat, we require every zone to be available on at leasttwo servers, and many zones have more redundancy than that.A given name server will typically support one or more zones, but thisgives it authoritative information about only a small section of thedomain tree. It may also have some cached non-authoritative data aboutother parts of the tree. The name server marks its responses to queriesso that the requester can tell whether the response comes fromauthoritative data or not.4.2. How the database is divided into zonesThe domain database is partitioned in two ways: by class, and by "cuts"made in the name space between nodes.The class partition is simple. The database for any class is organized,delegated, and maintained separately from all other classes. Since, byconvention, the name spaces are the same for all classes, the separateclasses can be thought of as an array of parallel namespace trees. Notethat the data attached to nodes will be different for these differentparallel classes. The most common reasons for creating a new class arethe necessity for a new data format for existing types or a desire for aseparately managed version of the existing name space.Within a class, "cuts" in the name space can be made between any twoadjacent nodes. After all cuts are made, each group of connected namespace is a separate zone. The zone is said to be authoritative for allnames in the connected region. Note that the "cuts" in the name spacemay be in different places for different classes, the name servers maybe different, etc.These rules mean that every zone has at least one node, and hence domainname, for which it is authoritative, and all of the nodes in aparticular zone are connected. Given, the tree structure, every zonehas a highest node which is closer to the root than any other node inthe zone. The name of this node is often used to identify the zone.It would be possible, though not particularly useful, to partition thename space so that each domain name was in a separate zone or so thatall nodes were in a single zone. Instead, the database is partitionedat points where a particular organization wants to take over control ofMockapetris [Page 19]RFC 1034 Domain Concepts and Facilities November 1987a subtree. Once an organization controls its own zone it canunilaterally change the data in the zone, grow new tree sectionsconnected to the zone, delete existing nodes, or delegate new subzonesunder its zone.If the organization has substructure, it may want to make furtherinternal partitions to achieve nested delegations of name space control.In some cases, such divisions are made purely to make databasemaintenance more convenient.4.2.1. Technical considerationsThe data that describes a zone has four major parts: - Authoritative data for all nodes within the zone. - Data that defines the top node of the zone (can be thought of as part of the authoritative data). - Data that describes delegated subzones, i.e., cuts around the bottom of the zone. - Data that allows access to name servers for subzones (sometimes called "glue" data).All of this data is expressed in the form of RRs, so a zone can becompletely described in terms of a set of RRs. Whole zones can betransferred between name servers by transferring the RRs, either carriedin a series of messages or by FTPing a master file which is a textualrepresentation.The authoritative data for a zone is simply all of the RRs attached toall of the nodes from the top node of the zone down to leaf nodes ornodes above cuts around the bottom edge of the zone.Though logically part of the authoritative data, the RRs that describethe top node of the zone are especially important to the zone'smanagement. These RRs are of two types: name server RRs that list, oneper RR, all of the servers for the zone, and a single SOA RR thatdescribes zone management parameters.The RRs that describe cuts around the bottom of the zone are NS RRs thatname the servers for the subzones. Since the cuts are between nodes,these RRs are NOT part of the authoritative data of the zone, and shouldbe exactly the same as the corresponding RRs in the top node of thesubzone. Since name servers are always associated with zone boundaries,NS RRs are only found at nodes which are the top node of some zone. Inthe data that makes up a zone, NS RRs are found at the top node of theMockapetris [Page 20]RFC 1034 Domain Concepts and Facilities November 1987zone (and are authoritative) and at cuts around the bottom of the zone(where they are not authoritative), but never in between.One of the goals of the zone structure is that any zone have all thedata required to set up communications with the name servers for anysubzones. That is, parent zones have all the information needed toaccess servers for their children zones. The NS RRs that name theservers for subzones are often not enough for this task since they namethe servers, but do not give their addresses. In particular, if thename of the name server is itself in the subzone, we could be faced withthe situation where the NS RRs tell us that in order to learn a nameserver's address, we should contact the server using the address we wishto learn. To fix this problem, a zone contains "glue" RRs which are notpart of the authoritative data, and are address RRs for the servers.These RRs are only necessary if the name server's name is "below" thecut, and are only used as part of a referral response.4.2.2. Administrative considerationsWhen some organization wants to control its own domain, the first stepis to identify the proper parent zone, and get the parent zone's ownersto agree to the delegation of control. While there are no particulartechnical constraints dealing with where in the tree this can be done,there are some administrative groupings discussed in [RFC-1032] whichdeal with top level organization, and middle level zones are free tocreate their own rules. For example, one university might choose to usea single zone, while another might choose to organize by subzonesdedicated to individual departments or schools. [RFC-1033] catalogsavailable DNS software an discusses administration procedures.Once the proper name for the new subzone is selected, the new ownersshould be required to demonstrate redundant name server support. Notethat there is no requirement that the servers for a zone reside in ahost which has a name in that domain. In many cases, a zone will bemore accessible to the internet at large if its servers are widelydistributed rather than being within the physical facilities controlledby the same organization that manages the zone. For example, in thecurrent DNS, one of the name servers for the United Kingdom, or UKdomain, is found in the US. This allows US hosts to get UK data withoutusing limited transatlantic bandwidth.As the last installation step, the delegation NS RRs and glue RRsnecessary to make the delegation effective should be added to the parentzone. The administrators of both zones should insure that the NS andglue RRs which mark both sides of the cut are consistent and remain so.4.3. Name server internalsMockapetris [Page 21]RFC 1034 Domain Concepts and Facilities November 19874.3.1. Queries and responsesThe principal activity of name servers is to answer standard queries.Both the query and its response are carried in a standard message formatwhich is described in [RFC-1035]. The query contains a QTYPE, QCLASS,and QNAME, which describe the types and classes of desired informationand the name of interest.The way that the name server answers the query depends upon whether itis operating in recursive mode or not: - The simplest mode for the server is non-recursive, since it can answer queries using only local information: the response contains an error, the answer, or a referral to some other server "closer" to the answer. All name servers must implement non-recursive queries. - The simplest mode for the client is recursive, since in this mode the name server acts in the role of a resolver and returns either an error or the answer, but never referrals. This service is optional in a name server, and the name server may also choose to restrict the clients which can use recursive mode.Recursive service is helpful in several situations: - a relatively simple requester that lacks the ability to use anything other than a direct answer to the question. - a request that needs to cross protocol or other boundaries and can be sent to a server which can act as intermediary. - a network where we want to concentrate the cache rather than having a separate cache for each client.Non-recursive service is appropriate if the requester is capable ofpursuing referrals and interested in information which will aid futurerequests.The use of recursive mode is limited to cases where both the client andthe name server agree to its use. The agreement is negotiated throughthe use of two bits in query and response messages: - The recursion available, or RA bit, is set or cleared by a name server in all responses. The bit is true if the name server is willing to provide recursive service for the client, regardless of whether the client requested recursive service. That is, RA signals availability rather than use.Mockapetris [Page 22]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -