4 IPv6 Maintenance Working Group S. Kawamura
5 Internet-Draft NEC BIGLOBE, Ltd.
6 Updates: 4291 (if approved) M. Kawashima
7 Intended status: Standards Track NEC AccessTechnica, Ltd.
8 Expires: August 29, 2010 February 25, 2010
11 A Recommendation for IPv6 Address Text Representation
12 draft-ietf-6man-text-addr-representation-07
16 As IPv6 deployment increases there will be a dramatic increase in the
17 need to use IPv6 addresses in text. While the IPv6 address
18 architecture in RFC 4291 section 2.2 describes a flexible model for
19 text representation of an IPv6 address this flexibility has been
20 causing problems for operators, system engineers, and users. This
21 document defines a canonical textual representation format. It does
22 not define a format for internal storage, such as within an
23 application or database. It is expected that the canonical format is
24 followed by humans and systems when representing IPv6 addresses as
25 text, but all implementations must accept and be able to handle any
26 legitimate RFC 4291 format.
30 This Internet-Draft is submitted to IETF in full conformance with the
31 provisions of BCP 78 and BCP 79.
33 Internet-Drafts are working documents of the Internet Engineering
34 Task Force (IETF), its areas, and its working groups. Note that
35 other groups may also distribute working documents as Internet-
38 Internet-Drafts are draft documents valid for a maximum of six months
39 and may be updated, replaced, or obsoleted by other documents at any
40 time. It is inappropriate to use Internet-Drafts as reference
41 material or to cite them other than as "work in progress."
43 The list of current Internet-Drafts can be accessed at
44 http://www.ietf.org/ietf/1id-abstracts.txt.
46 The list of Internet-Draft Shadow Directories can be accessed at
47 http://www.ietf.org/shadow.html.
49 This Internet-Draft will expire on August 29, 2010.
55 Kawamura & Kawashima Expires August 29, 2010 [Page 1]
57 Internet-Draft IPv6 Text Representation February 2010
60 Copyright (c) 2010 IETF Trust and the persons identified as the
61 document authors. All rights reserved.
63 This document is subject to BCP 78 and the IETF Trust's Legal
64 Provisions Relating to IETF Documents
65 (http://trustee.ietf.org/license-info) in effect on the date of
66 publication of this document. Please review these documents
67 carefully, as they describe your rights and restrictions with respect
68 to this document. Code Components extracted from this document must
69 include Simplified BSD License text as described in Section 4.e of
70 the Trust Legal Provisions and are provided without warranty as
71 described in the BSD License.
111 Kawamura & Kawashima Expires August 29, 2010 [Page 2]
113 Internet-Draft IPv6 Text Representation February 2010
118 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
119 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
120 2. Text Representation Flexibility of RFC4291 . . . . . . . . . . 4
121 2.1. Leading Zeros in a 16 Bit Field . . . . . . . . . . . . . 4
122 2.2. Zero Compression . . . . . . . . . . . . . . . . . . . . . 5
123 2.3. Uppercase or Lowercase . . . . . . . . . . . . . . . . . . 5
124 3. Problems Encountered with the Flexible Model . . . . . . . . . 6
125 3.1. Searching . . . . . . . . . . . . . . . . . . . . . . . . 6
126 3.1.1. General Summary . . . . . . . . . . . . . . . . . . . 6
127 3.1.2. Searching Spreadsheets and Text Files . . . . . . . . 6
128 3.1.3. Searching with Whois . . . . . . . . . . . . . . . . . 6
129 3.1.4. Searching for an Address in a Network Diagram . . . . 7
130 3.2. Parsing and Modifying . . . . . . . . . . . . . . . . . . 7
131 3.2.1. General Summary . . . . . . . . . . . . . . . . . . . 7
132 3.2.2. Logging . . . . . . . . . . . . . . . . . . . . . . . 7
133 3.2.3. Auditing: Case 1 . . . . . . . . . . . . . . . . . . . 7
134 3.2.4. Auditing: Case 2 . . . . . . . . . . . . . . . . . . . 8
135 3.2.5. Verification . . . . . . . . . . . . . . . . . . . . . 8
136 3.2.6. Unexpected Modifying . . . . . . . . . . . . . . . . . 8
137 3.3. Operating . . . . . . . . . . . . . . . . . . . . . . . . 8
138 3.3.1. General Summary . . . . . . . . . . . . . . . . . . . 8
139 3.3.2. Customer Calls . . . . . . . . . . . . . . . . . . . . 8
140 3.3.3. Abuse . . . . . . . . . . . . . . . . . . . . . . . . 9
141 3.4. Other Minor Problems . . . . . . . . . . . . . . . . . . . 9
142 3.4.1. Changing Platforms . . . . . . . . . . . . . . . . . . 9
143 3.4.2. Preference in Documentation . . . . . . . . . . . . . 9
144 3.4.3. Legibility . . . . . . . . . . . . . . . . . . . . . . 9
145 4. A Recommendation for IPv6 Text Representation . . . . . . . . 9
146 4.1. Handling Leading Zeros in a 16 Bit Field . . . . . . . . . 10
147 4.2. "::" Usage . . . . . . . . . . . . . . . . . . . . . . . . 10
148 4.2.1. Shorten As Much As Possible . . . . . . . . . . . . . 10
149 4.2.2. Handling One 16 Bit 0 Field . . . . . . . . . . . . . 10
150 4.2.3. Choice in Placement of "::" . . . . . . . . . . . . . 10
151 4.3. Lower Case . . . . . . . . . . . . . . . . . . . . . . . . 10
152 5. Text Representation of Special Addresses . . . . . . . . . . . 10
153 6. Notes on Combining IPv6 Addresses with Port Numbers . . . . . 11
154 7. Prefix Representation . . . . . . . . . . . . . . . . . . . . 12
155 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
156 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
157 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
158 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
159 11.1. Normative References . . . . . . . . . . . . . . . . . . . 12
160 11.2. Informative References . . . . . . . . . . . . . . . . . . 13
161 Appendix A. For Developers . . . . . . . . . . . . . . . . . . . 13
162 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13
167 Kawamura & Kawashima Expires August 29, 2010 [Page 3]
169 Internet-Draft IPv6 Text Representation February 2010
174 A single IPv6 address can be text represented in many ways. Examples
179 2001:0db8:0:0:1:0:0:1
193 All of the above examples represent the same IPv6 address. This
194 flexibility has caused many problems for operators, systems
195 engineers, and customers. The problems are noted in Section 3.
196 Also, a canonical representation format to avoid problems is
197 introduced in Section 4.
199 1.1. Requirements Language
201 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
202 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
203 document are to be interpreted as described in [RFC2119].
206 2. Text Representation Flexibility of RFC4291
208 Examples of flexibility in Section 2.2 of [RFC4291] are described
211 2.1. Leading Zeros in a 16 Bit Field
213 'It is not necessary to write the leading zeros in an individual
216 Conversely it is also not necessary to omit leading zeros. This
217 means that, it is possible to select from such as the following
218 example. The final 16 bit field is different, but all these
219 addresses represent the same address.
223 Kawamura & Kawashima Expires August 29, 2010 [Page 4]
225 Internet-Draft IPv6 Text Representation February 2010
228 2001:db8:aaaa:bbbb:cccc:dddd:eeee:0001
230 2001:db8:aaaa:bbbb:cccc:dddd:eeee:001
232 2001:db8:aaaa:bbbb:cccc:dddd:eeee:01
234 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1
236 2.2. Zero Compression
238 'A special syntax is available to compress the zeros. The use of
239 "::" indicates one or more groups of 16 bits of zeros.'
241 It is possible to select whether or not to omit just one 16 bits of
244 2001:db8:aaaa:bbbb:cccc:dddd::1
246 2001:db8:aaaa:bbbb:cccc:dddd:0:1
248 In case where there is more than one zero fields, there is a choice
249 of how many fields can be shortened.
259 In addition, [RFC4291] in section 2.2 notes,
261 'The "::" can only appear once in an address.'
263 This gives a choice on where in a single address to compress the
270 2.3. Uppercase or Lowercase
272 [RFC4291] does not mention any preference of uppercase or lowercase.
279 Kawamura & Kawashima Expires August 29, 2010 [Page 5]
281 Internet-Draft IPv6 Text Representation February 2010
284 2001:db8:aaaa:bbbb:cccc:dddd:eeee:aaaa
286 2001:db8:aaaa:bbbb:cccc:dddd:eeee:AAAA
288 2001:db8:aaaa:bbbb:cccc:dddd:eeee:AaAa
291 3. Problems Encountered with the Flexible Model
295 3.1.1. General Summary
297 A search of an IPv6 address if conducted through a UNIX system is
298 usually case sensitive and extended options to allow for regular
299 expression use will come in handy. However, there are many
300 applications in the Internet today that do not provide this
301 capability. When searching for an IPv6 address in such systems, the
302 system engineer will have to try each and every possibility to search
303 for an address. This has critical impacts especially when trying to
304 deploy IPv6 over an enterprise network.
306 3.1.2. Searching Spreadsheets and Text Files
308 Spreadsheet applications and text editors on GUI systems, rarely have
309 the ability to search for a text using regular expression. Moreover,
310 there are many non-engineers (who are not aware of case sensitivity
311 and regular expression use) that use these application to manage IP
312 addresses. This has worked quite well with IPv4 since text
313 representation in IPv4 has very little flexibility. There is no
314 incentive to encourage these non-engineers to change their tool or
315 learn regular expression when they decide to go dual-stack. If the
316 entry in the spreadsheet reads, 2001:db8::1:0:0:1, but the search was
317 conducted as 2001:db8:0:0:1::1, this will show a result of no match.
318 One example where this will cause problem is, when the search is
319 being conducted to assign a new address from a pool, and a check was
320 being done to see if it was not in use. This may cause problems to
321 the end-hosts or end-users. This type of address management is very
322 often seen in enterprise networks and also in ISPs.
324 3.1.3. Searching with Whois
326 The "whois" utility is used by a wide range of people today. When a
327 record is set to a database, one will likely check the output to see
328 if the entry is correct. If an entity was recorded as 2001:db8::/48,
329 but the whois output showed 2001:0db8:0000::/48, most non-engineers
330 would think that their input was wrong and will likely retry several
331 times or make a frustrated call to the database hostmaster. If there
335 Kawamura & Kawashima Expires August 29, 2010 [Page 6]
337 Internet-Draft IPv6 Text Representation February 2010
340 was a need to register the same address on different systems, and
341 each system showed a different text representation, this would
342 confuse people even more. Although this document focuses on
343 addresses rather than prefixes, this is worth mentioning since the
344 problems encountered are mostly equal.
346 3.1.4. Searching for an Address in a Network Diagram
348 Network diagrams and blueprints often show what IP addresses are
349 assigned to a system devices. In times of trouble shooting there may
350 be a need to search through a diagram to find the point of failure
351 (for example, if a traceroute stopped at 2001:db8::1, one would
352 search the diagram for that address). This is a technique quite
353 often in use in enterprise networks and managed services. Again, the
354 different flavors of text representation will result in a time-
355 consuming search leading to longer MTTR in times of trouble.
357 3.2. Parsing and Modifying
359 3.2.1. General Summary
361 With all the possible methods of text representation each application
362 must include a module, object, link, etc. to a function that will
363 parse IPv6 addresses in a manner that no matter how it is
364 represented, they will mean the same address. Many system engineers
365 who integrate complex computer systems for corporate customers will
366 have difficulties finding that their favorite tool will not have this
367 function, or will encounter difficulties such as having to rewrite
368 their macros or scripts for their customers.
372 If an application were to output a log summary that represented the
373 address in full (such as 2001:0db8:0000:0000:1111:2222:3333:4444),
374 the output would be highly unreadable compared to the IPv4 output.
375 The address would have to be parsed and reformed to make it useful
376 for human reading. Sometimes logging for critical systems is done by
377 mirroring the same traffic to two different systems. Care must be
378 taken so that no matter what the log output is the logs should be
379 parsed so they will mean the same.
381 3.2.3. Auditing: Case 1
383 When a router or any other network appliance machine configuration is
384 audited, there are many methods to compare the configuration
385 information of a node. Sometimes auditing will be done by just
386 comparing the changes made each day. In this case if configuration
387 was done such that 2001:db8::1 was changed to 2001:0db8:0000:0000:
391 Kawamura & Kawashima Expires August 29, 2010 [Page 7]
393 Internet-Draft IPv6 Text Representation February 2010
396 0000:0000:0000:0001 just because the new engineer on the block felt
397 it was better, a simple diff will show that a different address was
398 configured. If this was done on a wide scale network people will be
399 focusing on 'why the extra zeros were put in' instead of doing any
400 real auditing. Lots of tools are just plain diffs that do not take
401 into account address representation rules.
403 3.2.4. Auditing: Case 2
405 Node configurations will be matched against an information system
406 that manages IP addresses. If output notation is different there
407 will need to be a script that is implemented to cover for this. The
408 result of an SNMP GET operation, converted to text and compared to a
409 textual address written by a human is highly unlikely to match on the
414 Some protocols require certain data fields to be verified. One
415 example of this is X.509 certificates. If an IPv6 address field in a
416 certificate was incorrectly verified by converting it to text and
417 making a simple textual comparison to some other address, the
418 certificate may be mistakenly shown as being invalid due to a
419 difference in text representation methods.
421 3.2.6. Unexpected Modifying
423 Sometimes, a system will take an address and modify it as a
424 convenience. For example, a system may take an input of
425 2001:0db8:0::1 and make the output 2001:db8::1. If the zeros were
426 input for a reason, the outcome may be somewhat unexpected.
430 3.3.1. General Summary
432 When an operator sets an IPv6 address of a system as 2001:db8:0:0:1:
433 0:0:1, the system may take the address and show the configuration
434 result as 2001:DB8::1:0:0:1. Someone familiar with IPv6 address
435 representation will know that the right address is set, but not
436 everyone may understand this.
438 3.3.2. Customer Calls
440 When a customer calls to inquire about a suspected outage, IPv6
441 address representation should be handled with care. Not all
442 customers are engineers nor have the same skill in IPv6 technology.
443 The network operations center will have to take extra steps to
447 Kawamura & Kawashima Expires August 29, 2010 [Page 8]
449 Internet-Draft IPv6 Text Representation February 2010
452 humanly parse the address to avoid having to explain to the customers
453 that 2001:db8:0:1::1 is the same as 2001:db8::1:0:0:0:1. This is one
454 thing that will never happen in IPv4 because IPv4 address cannot be
459 Network abuse reports generally include the abusing IP address. This
460 'reporting' could take any shape or form of the flexible model. A
461 team that handles network abuse must be able to tell the difference
462 between a 2001:db8::1:0:1 and 2001:db8:1::0:1. Mistakes in the
463 placement of the "::" will result in a critical situation. A system
464 that handles these incidents should be able to handle any type of
465 input and parse it in a correct manner. Also, incidents are reported
466 over the phone. It is unnecessary to report if the letter is an
467 uppercase or lowercase. However, when a letter is spelled uppercase,
468 people tend to clarify that it is uppercase, which is unnecessary
471 3.4. Other Minor Problems
473 3.4.1. Changing Platforms
475 When an engineer decides to change the platform of a running service,
476 the same code may not work as expected due to the difference in IPv6
477 address text representation. Usually, a change in a platform (e.g.
478 Unix to Windows, Cisco to Juniper) will result in a major change of
479 code anyway, but flexibility in address representation will increase
482 3.4.2. Preference in Documentation
484 A document that is edited by more than one author may become harder
489 Capital case D and 0 can be quite often misread. Capital B and 8 can
493 4. A Recommendation for IPv6 Text Representation
495 A recommendation for a canonical text representation format of IPv6
496 addresses is presented in this section. The recommendation in this
497 document is one that, complies fully with [RFC4291], is implemented
498 by various operating systems, and is human friendly. The
499 recommendation in this section SHOULD be followed by systems when
503 Kawamura & Kawashima Expires August 29, 2010 [Page 9]
505 Internet-Draft IPv6 Text Representation February 2010
508 generating an address to represent as text, but all implementations
509 MUST accept and be able to handle any legitimate [RFC4291] format.
510 It is advised that humans also follow these recommendations when
513 4.1. Handling Leading Zeros in a 16 Bit Field
515 Leading zeros MUST be suppressed. For example 2001:0db8::0001 is not
516 acceptable and must be represented as 2001:db8::1. A single 16 bit
517 0000 field MUST be represented as 0.
521 4.2.1. Shorten As Much As Possible
523 The use of symbol "::" MUST be used to its maximum capability. For
524 example, 2001:db8::0:1 is not acceptable, because the symbol "::"
525 could have been used to produce a shorter representation 2001:db8::1.
527 4.2.2. Handling One 16 Bit 0 Field
529 The symbol "::" MUST NOT be used to shorten just one 16 bit 0 field.
530 For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
531 2001:db8::1:1:1:1:1 is not correct.
533 4.2.3. Choice in Placement of "::"
535 When there is an alternative choice in the placement of a "::", the
536 longest run of consecutive 16 bit 0 fields MUST be shortened (i.e.
537 the sequence with three consecutive zero fields is shortened in 2001:
538 0:0:1:0:0:0:1). When the length of the consecutive 16 bit 0 fields
539 are equal (i.e. 2001:db8:0:0:1:0:0:1), the first sequence of zero
540 bits MUST be shortened. For example 2001:db8::1:0:0:1 is correct
545 The characters "a", "b", "c", "d", "e", "f" in an IPv6 address MUST
546 be represented in lower case.
549 5. Text Representation of Special Addresses
551 Addresses such as IPv4-Mapped IPv6 addresses, ISATAP [RFC5214], and
552 IPv4-translatable addresses [I-D.ietf-behave-address-format] have
553 IPv4 addresses embedded in the low-order 32 bits of the address.
554 These addresses have special representation that may mix hexadecimal
555 and dot decimal notations. The decimal notation may be used only for
559 Kawamura & Kawashima Expires August 29, 2010 [Page 10]
561 Internet-Draft IPv6 Text Representation February 2010
564 the last 32 bits of the address. For these addresses, mixed notation
565 is RECOMMENDED if the following condition is met: The address can be
566 distinguished as having IPv4 addresses embedded in the lower 32 bits
567 solely from the address field through the use of a well known prefix.
568 Such prefixes are defined in [RFC4291] and [RFC2765] at the time of
569 writing. If it is known by some external method that a given prefix
570 is used to embed IPv4, it MAY be represented as mixed notation.
571 Tools that provide options to specify prefixes that are (or are not)
572 to be represented as mixed notation may be useful.
574 There is a trade-off here where a recommendation to achieve exact
575 match in a search (no dot decimals whatsoever) and recommendation to
576 help the readability of an addresses (dot decimal whenever possible)
577 does not result in the same solution. The above recommendation is
578 aimed at fixing the representation as much as possible while leaving
579 the opportunity for future well known prefixes to be represented in a
580 human friendly manner as tools adjust to newly assigned prefixes.
582 The text representation method noted in Section 4 should be applied
583 for the leading hexadecimal part (i.e. ::ffff:192.0.2.1 instead of
584 0:0:0:0:0:ffff:192.0.2.1).
587 6. Notes on Combining IPv6 Addresses with Port Numbers
589 When IPv6 addresses and port numbers are represented in text combined
590 together, there are many different ways to do so. Examples are shown
599 o 2001:db8::1 port 80
605 The situation is not much different in IPv4, but the most ambiguous
606 case with IPv6 is the second bullet. This is due to the "::"usage in
607 IPv6 addresses. This style is NOT RECOMMENDED for its ambiguity.
608 The [] style as expressed in [RFC3986] SHOULD be employed, and is the
609 default unless otherwise specified. Other styles are acceptable when
610 there is exactly one style for the given context and cross-platform
611 portability does not become an issue. For URIs containing IPv6
615 Kawamura & Kawashima Expires August 29, 2010 [Page 11]
617 Internet-Draft IPv6 Text Representation February 2010
620 address literals, [RFC3986] MUST be followed, as well as the rules in
624 7. Prefix Representation
626 Problems with prefixes are just the same as problems encountered with
627 addresses. The text representation method of IPv6 prefixes should be
628 no different from that of IPv6 addresses.
631 8. Security Considerations
633 This document notes some examples where IPv6 addresses are compared
634 in text format. The example on Section 3.2.5 is one that may cause a
635 security risk if used for access control. The common practice of
636 comparing X.509 data is done in binary format.
639 9. IANA Considerations
646 The authors would like to thank Jan Zorz, Randy Bush, Yuichi Minami,
647 Toshimitsu Matsuura for their generous and helpful comments in kick
648 starting this document. We also would like to thank Brian Carpenter,
649 Akira Kato, Juergen Schoenwaelder, Antonio Querubin, Dave Thaler,
650 Brian Haley, Suresh Krishnan, Jerry Huang, Roman Donchenko, Heikki
651 Vatiainen ,Dan Wing, and Doug Barton for their input. Also a very
652 special thanks to Ron Bonica, Fred Baker, Brian Haberman, Robert
653 Hinden, Jari Arkko, and Kurt Lindqvist for their support in bringing
654 this document to the light of IETF working groups.
659 11.1. Normative References
661 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
662 Requirement Levels", BCP 14, RFC 2119, March 1997.
664 [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm
665 (SIIT)", RFC 2765, February 2000.
667 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
671 Kawamura & Kawashima Expires August 29, 2010 [Page 12]
673 Internet-Draft IPv6 Text Representation February 2010
676 Resource Identifier (URI): Generic Syntax", STD 66,
677 RFC 3986, January 2005.
679 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing
680 Architecture", RFC 4291, February 2006.
682 11.2. Informative References
684 [I-D.ietf-behave-address-format]
685 Huitema, C., Bao, C., Bagnulo, M., Boucadair, M., and X.
686 Li, "IPv6 Addressing of IPv4/IPv6 Translators",
687 draft-ietf-behave-address-format-04 (work in progress),
690 [RFC4038] Shin, M-K., Hong, Y-G., Hagino, J., Savola, P., and E.
691 Castro, "Application Aspects of IPv6 Transition",
692 RFC 4038, March 2005.
694 [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site
695 Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214,
699 Appendix A. For Developers
701 We recommend that developers use display routines that conform to
702 these rules. For example, the usage of getnameinfo() with flags
703 argument NI_NUMERICHOST in FreeBSD 7.0 will give a conforming output,
704 except for the special addresses notes in Section 5. The function
705 inet_ntop() of FreeBSD7.0 is a good C code reference, but should not
706 be called directly. See [RFC4038] for details.
713 14-22, Shibaura 4-chome
714 Minatoku, Tokyo 108-8558
717 Phone: +81 3 3798 6085
718 Email: kawamucho@mesh.ad.jp
727 Kawamura & Kawashima Expires August 29, 2010 [Page 13]
729 Internet-Draft IPv6 Text Representation February 2010
733 NEC AccessTechnica, Ltd.
735 Kakegawa-shi, Shizuoka 436-8501
738 Phone: +81 537 23 9655
739 Email: kawashimam@necat.nec.co.jp
783 Kawamura & Kawashima Expires August 29, 2010 [Page 14]