]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/bind9/doc/draft/draft-ietf-dnsext-dns-name-p-s-00.txt
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / bind9 / doc / draft / draft-ietf-dnsext-dns-name-p-s-00.txt
1 DNS Extensions Working Group                                   G. Sisson
2 Internet-Draft                                                 B. Laurie
3 Expires: January 11, 2006                                        Nominet
4                                                            July 10, 2005
5
6
7             Derivation of DNS Name Predecessor and Successor
8                    draft-ietf-dnsext-dns-name-p-s-00
9
10 Status of this Memo
11
12    By submitting this Internet-Draft, each author represents that any
13    applicable patent or other IPR claims of which he or she is aware
14    have been or will be disclosed, and any of which he or she becomes
15    aware will be disclosed, in accordance with Section 6 of BCP 79.
16
17    Internet-Drafts are working documents of the Internet Engineering
18    Task Force (IETF), its areas, and its working groups.  Note that
19    other groups may also distribute working documents as Internet-
20    Drafts.
21
22    Internet-Drafts are draft documents valid for a maximum of six months
23    and may be updated, replaced, or obsoleted by other documents at any
24    time.  It is inappropriate to use Internet-Drafts as reference
25    material or to cite them other than as "work in progress."
26
27    The list of current Internet-Drafts can be accessed at
28    http://www.ietf.org/ietf/1id-abstracts.txt.
29
30    The list of Internet-Draft Shadow Directories can be accessed at
31    http://www.ietf.org/shadow.html.
32
33    This Internet-Draft will expire on January 11, 2006.
34
35 Copyright Notice
36
37    Copyright (C) The Internet Society (2005).
38
39 Abstract
40
41    This document describes two methods for deriving the canonically-
42    ordered predecessor and successor of a DNS name.  These methods may
43    be used for dynamic NSEC resource record synthesis, enabling
44    security-aware name servers to provide authenticated denial of
45    existence without disclosing other owner names in a DNSSEC-secured
46    zone.
47
48
49
50
51
52 Sisson & Laurie         Expires January 11, 2006                [Page 1]
53 \f
54 Internet-Draft     DNS Name Predecessor and Successor          July 2005
55
56
57 Table of Contents
58
59    1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
60    2.  Notational Conventions . . . . . . . . . . . . . . . . . . . .  3
61    3.  Absolute Method  . . . . . . . . . . . . . . . . . . . . . . .  4
62      3.1.  Derivation of DNS Name Predecessor . . . . . . . . . . . .  4
63      3.2.  Derivation of DNS Name Successor . . . . . . . . . . . . .  4
64    4.  Modified Method  . . . . . . . . . . . . . . . . . . . . . . .  5
65      4.1.  Derivation of DNS Name Predecessor . . . . . . . . . . . .  6
66      4.2.  Derivation of DNS Name Successor . . . . . . . . . . . . .  6
67    5.  Notes  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
68      5.1.  Case Considerations  . . . . . . . . . . . . . . . . . . .  7
69      5.2.  Choice of Range  . . . . . . . . . . . . . . . . . . . . .  7
70      5.3.  Wild Card Considerations . . . . . . . . . . . . . . . . .  8
71      5.4.  Possible Modifications . . . . . . . . . . . . . . . . . .  8
72        5.4.1.  Restriction of Effective Maximum DNS Name Length . . .  8
73        5.4.2.  Use of Modified Method With Zones Containing
74                SRV RRs  . . . . . . . . . . . . . . . . . . . . . . .  9
75    6.  Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
76      6.1.  Examples of Immediate Predecessors Using Absolute
77            Method . . . . . . . . . . . . . . . . . . . . . . . . . . 10
78      6.2.  Examples of Immediate Successors Using Absolute Method . . 13
79      6.3.  Examples of Predecessors Using Modified Method . . . . . . 19
80      6.4.  Examples of Successors Using Modified Method . . . . . . . 20
81    7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 21
82    8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 21
83    10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22
84      10.1. Normative References . . . . . . . . . . . . . . . . . . . 22
85      10.2. Informative References . . . . . . . . . . . . . . . . . . 22
86    9.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 21
87    Appendix A.  Change History  . . . . . . . . . . . . . . . . . . . 22
88      A.1.  Changes from sisson-02 to ietf-00  . . . . . . . . . . . . 22
89      A.2.  Changes from sisson-01 to sisson-02  . . . . . . . . . . . 23
90      A.3.  Changes from sisson-00 to sisson-01  . . . . . . . . . . . 23
91    Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24
92    Intellectual Property and Copyright Statements . . . . . . . . . . 25
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 Sisson & Laurie         Expires January 11, 2006                [Page 2]
109 \f
110 Internet-Draft     DNS Name Predecessor and Successor          July 2005
111
112
113 1.  Introduction
114
115    One of the proposals for avoiding the exposure of zone information
116    during the deployment DNSSEC is dynamic NSEC resource record (RR)
117    synthesis.  This technique is described in [I-D.ietf-dnsext-dnssec-
118    trans] and [I-D.ietf-dnsext-dnssec-online-signing], and involves the
119    generation of NSEC RRs that just span the query name for non-existent
120    owner names.  In order to do this, the DNS names which would occur
121    just prior to and just following a given query name must be
122    calculated in real time, as maintaining a list of all possible owner
123    names that might occur in a zone would be impracticable.
124
125    Section 6.1 of [RFC4034] defines canonical DNS name order.  This
126    document does not amend or modify this definition.  However, the
127    derivation of immediate predecessor and successor, while trivial, is
128    non-obvious.  Accordingly, several methods are described here as an
129    aid to implementors and a reference to other interested parties.
130
131    This document describes two methods:
132
133    1.  An ``absolute method'', which returns the immediate predecessor
134        or successor of a domain name such that no valid DNS name could
135        exist between that DNS name and the predecessor or successor.
136
137    2.  A ``modified method'', which returns a predecessor and successor
138        which are more economical in size and computation.  This method
139        is restricted to use with zones consisting only of single-label
140        owner names where a maximum-length owner name would not result in
141        a DNS name exceeding the maximum DNS name length.  This is,
142        however, the type of zone for which the technique of online-
143        signing is most likely to be used.
144
145
146 2.  Notational Conventions
147
148    The following notational conventions are used in this document for
149    economy of expression:
150
151    N: An unspecified DNS name.
152
153    P(N): Immediate predecessor to N (absolute method).
154
155    S(N): Immediate successor to N (absolute method).
156
157    P'(N): Predecessor to N (modified method).
158
159
160
161
162
163
164 Sisson & Laurie         Expires January 11, 2006                [Page 3]
165 \f
166 Internet-Draft     DNS Name Predecessor and Successor          July 2005
167
168
169    S'(N): Successor to N (modified method).
170
171
172 3.  Absolute Method
173
174    These derivations assume that all uppercase US-ASCII letters in N
175    have already been replaced by their corresponding lowercase
176    equivalents.  Unless otherwise specified, processing stops after the
177    first step in which a condition is met.
178
179 3.1.  Derivation of DNS Name Predecessor
180
181    To derive P(N):
182
183    1.  If N is the same as the owner name of the zone apex, prepend N
184        repeatedly with labels of the maximum length possible consisting
185        of octets of the maximum sort value (e.g. 0xff) until N is the
186        maximum length possible; otherwise continue to the next step.
187
188    2.  If the least significant (left-most) label of N consists of a
189        single octet of the minimum sort value (e.g. 0x00), remove that
190        label; otherwise continue to the next step.
191
192    3.  If the least significant (right-most) octet in the least
193        significant (left-most) label of N is the minimum sort value,
194        remove the least significant octet and continue with step 5.
195
196    4.  Decrement the value of the least significant (right-most) octet,
197        skipping any values that correspond to uppercase US-ASCII
198        letters, and then append the label with as many octets as
199        possible of the maximum sort value.  Continue to the next step.
200
201    5.  Prepend N repeatedly with labels of as long a length as possible
202        consisting of octets of the maximum sort value until N is the
203        maximum length possible.
204
205 3.2.  Derivation of DNS Name Successor
206
207    To derive S(N):
208
209    1.  If N is two or more octets shorter than the maximum DNS name
210        length, prepend N with a label containing a single octet of the
211        minimum sort value (e.g. 0x00); otherwise continue to the next
212        step.
213
214    2.  If N is one or more octets shorter than the maximum DNS name
215        length and the least significant (left-most) label is one or more
216        octets shorter than the maximum label length, append an octet of
217
218
219
220 Sisson & Laurie         Expires January 11, 2006                [Page 4]
221 \f
222 Internet-Draft     DNS Name Predecessor and Successor          July 2005
223
224
225        the minimum sort value to the least significant label; otherwise
226        continue to the next step.
227
228    3.  Increment the value of the least significant (right-most) octet
229        in the least significant (left-most) label that is less than the
230        maximum sort value (e.g. 0xff), skipping any values that
231        correspond to uppercase US-ASCII letters, and then remove any
232        octets to the right of that one.  If all octets in the label are
233        the maximum sort value, then continue to the next step.
234
235    4.  Remove the least significant (left-most) label.  If N is now the
236        same as the owner name of the zone apex, do nothing.  (This will
237        occur only if N is the maximum possible name in canonical DNS
238        name order, and thus has wrapped to the owner name of zone apex.)
239        Otherwise repeat starting at step 2.
240
241
242 4.  Modified Method
243
244    This method is for use with zones consisting only of single-label
245    owner names where an owner name consisting of label of maximum length
246    would not result in a DNS name which exceeded the maximum DNS name
247    length.  This method is computationally simpler and returns values
248    which are more economical in size than the absolute method.  It
249    differs from the absolute method detailed above in the following
250    ways:
251
252    1.  Step 1 of the derivation P(N) has been omitted as the existence
253        of the owner name of the zone apex never requires denial.
254
255    2.  A new step 1 has been introduced which removes unnecessary
256        labels.
257
258    3.  Step 4 of the derivation P(N) has been omitted as it is only
259        necessary for zones containing owner names consisting of more
260        than one label.  This omission generally results in a significant
261        reduction of the length of derived predecessors.
262
263    4.  Step 1 of the derivation S(N) had been omitted as it is only
264        necessary for zones containing owner names consisting of more
265        than one label.  This omission results in a tiny reduction of the
266        length of derived successors, and maintains consistency with the
267        modification of step 4 of the derivation P(N) described above.
268
269    5.  Steps 2 and 4 of the derivation S(N) have been modified to
270        eliminate checks for maximum DNS name length, as it is an
271        assumption of this method that no DNS name in the zone can exceed
272        the maximum DNS name length.
273
274
275
276 Sisson & Laurie         Expires January 11, 2006                [Page 5]
277 \f
278 Internet-Draft     DNS Name Predecessor and Successor          July 2005
279
280
281    These derivations assume that all uppercase US-ASCII letters in N
282    have already been replaced by their corresponding lowercase
283    equivalents.  Unless otherwise specified, processing stops after the
284    first step in which a condition is met.
285
286 4.1.  Derivation of DNS Name Predecessor
287
288    To derive P'(N):
289
290    1.  If N has more labels than the number of labels in the owner name
291        of the apex + 1, repeatedly remove the least significant (left-
292        most) label until N has no more labels than the number of labels
293        in the owner name of the apex + 1; otherwise continue to next
294        step.
295
296    2.  If the least significant (left-most) label of N consists of a
297        single octet of the minimum sort value (e.g. 0x00), remove that
298        label; otherwise continue to the next step.
299
300    3.  If the least significant (right-most) octet in the least
301        significant (left-most) label of N is the minimum sort value,
302        remove the least significant octet.
303
304    4.  Decrement the value of the least significant (right-most) octet,
305        skipping any values which correspond to uppercase US-ASCII
306        letters, and then append the label with as many octets as
307        possible of the maximum sort value.
308
309 4.2.  Derivation of DNS Name Successor
310
311    To derive S'(N):
312
313    1.  If N has more labels than the number of labels in the owner name
314        of the apex + 1, repeatedly remove the least significant (left-
315        most) label until N has no more labels than the number of labels
316        in the owner name of the apex + 1.  Continue to next step.
317
318    2.  If the least significant (left-most) label of N is one or more
319        octets shorter than the maximum label length, append an octet of
320        the minimum sort value to the least significant label; otherwise
321        continue to the next step.
322
323    3.  Increment the value of the least significant (right-most) octet
324        in the least significant (left-most) label that is less than the
325        maximum sort value (e.g. 0xff), skipping any values which
326        correspond to uppercase US-ASCII letters, and then remove any
327        octets to the right of that one.  If all octets in the label are
328        the maximum sort value, then continue to the next step.
329
330
331
332 Sisson & Laurie         Expires January 11, 2006                [Page 6]
333 \f
334 Internet-Draft     DNS Name Predecessor and Successor          July 2005
335
336
337    4.  Remove the least significant (left-most) label.  (This will occur
338        only if the least significant label is the maximum label length
339        and consists entirely of octets of the maximum sort value, and
340        thus has wrapped to the owner name of the zone apex.)
341
342
343 5.  Notes
344
345 5.1.  Case Considerations
346
347    Section 3.5 of [RFC1034] specifies that "while upper and lower case
348    letters are allowed in [DNS] names, no significance is attached to
349    the case".  Additionally, Section 6.1 of [RFC4034] states that when
350    determining canonical DNS name order, "uppercase US-ASCII letters are
351    treated as if they were lowercase US-ASCII letters".  Consequently,
352    values corresponding to US-ASCII uppercase letters must be skipped
353    when decrementing and incrementing octets in the derivations
354    described in Section 3.1 and Section 3.2.
355
356    The following pseudo-code is illustrative:
357
358    Decrement the value of an octet:
359
360       if (octet == '[')       // '[' is just after uppercase 'Z'
361               octet = '@';    // '@' is just prior to uppercase 'A'
362       else
363               octet--;
364
365    Increment the value of an octet:
366
367       if (octet == '@')       // '@' is just prior to uppercase 'A'
368               octet = '[';    // '[' is just after uppercase 'Z'
369       else
370               octet++;
371
372 5.2.  Choice of Range
373
374    [RFC2181] makes the clarification that "any binary string whatever
375    can be used as the label of any resource record".  Consequently the
376    minimum sort value may be set as 0x00 and the maximum sort value as
377    0xff, and the range of possible values will be any DNS name which
378    contains octets of any value other than those corresponding to
379    uppercase US-ASCII letters.
380
381    However, if all owner names in a zone are in the letter-digit-hyphen,
382    or LDH, format specified in [RFC1034], it may be desirable to
383    restrict the range of possible values to DNS names containing only
384    LDH values.  This has the effect of:
385
386
387
388 Sisson & Laurie         Expires January 11, 2006                [Page 7]
389 \f
390 Internet-Draft     DNS Name Predecessor and Successor          July 2005
391
392
393    1.  making the output of tools such as `dig' and `nslookup' less
394        subject to confusion;
395
396    2.  minimising the impact that NSEC RRs containing DNS names with
397        non-LDH values (or non-printable values) might have on faulty DNS
398        resolver implementations; and
399
400    3.  preventing the possibility of results which are wildcard DNS
401        names (see Section 5.3).
402
403    This may be accomplished by using a minimum sort value of 0x1f (US-
404    ASCII character `-') and a maximum sort value of 0x7a (US-ASCII
405    character lowercase `z'), and then skipping non-LDH, non-lowercase
406    values when incrementing or decrementing octets.
407
408 5.3.  Wild Card Considerations
409
410    Neither derivation avoids the possibility that the result may be a
411    DNS name containing a wildcard label, i.e. a label containing a
412    single octet with the value 0x2a (US-ASCII character `*').  With
413    additional tests, wildcard DNS names may be explicitly avoided;
414    alternatively, if the range of octet values can be restricted to
415    those corresponding to letter-digit-hyphen, or LDH, characters (see
416    Section 5.2), such DNS names will not occur.
417
418    Note that it is improbable that a result which is a wildcard DNS name
419    will occur unintentionally; even if one does occur either as the
420    owner name of, or in the RDATA of an NSEC RR, it is treated as a
421    literal DNS name with no special meaning.
422
423 5.4.  Possible Modifications
424
425 5.4.1.  Restriction of Effective Maximum DNS Name Length
426
427    [RFC1034] specifies that "the total number of octets that represent a
428    [DNS] name (i.e., the sum of all label octets and label lengths) is
429    limited to 255", including the null (zero-length) label which
430    represents the root.  For the purpose of deriving predecessors and
431    successors during NSEC RR synthesis, the maximum DNS name length may
432    be effectively restricted to the length of the longest DNS name in
433    the zone.  This will minimise the size of responses containing
434    synthesised NSEC RRs but, especially in the case of the modified
435    method, may result in some additional computational complexity.
436
437    Note that this modification will have the effect of revealing
438    information about the longest name in the zone.  Moreover, when the
439    contents of the zone changes, e.g. during dynamic updates and zone
440    transfers, care must be taken to ensure that the effective maximum
441
442
443
444 Sisson & Laurie         Expires January 11, 2006                [Page 8]
445 \f
446 Internet-Draft     DNS Name Predecessor and Successor          July 2005
447
448
449    DNS name length agrees with the new contents.
450
451 5.4.2.  Use of Modified Method With Zones Containing SRV RRs
452
453    Normally the modified method cannot be used in zones that contain
454    SRV RRs [RFC2782], as SRV RRs have owner names which contain multiple
455    labels.  However the use of SRV RRs can be accommodated by various
456    techniques.  There are at least four possible ways to do this:
457
458    1.  Use conventional NSEC RRs for the region of the zone that
459        contains first-level labels beginning with the underscore (`_')
460        character.  For the purposes of generating these NSEC RRs, the
461        existence of (possibly fictional) ownernames `9{63}' and `a'
462        could be assumed, providing a lower and upper bound for this
463        region.  Then all queries where the QNAME doesn't exist but
464        contains a first-level label beginning with an underscore could
465        be handled using the normal DNSSEC protocol.
466
467        This approach would make it possible to enumerate all DNS names
468        in the zone containing a first-level label beginning with
469        underscore, including all SRV RRs, but this may be of less a
470        concern to the zone administrator than incurring the overhead of
471        the absolute method or of the following variants of the modified
472        method.
473
474    2.  The absolute method could be used for synthesising NSEC RRs for
475        all queries where the QNAME contains a leading underscore.
476        However this re-introduces the susceptibility of the absolute
477        method to denial of service activity, as an attacker could send
478        queries for an effectively inexhaustible supply of domain names
479        beginning with a leading underscore.
480
481    3.  A variant of the modified method could be used for synthesising
482        NSEC RRs for all queries where the QNAME contains a leading
483        underscore.  This variant would assume that all predecessors and
484        successors to queries where the QNAME contains a leading
485        underscore may consist of two lablels rather than only one.  This
486        introduces a little additional complexity without incurring the
487        full increase in response size and computational complexity as
488        the absolute method.
489
490    4.  Finally, a variant the modified method which assumes that all
491        owner names in the zone consist of one or two labels could be
492        used.  However this negates much of the reduction in response
493        size of the modified method and may be nearly as computationally
494        complex as the absolute method.
495
496
497
498
499
500 Sisson & Laurie         Expires January 11, 2006                [Page 9]
501 \f
502 Internet-Draft     DNS Name Predecessor and Successor          July 2005
503
504
505 6.  Examples
506
507    In the following examples:
508
509       the owner name of the zone apex is "example.com.";
510
511       the range of octet values is 0x00 - 0xff excluding values
512       corresponding to uppercase US-ASCII letters; and
513
514       non-printable octet values are expressed as three-digit decimal
515       numbers preceded by a backslash (as specified in Section 5.1 of
516       [RFC1035]).
517
518 6.1.  Examples of Immediate Predecessors Using Absolute Method
519
520    Example of typical case:
521
522       P(foo.example.com.) =
523
524            \255\255\255\255\255\255\255\255\255\255\255\255
525            \255\255\255\255\255\255\255\255\255\255\255\255
526            \255\255\255\255\255\255\255\255\255\255\255\255
527            \255\255\255\255\255\255\255\255\255\255\255\255
528            \255.\255\255\255\255\255\255\255\255\255\255
529            \255\255\255\255\255\255\255\255\255\255\255\255
530            \255\255\255\255\255\255\255\255\255\255\255\255
531            \255\255\255\255\255\255\255\255\255\255\255\255
532            \255\255\255\255\255\255\255\255\255\255\255\255
533            \255\255\255\255\255.\255\255\255\255\255\255
534            \255\255\255\255\255\255\255\255\255\255\255\255
535            \255\255\255\255\255\255\255\255\255\255\255\255
536            \255\255\255\255\255\255\255\255\255\255\255\255
537            \255\255\255\255\255\255\255\255\255\255\255\255
538            \255\255\255\255\255\255\255\255\255.fon\255\255
539            \255\255\255\255\255\255\255\255\255\255\255\255
540            \255\255\255\255\255\255\255\255\255\255\255\255
541            \255\255\255\255\255\255\255\255\255\255\255\255
542            \255\255\255\255\255\255\255\255\255\255\255\255
543            \255\255\255\255\255\255\255\255\255\255.example.com.
544
545       or, in alternate notation:
546
547            \255{49}.\255{63}.\255{63}.fon\255{60}.example.com.
548
549       where {n} represents the number of repetitions of an octet.
550
551
552
553
554
555
556 Sisson & Laurie         Expires January 11, 2006               [Page 10]
557 \f
558 Internet-Draft     DNS Name Predecessor and Successor          July 2005
559
560
561    Example where least significant (left-most) label of DNS name
562    consists of a single octet of the minimum sort value:
563
564       P(\000.foo.example.com.) = foo.example.com.
565
566    Example where least significant (right-most) octet of least
567    significant (left-most) label has the minimum sort value:
568
569       P(foo\000.example.com.) =
570
571            \255\255\255\255\255\255\255\255\255\255\255\255
572            \255\255\255\255\255\255\255\255\255\255\255\255
573            \255\255\255\255\255\255\255\255\255\255\255\255
574            \255\255\255\255\255\255\255\255\255.\255\255
575            \255\255\255\255\255\255\255\255\255\255\255\255
576            \255\255\255\255\255\255\255\255\255\255\255\255
577            \255\255\255\255\255\255\255\255\255\255\255\255
578            \255\255\255\255\255\255\255\255\255\255\255\255
579            \255\255\255\255\255\255\255\255\255\255\255\255
580            \255.\255\255\255\255\255\255\255\255\255\255
581            \255\255\255\255\255\255\255\255\255\255\255\255
582            \255\255\255\255\255\255\255\255\255\255\255\255
583            \255\255\255\255\255\255\255\255\255\255\255\255
584            \255\255\255\255\255\255\255\255\255\255\255\255
585            \255\255\255\255\255.\255\255\255\255\255\255
586            \255\255\255\255\255\255\255\255\255\255\255\255
587            \255\255\255\255\255\255\255\255\255\255\255\255
588            \255\255\255\255\255\255\255\255\255\255\255\255
589            \255\255\255\255\255\255\255\255\255\255\255\255
590            \255\255\255\255\255\255\255\255\255.foo.example.com.
591
592       or, in alternate notation:
593
594            \255{45}.\255{63}.\255{63}.\255{63}.foo.example.com.
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612 Sisson & Laurie         Expires January 11, 2006               [Page 11]
613 \f
614 Internet-Draft     DNS Name Predecessor and Successor          July 2005
615
616
617    Example where DNS name contains an octet which must be decremented by
618    skipping values corresponding to US-ASCII uppercase letters:
619
620       P(fo\[.example.com.) =
621
622            \255\255\255\255\255\255\255\255\255\255\255\255
623            \255\255\255\255\255\255\255\255\255\255\255\255
624            \255\255\255\255\255\255\255\255\255\255\255\255
625            \255\255\255\255\255\255\255\255\255\255\255\255
626            \255.\255\255\255\255\255\255\255\255\255\255
627            \255\255\255\255\255\255\255\255\255\255\255\255
628            \255\255\255\255\255\255\255\255\255\255\255\255
629            \255\255\255\255\255\255\255\255\255\255\255\255
630            \255\255\255\255\255\255\255\255\255\255\255\255
631            \255\255\255\255\255.\255\255\255\255\255\255
632            \255\255\255\255\255\255\255\255\255\255\255\255
633            \255\255\255\255\255\255\255\255\255\255\255\255
634            \255\255\255\255\255\255\255\255\255\255\255\255
635            \255\255\255\255\255\255\255\255\255\255\255\255
636            \255\255\255\255\255\255\255\255\255.fo\@\255
637            \255\255\255\255\255\255\255\255\255\255\255\255
638            \255\255\255\255\255\255\255\255\255\255\255\255
639            \255\255\255\255\255\255\255\255\255\255\255\255
640            \255\255\255\255\255\255\255\255\255\255\255\255
641            \255\255\255\255\255\255\255\255\255\255\255.example.com.
642
643       or, in alternate notation:
644
645            \255{49}.\255{63}.\255{63}.fo\@\255{60}.example.com.
646
647       where {n} represents the number of repetitions of an octet.
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668 Sisson & Laurie         Expires January 11, 2006               [Page 12]
669 \f
670 Internet-Draft     DNS Name Predecessor and Successor          July 2005
671
672
673    Example where DNS name is the owner name of the zone apex, and
674    consequently wraps to the DNS name with the maximum possible sort
675    order in the zone:
676
677       P(example.com.) =
678
679            \255\255\255\255\255\255\255\255\255\255\255\255
680            \255\255\255\255\255\255\255\255\255\255\255\255
681            \255\255\255\255\255\255\255\255\255\255\255\255
682            \255\255\255\255\255\255\255\255\255\255\255\255
683            \255.\255\255\255\255\255\255\255\255\255\255
684            \255\255\255\255\255\255\255\255\255\255\255\255
685            \255\255\255\255\255\255\255\255\255\255\255\255
686            \255\255\255\255\255\255\255\255\255\255\255\255
687            \255\255\255\255\255\255\255\255\255\255\255\255
688            \255\255\255\255\255.\255\255\255\255\255\255
689            \255\255\255\255\255\255\255\255\255\255\255\255
690            \255\255\255\255\255\255\255\255\255\255\255\255
691            \255\255\255\255\255\255\255\255\255\255\255\255
692            \255\255\255\255\255\255\255\255\255\255\255\255
693            \255\255\255\255\255\255\255\255\255.\255\255
694            \255\255\255\255\255\255\255\255\255\255\255\255
695            \255\255\255\255\255\255\255\255\255\255\255\255
696            \255\255\255\255\255\255\255\255\255\255\255\255
697            \255\255\255\255\255\255\255\255\255\255\255\255
698            \255\255\255\255\255\255\255\255\255\255\255\255
699            \255.example.com.
700
701       or, in alternate notation:
702
703            \255{49}.\255{63}.\255{63}.\255{63}.example.com.
704
705 6.2.  Examples of Immediate Successors Using Absolute Method
706
707    Example of typical case:
708
709       S(foo.example.com.) = \000.foo.example.com.
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724 Sisson & Laurie         Expires January 11, 2006               [Page 13]
725 \f
726 Internet-Draft     DNS Name Predecessor and Successor          July 2005
727
728
729    Example where DNS name is one octet short of the maximum DNS name
730    length:
731
732       N =  fooooooooooooooooooooooooooooooooooooooooooooooo
733            .ooooooooooooooooooooooooooooooooooooooooooooooo
734            oooooooooooooooo.ooooooooooooooooooooooooooooooo
735            oooooooooooooooooooooooooooooooo.ooooooooooooooo
736            oooooooooooooooooooooooooooooooooooooooooooooooo.example.com.
737
738       or, in alternate notation:
739
740            fo{47}.o{63}.o{63}.o{63}.example.com.
741
742       S(N) =
743
744            fooooooooooooooooooooooooooooooooooooooooooooooo
745            \000.ooooooooooooooooooooooooooooooooooooooooooo
746            oooooooooooooooooooo.ooooooooooooooooooooooooooo
747            oooooooooooooooooooooooooooooooooooo.ooooooooooo
748            oooooooooooooooooooooooooooooooooooooooooooooooo
749            oooo.example.com.
750
751       or, in alternate notation:
752
753            fo{47}\000.o{63}.o{63}.o{63}.example.com.
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780 Sisson & Laurie         Expires January 11, 2006               [Page 14]
781 \f
782 Internet-Draft     DNS Name Predecessor and Successor          July 2005
783
784
785    Example where DNS name is the maximum DNS name length:
786
787       N  = fooooooooooooooooooooooooooooooooooooooooooooooo
788            o.oooooooooooooooooooooooooooooooooooooooooooooo
789            ooooooooooooooooo.oooooooooooooooooooooooooooooo
790            ooooooooooooooooooooooooooooooooo.oooooooooooooo
791            oooooooooooooooooooooooooooooooooooooooooooooooo
792            o.example.com.
793
794       or, in alternate notation:
795
796            fo{48}.o{63}.o{63}.o{63}.example.com.
797
798       S(N) =
799
800            fooooooooooooooooooooooooooooooooooooooooooooooo
801            p.oooooooooooooooooooooooooooooooooooooooooooooo
802            ooooooooooooooooo.oooooooooooooooooooooooooooooo
803            ooooooooooooooooooooooooooooooooo.oooooooooooooo
804            oooooooooooooooooooooooooooooooooooooooooooooooo
805            o.example.com.
806
807       or, in alternate notation:
808
809            fo{47}p.o{63}.o{63}.o{63}.example.com.
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836 Sisson & Laurie         Expires January 11, 2006               [Page 15]
837 \f
838 Internet-Draft     DNS Name Predecessor and Successor          July 2005
839
840
841    Example where DNS name is the maximum DNS name length and the least
842    significant (left-most) label has the maximum sort value:
843
844       N =  \255\255\255\255\255\255\255\255\255\255\255\255
845            \255\255\255\255\255\255\255\255\255\255\255\255
846            \255\255\255\255\255\255\255\255\255\255\255\255
847            \255\255\255\255\255\255\255\255\255\255\255\255
848            \255.ooooooooooooooooooooooooooooooooooooooooooo
849            oooooooooooooooooooo.ooooooooooooooooooooooooooo
850            oooooooooooooooooooooooooooooooooooo.ooooooooooo
851            oooooooooooooooooooooooooooooooooooooooooooooooo
852            oooo.example.com.
853
854       or, in alternate notation:
855
856            \255{49}.o{63}.o{63}.o{63}.example.com.
857
858       S(N) =
859
860            oooooooooooooooooooooooooooooooooooooooooooooooo
861            oooooooooooooop.oooooooooooooooooooooooooooooooo
862            ooooooooooooooooooooooooooooooo.oooooooooooooooo
863            ooooooooooooooooooooooooooooooooooooooooooooooo.
864            example.com.
865
866       or, in alternate notation:
867
868            o{62}p.o{63}.o{63}.example.com.
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892 Sisson & Laurie         Expires January 11, 2006               [Page 16]
893 \f
894 Internet-Draft     DNS Name Predecessor and Successor          July 2005
895
896
897    Example where DNS name is the maximum DNS name length and the eight
898    least significant (right-most) octets of the least significant (left-
899    most) label have the maximum sort value:
900
901       N  = foooooooooooooooooooooooooooooooooooooooo\255
902            \255\255\255\255\255\255\255.ooooooooooooooooooo
903            oooooooooooooooooooooooooooooooooooooooooooo.ooo
904            oooooooooooooooooooooooooooooooooooooooooooooooo
905            oooooooooooo.ooooooooooooooooooooooooooooooooooo
906            oooooooooooooooooooooooooooo.example.com.
907
908       or, in alternate notation:
909
910            fo{40}\255{8}.o{63}.o{63}.o{63}.example.com.
911
912       S(N) =
913
914            fooooooooooooooooooooooooooooooooooooooop.oooooo
915            oooooooooooooooooooooooooooooooooooooooooooooooo
916            ooooooooo.oooooooooooooooooooooooooooooooooooooo
917            ooooooooooooooooooooooooo.oooooooooooooooooooooo
918            ooooooooooooooooooooooooooooooooooooooooo.example.com.
919
920       or, in alternate notation:
921
922            fo{39}p.o{63}.o{63}.o{63}.example.com.
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948 Sisson & Laurie         Expires January 11, 2006               [Page 17]
949 \f
950 Internet-Draft     DNS Name Predecessor and Successor          July 2005
951
952
953    Example where DNS name is the maximum DNS name length and contains an
954    octet which must be incremented by skipping values corresponding to
955    US-ASCII uppercase letters:
956
957       N  = fooooooooooooooooooooooooooooooooooooooooooooooo
958            \@.ooooooooooooooooooooooooooooooooooooooooooooo
959            oooooooooooooooooo.ooooooooooooooooooooooooooooo
960            oooooooooooooooooooooooooooooooooo.ooooooooooooo
961            oooooooooooooooooooooooooooooooooooooooooooooooo
962            oo.example.com.
963
964       or, in alternate notation:
965
966            fo{47}\@.o{63}.o{63}.o{63}.example.com.
967
968       S(N) =
969
970            fooooooooooooooooooooooooooooooooooooooooooooooo
971            \[.ooooooooooooooooooooooooooooooooooooooooooooo
972            oooooooooooooooooo.ooooooooooooooooooooooooooooo
973            oooooooooooooooooooooooooooooooooo.ooooooooooooo
974            oooooooooooooooooooooooooooooooooooooooooooooooo
975            oo.example.com.
976
977       or, in alternate notation:
978
979            fo{47}\[.o{63}.o{63}.o{63}.example.com.
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004 Sisson & Laurie         Expires January 11, 2006               [Page 18]
1005 \f
1006 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1007
1008
1009    Example where DNS name has the maximum possible sort order in the
1010    zone, and consequently wraps to the owner name of the zone apex:
1011
1012       N  = \255\255\255\255\255\255\255\255\255\255\255\255
1013            \255\255\255\255\255\255\255\255\255\255\255\255
1014            \255\255\255\255\255\255\255\255\255\255\255\255
1015            \255\255\255\255\255\255\255\255\255\255\255\255
1016            \255.\255\255\255\255\255\255\255\255\255\255
1017            \255\255\255\255\255\255\255\255\255\255\255\255
1018            \255\255\255\255\255\255\255\255\255\255\255\255
1019            \255\255\255\255\255\255\255\255\255\255\255\255
1020            \255\255\255\255\255\255\255\255\255\255\255\255
1021            \255\255\255\255\255.\255\255\255\255\255\255
1022            \255\255\255\255\255\255\255\255\255\255\255\255
1023            \255\255\255\255\255\255\255\255\255\255\255\255
1024            \255\255\255\255\255\255\255\255\255\255\255\255
1025            \255\255\255\255\255\255\255\255\255\255\255\255
1026            \255\255\255\255\255\255\255\255\255.\255\255
1027            \255\255\255\255\255\255\255\255\255\255\255\255
1028            \255\255\255\255\255\255\255\255\255\255\255\255
1029            \255\255\255\255\255\255\255\255\255\255\255\255
1030            \255\255\255\255\255\255\255\255\255\255\255\255
1031            \255\255\255\255\255\255\255\255\255\255\255\255
1032            \255.example.com.
1033
1034       or, in alternate notation:
1035
1036            \255{49}.\255{63}.\255{63}.\255{63}.example.com.
1037
1038       S(N) = example.com.
1039
1040 6.3.  Examples of Predecessors Using Modified Method
1041
1042    Example of typical case:
1043
1044       P'(foo.example.com.) =
1045
1046            fon\255\255\255\255\255\255\255\255\255\255\255
1047            \255\255\255\255\255\255\255\255\255\255\255\255
1048            \255\255\255\255\255\255\255\255\255\255\255\255
1049            \255\255\255\255\255\255\255\255\255\255\255\255
1050            \255\255\255\255\255\255\255\255\255\255\255\255
1051            \255.example.com.
1052
1053       or, in alternate notation:
1054
1055            fon\255{60}.example.com.
1056
1057
1058
1059
1060 Sisson & Laurie         Expires January 11, 2006               [Page 19]
1061 \f
1062 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1063
1064
1065    Example where DNS name contains more labels than DNS names in the
1066    zone:
1067
1068       P'(bar.foo.example.com.) = foo.example.com.
1069
1070    Example where least significant (right-most) octet of least
1071    significant (left-most) label has the minimum sort value:
1072
1073       P'(foo\000.example.com.) = foo.example.com.
1074
1075    Example where least significant (left-most) label has the minimum
1076    sort value:
1077
1078       P'(\000.example.com.) = example.com.
1079
1080    Example where DNS name is the owner name of the zone apex, and
1081    consequently wraps to the DNS name with the maximum possible sort
1082    order in the zone:
1083
1084       P'(example.com.) =
1085
1086            \255\255\255\255\255\255\255\255\255\255\255\255
1087            \255\255\255\255\255\255\255\255\255\255\255\255
1088            \255\255\255\255\255\255\255\255\255\255\255\255
1089            \255\255\255\255\255\255\255\255\255\255\255\255
1090            \255\255\255\255\255\255\255\255\255\255\255\255
1091            \255\255\255.example.com.
1092
1093       or, in alternate notation:
1094
1095            \255{63}.example.com.
1096
1097 6.4.  Examples of Successors Using Modified Method
1098
1099    Example of typical case:
1100
1101       S'(foo.example.com.) = foo\000.example.com.
1102
1103    Example where DNS name contains more labels than DNS names in the
1104    zone:
1105
1106       S'(bar.foo.example.com.) = foo\000.example.com.
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116 Sisson & Laurie         Expires January 11, 2006               [Page 20]
1117 \f
1118 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1119
1120
1121    Example where least significant (left-most) label has the maximum
1122    sort value, and consequently wraps to the owner name of the zone
1123    apex:
1124
1125       N  = \255\255\255\255\255\255\255\255\255\255\255\255
1126            \255\255\255\255\255\255\255\255\255\255\255\255
1127            \255\255\255\255\255\255\255\255\255\255\255\255
1128            \255\255\255\255\255\255\255\255\255\255\255\255
1129            \255\255\255\255\255\255\255\255\255\255\255\255
1130            \255\255\255.example.com.
1131
1132       or, in alternate notation:
1133
1134            \255{63}.example.com.
1135
1136       S'(N) = example.com.
1137
1138
1139 7.  Security Considerations
1140
1141    The derivation of some predecessors/successors requires the testing
1142    of more conditions than others.  Consequently the effectiveness of a
1143    denial-of-service attack may be enhanced by sending queries that
1144    require more conditions to be tested.  The modified method involves
1145    the testing of fewer conditions than the absolute method and
1146    consequently is somewhat less susceptible to this exposure.
1147
1148
1149 8.  IANA Considerations
1150
1151    This document has no IANA actions.
1152
1153    Note to RFC Editor: This section is included to make it clear during
1154    pre-publication review that this document has no IANA actions.  It
1155    may therefore be removed should it be published as an RFC.
1156
1157
1158 9.  Acknowledgments
1159
1160    The authors would like to thank Olaf Kolkman, Olafur Gudmundsson and
1161    Niall O'Reilly for their review and input.
1162
1163
1164 10.  References
1165
1166
1167
1168
1169
1170
1171
1172 Sisson & Laurie         Expires January 11, 2006               [Page 21]
1173 \f
1174 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1175
1176
1177 10.1  Normative References
1178
1179    [RFC1034]  Mockapetris, P., "Domain names - concepts and facilities",
1180               STD 13, RFC 1034, November 1987.
1181
1182    [RFC1035]  Mockapetris, P., "Domain names - implementation and
1183               specification", STD 13, RFC 1035, November 1987.
1184
1185    [RFC2181]  Elz, R. and R. Bush, "Clarifications to the DNS
1186               Specification", RFC 2181, July 1997.
1187
1188    [RFC2782]  Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for
1189               specifying the location of services (DNS SRV)", RFC 2782,
1190               February 2000.
1191
1192    [RFC4034]  Arends, R., Austein, R., Larson, M., Massey, D., and S.
1193               Rose, "Resource Records for the DNS Security Extensions",
1194               RFC 4034, March 2005.
1195
1196 10.2  Informative References
1197
1198    [I-D.ietf-dnsext-dnssec-online-signing]
1199               Ihren, J. and S. Weiler, "Minimally Covering NSEC Records
1200               and DNSSEC On-line Signing",
1201               draft-ietf-dnsext-dnssec-online-signing-00 (work in
1202               progress), May 2005.
1203
1204    [I-D.ietf-dnsext-dnssec-trans]
1205               Arends, R., Koch, P., and J. Schlyter, "Evaluating DNSSEC
1206               Transition Mechanisms",
1207               draft-ietf-dnsext-dnssec-trans-02 (work in progress),
1208               February 2005.
1209
1210
1211 Appendix A.  Change History
1212
1213 A.1.  Changes from sisson-02 to ietf-00
1214
1215    o  Added notes on use of SRV RRs with modified method.
1216
1217    o  Changed reference from weiler-dnssec-online-signing to ietf-
1218       dnsext-dnssec-online-signing.
1219
1220    o  Changed reference from ietf-dnsext-dnssec-records to RFC 4034.
1221
1222    o  Miscellaneous minor changes to text.
1223
1224
1225
1226
1227
1228 Sisson & Laurie         Expires January 11, 2006               [Page 22]
1229 \f
1230 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1231
1232
1233 A.2.  Changes from sisson-01 to sisson-02
1234
1235    o  Added modified version of derivation (with supporting examples).
1236
1237    o  Introduced notational conventions N, P(N), S(N), P'(N) and S'(N).
1238
1239    o  Added clarification to derivations about when processing stops.
1240
1241    o  Miscellaneous minor changes to text.
1242
1243 A.3.  Changes from sisson-00 to sisson-01
1244
1245    o  Split step 3 of derivation of DNS name predecessor into two
1246       distinct steps for clarity.
1247
1248    o  Added clarifying text and examples related to the requirement to
1249       avoid uppercase characters when decrementing or incrementing
1250       octets.
1251
1252    o  Added optimisation using restriction of effective maximum DNS name
1253       length.
1254
1255    o  Changed examples to use decimal rather than octal notation as per
1256       [RFC1035].
1257
1258    o  Corrected DNS name length of some examples.
1259
1260    o  Added reference to weiler-dnssec-online-signing.
1261
1262    o  Miscellaneous minor changes to text.
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284 Sisson & Laurie         Expires January 11, 2006               [Page 23]
1285 \f
1286 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1287
1288
1289 Authors' Addresses
1290
1291    Geoffrey Sisson
1292    Nominet
1293    Sandford Gate
1294    Sandy Lane West
1295    Oxford
1296    OX4 6LB
1297    GB
1298
1299    Phone: +44 1865 332339
1300    Email: geoff@nominet.org.uk
1301
1302
1303    Ben Laurie
1304    Nominet
1305    17 Perryn Road
1306    London
1307    W3 7LR
1308    GB
1309
1310    Phone: +44 20 8735 0686
1311    Email: ben@algroup.co.uk
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340 Sisson & Laurie         Expires January 11, 2006               [Page 24]
1341 \f
1342 Internet-Draft     DNS Name Predecessor and Successor          July 2005
1343
1344
1345 Intellectual Property Statement
1346
1347    The IETF takes no position regarding the validity or scope of any
1348    Intellectual Property Rights or other rights that might be claimed to
1349    pertain to the implementation or use of the technology described in
1350    this document or the extent to which any license under such rights
1351    might or might not be available; nor does it represent that it has
1352    made any independent effort to identify any such rights.  Information
1353    on the procedures with respect to rights in RFC documents can be
1354    found in BCP 78 and BCP 79.
1355
1356    Copies of IPR disclosures made to the IETF Secretariat and any
1357    assurances of licenses to be made available, or the result of an
1358    attempt made to obtain a general license or permission for the use of
1359    such proprietary rights by implementers or users of this
1360    specification can be obtained from the IETF on-line IPR repository at
1361    http://www.ietf.org/ipr.
1362
1363    The IETF invites any interested party to bring to its attention any
1364    copyrights, patents or patent applications, or other proprietary
1365    rights that may cover technology that may be required to implement
1366    this standard.  Please address the information to the IETF at
1367    ietf-ipr@ietf.org.
1368
1369
1370 Disclaimer of Validity
1371
1372    This document and the information contained herein are provided on an
1373    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
1374    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
1375    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
1376    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
1377    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
1378    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1379
1380
1381 Copyright Statement
1382
1383    Copyright (C) The Internet Society (2005).  This document is subject
1384    to the rights, licenses and restrictions contained in BCP 78, and
1385    except as set forth therein, the authors retain all their rights.
1386
1387
1388 Acknowledgment
1389
1390    Funding for the RFC Editor function is currently provided by the
1391    Internet Society.
1392
1393
1394
1395
1396 Sisson & Laurie         Expires January 11, 2006               [Page 25]
1397 \f