DNSOP Working Group Paul Vixie, ISC
INTERNET-DRAFT Akira Kato, WIDE
- <draft-ietf-dnsop-respsize-04.txt> July 2006
+ <draft-ietf-dnsop-respsize-05.txt> August 2006
- DNS Response Size Issues
+ DNS Referral Response Size Issues
Status of this Memo
By submitting this Internet-Draft, each author represents that any
the DNS protocol presents some special problems for zones wishing to
expose a moderate or high number of authority servers (NS RRs). This
document explains the operational issues caused by, or related to
- this response size limit.
+ this response size limit, and suggests ways to optimize the use of
+ this limited space. Guidance is offered to DNS server implementors
+ and to DNS zone operators.
-
-
- Expires December 2006 [Page 1]
+ Expires January 2007 [Page 1]
\f
- INTERNET-DRAFT July 2006 RESPSIZE
+ INTERNET-DRAFT August 2006 RESPSIZE
1 - Introduction and Overview
not implicitly relaxed by changes in transport, for example to IPv6.
1.2. The EDNS0 protocol extension (see [RFC2671 2.3, 4.5]) permits
- larger responses by mutual agreement of the requestor and responder.
- However, deployment of EDNS0 cannot be expected to reach every Internet
- resolver in the short or medium term. The 512 octet message size limit
- remains in practical effect at this time.
+ larger responses by mutual agreement of the requester and responder.
+ The 512 octet message size limit will remain in practical effect until
+ there is widespread deployment of EDNS0 in DNS resolvers on the
+ Internet.
1.3. Since DNS responses include a copy of the request, the space
available for response data is somewhat less than the full 512 octets.
2 - Delegation Details
- 2.1. A delegation response will include the following elements:
+ 2.1. RELEVANT PROTOCOL ELEMENTS
+
+ 2.1.1. A delegation response will include the following elements:
Header Section: fixed length (12 octets)
Question Section: original query (name, class, type)
Authority Section: NS RRset (nameserver names)
Additional Section: A and AAAA RRsets (nameserver addresses)
- 2.2. If the total response size would exceed 512 octets, and if the data
- that would not fit was "required", then the TC bit will be set
- (indicating truncation). This will usually cause the requestor to retry
+ 2.1.2. If the total response size exceeds 512 octets, and if the data
+ that does not fit was "required", then the TC bit will be set
+ (indicating truncation). This will usually cause the requester to retry
using TCP, depending on what information was desired and what
- information was omitted. (For example, truncation in the authority
+ information was omitted. For example, truncation in the authority
section is of no interest to a stub resolver who only plans to consume
- the answer section.) If a retry using TCP is needed, the total cost of
+ the answer section. If a retry using TCP is needed, the total cost of
the transaction is much higher. See [RFC1123 6.1.3.2] for details on
the requirement that UDP be attempted before falling back to TCP.
- 2.3. RRsets are never sent partially unless TC bit set to indicate
+ 2.1.3. RRsets are never sent partially unless TC bit set to indicate
truncation. When TC bit is set, the final apparent RRset in the final
- nonempty section must be considered "possibly damaged" (see [RFC1035
+ non-empty section must be considered "possibly damaged" (see [RFC1035
6.2], [RFC2181 9]).
-
-
- Expires December 2006 [Page 2]
+ Expires January 2007 [Page 2]
\f
- INTERNET-DRAFT July 2006 RESPSIZE
+ INTERNET-DRAFT August 2006 RESPSIZE
- 2.4. With or without truncation, the glue present in the additional data
- section should be considered "possibly incomplete", and requestors
+ 2.1.4. With or without truncation, the glue present in the additional
+ data section should be considered "possibly incomplete", and requesters
should be prepared to re-query for any damaged or missing RRsets. Note
that truncation of the additional data section might not be signalled
via the TC bit since additional data is often optional.
- 2.5. DNS label compression allows a domain name to be instantiated only
- once per DNS message, and then referenced with a two-octet "pointer"
- from other locations in that same DNS message. If all nameserver names
- in a message are similar (for example, all ending in ".ROOT-
- SERVERS.NET"), then more space will be available for uncompressable data
- (such as nameserver addresses).
+ 2.1.5. DNS label compression allows a domain name to be instantiated
+ only once per DNS message, and then referenced with a two-octet
+ "pointer" from other locations in that same DNS message (see [RFC1035
+ 4.1.4]). If all nameserver names in a message share a common parent
+ (for example, all ending in ".ROOT-SERVERS.NET"), then more space will
+ be available for incompressable data (such as nameserver addresses).
- 2.6. The query name can be as long as 255 characters of presentation
+ 2.1.6. The query name can be as long as 255 characters of presentation
data, which can be up to 256 octets of network data. In this worst case
scenario, the question section will be 260 octets in size, which would
leave only 240 octets for the authority and additional sections (after
deducting 12 octets for the fixed length header.)
- 2.7. Average and maximum question section sizes can be predicted by the
- zone owner, since they will know what names actually exist, and can
- measure which ones are queried for most often. For cost and performance
+ 2.2. ADVICE TO ZONE OWNERS
+
+ 2.2.1. Average and maximum question section sizes can be predicted by
+ the zone owner, since they will know what names actually exist, and can
+ measure which ones are queried for most often. Note that if the zone
+ contains any wildcards, it is possible for maximum length queries to
+ require positive responses, but that it is reasonable to expect
+ truncation and TCP retry in that case. For cost and performance
reasons, the majority of requests should be satisfied without truncation
or TCP retry.
- 2.8. Some queries to non-existing names can be large, but this is not a
- problem because negative responses need not contain any answer,
- authority or additional records. (See [RFC2308 2.1] for more
- information about the format of negative responses.)
-
- 2.9. The minimum useful number of name servers is two, for redundancy
- (see [RFC1034 4.1]). In case of multihomed name servers, it is
- advantageous to include an address record from each of several name
- servers before including several address records for any one name
- server. If address records for more than one transport (for example, A
- and AAAA) are available, then it is advantageous to include records of
- both types early on, before the message is full.
-
- 2.10. The best case is no truncation at all. This is because many
- requestors will retry using TCP by reflex, or will automatically re-
- query for RRsets that are "possibly truncated", without considering
+ 2.2.2. Some queries to non-existing names can be large, but this is not
+ a problem because negative responses need not contain any answer,
+ authority or additional records. See [RFC2308 2.1] for more information
+ about the format of negative responses.
+
+ 2.2.3. The minimum useful number of name servers is two, for redundancy
+ (see [RFC1034 4.1]). A zone's name servers should be reachable by all
+ IP transport protocols (e.g., IPv4 and IPv6) in common use.
+
+ 2.2.4. The best case is no truncation at all. This is because many
+ requesters will retry using TCP by reflex, or will automatically re-
+ query for RRsets that are possibly truncated, without considering
whether the omitted data was actually necessary.
- 2.11. Each added NS RR for a zone will add a minimum of between 16 and
- 44 octets to every untruncated referral or negative response from the
- Expires December 2006 [Page 3]
+
+ Expires January 2007 [Page 3]
\f
- INTERNET-DRAFT July 2006 RESPSIZE
+ INTERNET-DRAFT August 2006 RESPSIZE
- zone's authority servers (16 octets for an NS RR, 16 octets for an A RR,
- and 28 octets for an AAAA RR), in addition to whatever space is taken by
- the nameserver name (NS NSDNAME as well as A or AAAA owner name).
+ 2.3. ADVICE TO SERVER IMPLEMENTORS
- 2.12. While DNS distinguishes between necessary and optional resource
+ 2.3.1. In case of multi-homed name servers, it is advantageous to
+ include an address record from each of several name servers before
+ including several address records for any one name server. If address
+ records for more than one transport (for example, A and AAAA) are
+ available, then it is advantageous to include records of both types
+ early on, before the message is full.
+
+ 2.3.2. Each added NS RR for a zone will add between 16 and 44 octets to
+ every non-truncated referral or negative response from the zone's
+ authority servers (16 octets for an NS RR, 16 octets for an A RR, and 28
+ octets for an AAAA RR), in addition to whatever space is taken by the
+ nameserver name (NS NSDNAME as well as A or AAAA owner name).
+
+ 2.3.3. While DNS distinguishes between necessary and optional resource
records, this distinction is according to protocol elements necessary to
signify facts, and takes no official notice of protocol content
necessary to ensure correct operation. For example, a nameserver name
parent zone's delegation includes "glue records" describing that name
server's addresses.
- 2.13. It is also necessary to distinguish between "explicit truncation"
+ 2.3.4. It is also necessary to distinguish between "explicit truncation"
where a message could not contain enough records to convey its intended
meaning, and so the TC bit has been set, and "silent truncation", where
the message was not large enough to contain some records which were "not
required", and so the TC bit was not set.
- 2.14. An delegation response should prioritize glue records as follows.
+ 2.3.5. A delegation response should prioritize glue records as follows.
first
All glue RRsets for one name server whose name is in or below the
zone being delegated, or which has multiple address RRsets (currently
- A and AAAA), or preferrably both;
+ A and AAAA), or preferably both;
second
Alternate between adding all glue RRsets for any name servers whose
thence
All other glue RRsets, in any order.
+
+
+ Expires January 2007 [Page 4]
+\f
+ INTERNET-DRAFT August 2006 RESPSIZE
+
+
+ Whenever there are multiple candidates for a position in this priority
+ scheme, one should be chosen on a round-robin or fully random basis.
+
The goal of this priority scheme is to offer "necessary" glue first,
avoiding silent truncation for this glue if possible.
- 2.15. If any "necessary content" is silently truncated, then it is
+ 2.3.6. If any "necessary content" is silently truncated, then it is
advisable that the TC bit be set in order to force a TCP retry, rather
than have the zone be unreachable. Note that a parent server's proper
response to a query for in-child glue or below-child glue is a referral
the in-child or below-child glue, and that in outlying cases, only EDNS
or TCP will be large enough to contain that data.
-
-
- Expires December 2006 [Page 4]
-\f
- INTERNET-DRAFT July 2006 RESPSIZE
-
-
3 - Analysis
3.1. An instrumented protocol trace of a best case delegation response
com. 86400 NS D.GTLD-SERVERS.NET. ;; @304
+
+
+
+
+
+
+ Expires January 2007 [Page 5]
+\f
+ INTERNET-DRAFT August 2006 RESPSIZE
+
+
;; ADDITIONAL SECTION:
A.GTLD-SERVERS.NET. 86400 A 192.5.6.30 ;; @320
B.GTLD-SERVERS.NET. 86400 A 192.33.14.30 ;; @336
;; MSG SIZE sent: 80 rcvd: 512
-
-
-
- Expires December 2006 [Page 5]
-\f
- INTERNET-DRAFT July 2006 RESPSIZE
-
-
3.2. For longer query names, the number of address records supplied will
be lower. Furthermore, it is only by using a common parent name (which
is GTLD-SERVERS.NET in this example) that all 13 addresses are able to
- fit. The following output from a response simulator demonstrates these
- properties:
+ fit, due to the use of DNS compression pointers in the last 12
+ occurances of the parent domain name. The following output from a
+ response simulator demonstrates these properties.
% perl respsize.pl a.dns.br b.dns.br c.dns.br d.dns.br
a.dns.br requires 10 bytes
preferred-glue A is assumed: # of A is 4, # of AAAA is 4 (green)
+
+
+
+
+
+
+
+
+ Expires January 2007 [Page 6]
+\f
+ INTERNET-DRAFT August 2006 RESPSIZE
+
+
% perl respsize.pl ns-ext.isc.org ns.psg.com ns.ripe.net ns.eu.int
ns-ext.isc.org requires 16 bytes
ns.psg.com requires 12 bytes
examples we use an average/common name size of 15 octets, befitting our
assumption of GTLD-SERVERS.NET as our common parent name.
-
-
- Expires December 2006 [Page 6]
-\f
- INTERNET-DRAFT July 2006 RESPSIZE
-
-
- We're assuming an average query name size of 64 since that is the
- typical average maximum size seen in trace data at the time of this
- writing. If Internationalized Domain Name (IDN) or any other technology
- which results in larger query names be deployed significantly in advance
- of EDNS, then new measurements and new estimates will have to be made.
+ We're assuming a medium query name size of 64 since that is the typical
+ size seen in trace data at the time of this writing. If
+ Internationalized Domain Name (IDN) or any other technology which
+ results in larger query names be deployed significantly in advance of
+ EDNS, then new measurements and new estimates will have to be made.
4 - Conclusions
thereafter.
4.2. If all nameserver names for a zone share a common parent, then it
- is operationally advisable to make all servers for the zone so served
+ is operationally advisable to make all servers for the zone thus served
also be authoritative for the zone of that common parent. For example,
the root name servers (?.ROOT-SERVERS.NET) can answer authoritatively
for the ROOT-SERVERS.NET. This is to ensure that the zone's servers
- always have the zone's nameservers' glue available when delegating.
+ always have the zone's nameservers' glue available when delegating, and
- 4.3. Thirteen (13) seems to be the effective maximum number of
- nameserver names usable traditional (non-extended) DNS, assuming a
- common parent domain name, and given that response truncation is
- undesirable as an average case, and assuming mostly IPv4-only
- reachability (only A RRs exist, not AAAA RRs).
- XXX 4.4. Adding up to five IPv6 nameserver address records (AAAA RRs) to
- a prototypical delegation that currently contains thirteen (13) IPv4
- nameserver addresses (A RRs) for thirteen (13) nameserver names under a
- common parent, would not have a significant negative operational impact
- on the domain name system.
+
+ Expires January 2007 [Page 7]
+\f
+ INTERNET-DRAFT August 2006 RESPSIZE
+
+
+ will be able to respond with answers rather than referrals if a
+ requester who wants that glue comes back asking for it. In this case
+ the name server will likely be a "stealth server" -- authoritative but
+ unadvertised in the glue zone's NS RRset. See [RFC1996 2] for more
+ information about stealth servers.
+
+ 4.3. Thirteen (13) is the effective maximum number of nameserver names
+ usable traditional (non-extended) DNS, assuming a common parent domain
+ name, and given that implicit referral response truncation is
+ undesirable in the average case.
+
+ 4.4. Multi-homing of name servers within a protocol family is
+ inadvisable since the necessary glue RRsets (A or AAAA) are atomically
+ indivisible, and will be larger than a single resource record. Larger
+ RRsets are more likely to lead to or encounter truncation.
+
+ 4.5. Multi-homing of name servers across protocol families is less
+ likely to lead to or encounter truncation, partly because multiprotocol
+ clients are more likely to speak EDNS which can use a larger response
+ size limit, and partly because the resource records (A and AAAA) are in
+ different RRsets and are therefore divisible from each other.
+
+ 4.6. Name server names which are at or below the zone they serve are
+ more sensitive to referral response truncation, and glue records for
+ them should be considered "less optional" than other glue records, in
+ the assembly of referral responses.
+
+ 4.7. If a zone is served by thirteen (13) name servers having a common
+ parent name (such as ?.ROOT-SERVERS.NET) and each such name server has a
+ single address record in some protocol family (e.g., an A RR), then all
+ thirteen name servers or any subset thereof could multi-home in a second
+ protocol family by adding a second address record (e.g., an AAAA RR)
+ without reducing the reachability of the zone thus served.
5 - Source Code
- Expires December 2006 [Page 7]
+ Expires January 2007 [Page 8]
\f
- INTERNET-DRAFT July 2006 RESPSIZE
+ INTERNET-DRAFT August 2006 RESPSIZE
my ($sz_msg) = (512);
- Expires December 2006 [Page 8]
+ Expires January 2007 [Page 9]
\f
- INTERNET-DRAFT July 2006 RESPSIZE
+ INTERNET-DRAFT August 2006 RESPSIZE
$n_a_aaaa = atmost(int($space
This document does not call for changes or additions to any IANA
registry.
- 8 - Acknowledgement The authors thank Peter Koch and Rob Austein for
- their valuable comments and suggestions.
+ 8 - Acknowledgement
+ The authors thank Peter Koch, Rob Austein, and Joe Abley for their
+ valuable comments and suggestions.
-
- Expires December 2006 [Page 9]
+ Expires January 2007 [Page 10]
\f
- INTERNET-DRAFT July 2006 RESPSIZE
+ INTERNET-DRAFT August 2006 RESPSIZE
+
+ This work was supported by the US National Science Foundation (research
+ grant SCI-0427144) and DNS-OARC.
- 9 - Refrenaces
+ 9 - References
[RFC1034] Mockapetris, P.V., "Domain names - Concepts and Facilities",
RFC1034, November 1987.
[RFC1123] Braden, R., Ed., "Requirements for Internet Hosts -
Application and Support", RFC1123, October 1989.
+ [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone
+ Changes (DNS NOTIFY)", RFC1996, August 1996.
+
[RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS NCACHE)",
RFC2308, March 1998.
[RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", RFC2671,
August 1999.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Expires December 2006 [Page 10]
-\f
- INTERNET-DRAFT July 2006 RESPSIZE
-
-
10 - Authors' Addresses
Paul Vixie
+ Internet Systems Consortium, Inc.
950 Charter Street
Redwood City, CA 94063
+1 650 423 1301
+81 3 5841 2750
kato@wide.ad.jp
+
+
+
+
+
+
+ Expires January 2007 [Page 11]
+\f
+ INTERNET-DRAFT August 2006 RESPSIZE
+
+
Full Copyright Statement
Copyright (C) The Internet Society (2006).
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an attempt
made to obtain a general license or permission for the use of such
-
-
-
- Expires December 2006 [Page 11]
-\f
- INTERNET-DRAFT July 2006 RESPSIZE
-
-
proprietary rights by implementers or users of this specification can be
obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Expires December 2006 [Page 12]
+ Expires January 2007 [Page 12]
\f