4 IPv6 Maintenance Working Group S. Kawamura
5 Internet-Draft NEC BIGLOBE, Ltd.
6 Intended status: Informational M. Kawashima
7 Expires: April 21, 2010 NEC AccessTechnica, Ltd.
11 A Recommendation for IPv6 Address Text Representation
12 draft-ietf-6man-text-addr-representation-01
16 This Internet-Draft is submitted to IETF in full conformance with the
17 provisions of BCP 78 and BCP 79.
19 Internet-Drafts are working documents of the Internet Engineering
20 Task Force (IETF), its areas, and its working groups. Note that
21 other groups may also distribute working documents as Internet-
24 Internet-Drafts are draft documents valid for a maximum of six months
25 and may be updated, replaced, or obsoleted by other documents at any
26 time. It is inappropriate to use Internet-Drafts as reference
27 material or to cite them other than as "work in progress."
29 The list of current Internet-Drafts can be accessed at
30 http://www.ietf.org/ietf/1id-abstracts.txt.
32 The list of Internet-Draft Shadow Directories can be accessed at
33 http://www.ietf.org/shadow.html.
35 This Internet-Draft will expire on April 21, 2010.
39 Copyright (c) 2009 IETF Trust and the persons identified as the
40 document authors. All rights reserved.
42 This document is subject to BCP 78 and the IETF Trust's Legal
43 Provisions Relating to IETF Documents in effect on the date of
44 publication of this document (http://trustee.ietf.org/license-info).
45 Please review these documents carefully, as they describe your rights
46 and restrictions with respect to this document.
50 As IPv6 network grows, there will be more engineers and also non-
51 engineers who will have the need to use an IPv6 address in text.
55 Kawamura & Kawashima Expires April 21, 2010 [Page 1]
57 Internet-Draft IPv6 Text Representation October 2009
60 While the IPv6 address architecture RFC 4291 section 2.2 depicts a
61 flexible model for text representation of an IPv6 address, this
62 flexibility has been causing problems for operators, system
63 engineers, and users. This document will describe the problems that
64 a flexible text representation has been causing. This document also
65 recommends a canonical representation format that best avoids
66 confusion. It is expected that the canonical format is followed by
67 humans and systems when representing IPv6 addresses as text, but all
68 implementations must accept and be able to handle any legitimate
74 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
75 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
76 2. Text Representation Flexibility of RFC4291 . . . . . . . . . . 4
77 2.1. Leading Zeros in a 16 Bit Field . . . . . . . . . . . . . 4
78 2.2. Zero Compression . . . . . . . . . . . . . . . . . . . . . 5
79 2.3. Uppercase or Lowercase . . . . . . . . . . . . . . . . . . 5
80 3. Problems Encountered with the Flexible Model . . . . . . . . . 6
81 3.1. Searching . . . . . . . . . . . . . . . . . . . . . . . . 6
82 3.1.1. General Summary . . . . . . . . . . . . . . . . . . . 6
83 3.1.2. Searching Spreadsheets and Text Files . . . . . . . . 6
84 3.1.3. Searching with Whois . . . . . . . . . . . . . . . . . 6
85 3.1.4. Searching for an Address in a Network Diagram . . . . 7
86 3.2. Parsing and Modifying . . . . . . . . . . . . . . . . . . 7
87 3.2.1. General Summary . . . . . . . . . . . . . . . . . . . 7
88 3.2.2. Logging . . . . . . . . . . . . . . . . . . . . . . . 7
89 3.2.3. Auditing: Case 1 . . . . . . . . . . . . . . . . . . . 8
90 3.2.4. Auditing: Case 2 . . . . . . . . . . . . . . . . . . . 8
91 3.2.5. Verification . . . . . . . . . . . . . . . . . . . . . 8
92 3.2.6. Unexpected Modifying . . . . . . . . . . . . . . . . . 8
93 3.3. Operating . . . . . . . . . . . . . . . . . . . . . . . . 8
94 3.3.1. General Summary . . . . . . . . . . . . . . . . . . . 8
95 3.3.2. Customer Calls . . . . . . . . . . . . . . . . . . . . 9
96 3.3.3. Abuse . . . . . . . . . . . . . . . . . . . . . . . . 9
97 3.4. Other Minor Problems . . . . . . . . . . . . . . . . . . . 9
98 3.4.1. Changing Platforms . . . . . . . . . . . . . . . . . . 9
99 3.4.2. Preference in Documentation . . . . . . . . . . . . . 9
100 3.4.3. Legibility . . . . . . . . . . . . . . . . . . . . . . 10
101 4. A Recommendation for IPv6 Text Representation . . . . . . . . 10
102 4.1. Handling Leading Zeros in a 16 Bit Field . . . . . . . . . 10
103 4.2. "::" Usage . . . . . . . . . . . . . . . . . . . . . . . . 10
104 4.2.1. Shorten As Much As Possible . . . . . . . . . . . . . 10
105 4.2.2. Handling One 16 Bit 0 Field . . . . . . . . . . . . . 10
106 4.2.3. Choice in Placement of "::" . . . . . . . . . . . . . 10
107 4.3. Lower Case . . . . . . . . . . . . . . . . . . . . . . . . 11
111 Kawamura & Kawashima Expires April 21, 2010 [Page 2]
113 Internet-Draft IPv6 Text Representation October 2009
116 5. Text Representation of Special Addresses . . . . . . . . . . . 11
117 6. Notes on Combining IPv6 Addresses with Port Numbers . . . . . 11
118 7. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 12
119 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
120 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
121 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
122 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13
123 11.1. Normative References . . . . . . . . . . . . . . . . . . . 13
124 11.2. Informative References . . . . . . . . . . . . . . . . . . 13
125 Appendix A. For Developers . . . . . . . . . . . . . . . . . . . 13
126 Appendix B. Prefix Issues . . . . . . . . . . . . . . . . . . . . 13
127 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13
167 Kawamura & Kawashima Expires April 21, 2010 [Page 3]
169 Internet-Draft IPv6 Text Representation October 2009
174 A single IPv6 address can be text represented in many ways. Examples
179 2001:0db8:0:0:1:0:0:1
193 All the above point to the same IPv6 address. This flexibility has
194 caused many problems for operators, systems engineers, and customers.
195 The problems will be noted in Section 3. Also, a canonical
196 representation format to avoid problems will be introduced in
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 In other words, 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 mean the same.
223 Kawamura & Kawashima Expires April 21, 2010 [Page 4]
225 Internet-Draft IPv6 Text Representation October 2009
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 are more than one zero fields, there is a choice
249 of how many fields can be shortened. Examples follow.
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
264 zero. Examples are shown below.
270 2.3. Uppercase or Lowercase
272 [RFC4291] does not mention about preference of uppercase or
273 lowercase. Various flavors are shown below.
279 Kawamura & Kawashima Expires April 21, 2010 [Page 5]
281 Internet-Draft IPv6 Text Representation October 2009
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 April 21, 2010 [Page 6]
337 Internet-Draft IPv6 Text Representation October 2009
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
344 problems encountered are mostly equal.
346 3.1.4. Searching for an Address in a Network Diagram
348 Network diagrams and blue-prints contain IP addresses as allocated to
349 system devices. In times of trouble shooting, there may be a need to
350 search through a diagram to find the point of failure (for example,
351 if a traceroute stopped at 2001:db8::1, one would search the diagram
352 for that address). This is a technique quite often in use in
353 enterprise networks and managed services. Again, the different
354 flavors of text representation will result in a time-consuming
355 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 text representation ways, each application must
362 include a module, object, link, etc. to a function that will parse
363 IPv6 addresses in a manner that no matter how it is represented, they
364 will mean the same address. This is not too much a problem if the
365 output is to be just 'read' or 'managed' by a network engineer.
366 However, many system engineers who integrate complex computer systems
367 to corporate customers will have difficulties finding that their
368 favorite tool will not have this function, or will encounter
369 difficulties such as having to rewrite their macro's or scripts for
370 their customers. It must be noted that each additional line of a
371 program will result in increased development fees that will be
372 charged to the customers.
376 If an application were to output a log summary that represented the
377 address in full (such as 2001:0db8:0000:0000:1111:2222:3333:4444),
378 the output would be highly unreadable compared to the IPv4 output.
379 The address would have to be parsed and reformed to make it useful
380 for human reading. This will result in additional code on the
381 applications which will result in extra fees charged to the
382 customers. Sometimes, logging for critical systems is done by
383 mirroring the same traffic to two different systems. Care must be
384 taken that no matter what the log output is, the logs should be
385 parsed so they will mean the same.
391 Kawamura & Kawashima Expires April 21, 2010 [Page 7]
393 Internet-Draft IPv6 Text Representation October 2009
396 3.2.3. Auditing: Case 1
398 When a router or any other network appliance machine configuration is
399 audited, there are many methods to compare the configuration
400 information of a node. Sometimes, auditing will be done by just
401 comparing the changes made each day. In this case, if configuration
402 was done such that 2001:db8::1 was changed to 2001:0db8:0000:0000:
403 0000:0000:0000:0001 just because the new engineer on the block felt
404 it was better, a simple diff will tell you that a different address
405 was configured. If this was done on a wide scale network, people
406 will be focusing on 'why the extra zeros were put in' instead of
407 doing any real auditing. Lots of tools are just plain 'diff's that
408 do not take into account address representation rules.
410 3.2.4. Auditing: Case 2
412 Node configurations will be matched against an information system
413 that manages IP addresses. If output notation is different, there
414 will need to be a script that is implemented to cover for this. An
415 SNMP GET of an interface address and text representation in a humanly
416 written text file is highly unlikely to match on first try.
420 Some protocols require certain data fields to be verified. One
421 example of this is X.509 certificates. If an IPv6 address was
422 embedded in one of the fields in a certificate, and the verification
423 was done by just a simple textual comparison, the certificate may be
424 maistakenly shown as being invalid due to a difference in text
425 representation methods.
427 3.2.6. Unexpected Modifying
429 Sometimes, a system will take an address and modify it as a
430 convenience. For example, a system may take an input of
431 2001:0db8:0::1 and make the output 2001:db8::1 (which is seen in some
432 RIR databases). If the zeros were input for a reason, the outcome
433 may be somewhat unexpected.
437 3.3.1. General Summary
439 When an operator sets an IPv6 address of a system as 2001:db8:0:0:1:
440 0:0:1, the system may take the address and show the configuration
441 result as 2001:DB8::1:0:0:1. A distinguished engineer will know that
442 the right address is set, but an operator, or a customer that is
443 communicating with the operator to solve a problem, is usually not as
447 Kawamura & Kawashima Expires April 21, 2010 [Page 8]
449 Internet-Draft IPv6 Text Representation October 2009
452 distinguished as we would like. Again, the extra load in checking
453 that the IP address is the same as was intended, will result in fees
454 that will be charged to the customers.
456 3.3.2. Customer Calls
458 When a customer calls to inquire about a suspected outage, IPv6
459 address representation should be handled with care. Not all
460 customers are engineers nor have the same skill in IPv6 technology.
461 The NOC will have to take extra steps to humanly parse the address to
462 avoid having to explain to the customers that 2001:db8:0:1::1 is the
463 same as 2001:db8::1:0:0:0:1. This is one thing that will never
464 happen in IPv4 because IPv4 address cannot be abbreviated.
468 Network abuse is reported along with the abusing IP address. This
469 'reporting' could take any shape or form of the flexible model. A
470 team that handles network abuse must be able to tell the difference
471 between a 2001:db8::1:0:1 and 2001:db8:1::0:1. Mistakes in the
472 placement of the "::" will result in a critical situation. A system
473 that handles these incidents should be able to handle any type of
474 input and parse it in a correct manner. Also, incidents are reported
475 over the phone. It is unnecessary to report if the letter is an
476 uppercase or lowercase. However, when a letter is spelled uppercase,
477 people tend to clarify that it is uppercase, which is unnecessary
480 3.4. Other Minor Problems
482 3.4.1. Changing Platforms
484 When an engineer decides to change the platform of a running service,
485 the same code may not work as expected due to the difference in IPv6
486 address text representation. Usually, a change in a platform (e.g.
487 Unix to Windows, Cisco to Juniper) will result in a major change of
488 code, but flexibility in address representation will increase the
489 work load which will again, result in fees that will be charged to
490 the customers, and also longer down time of systems.
492 3.4.2. Preference in Documentation
494 A document that is edited by more than one author, may become harder
503 Kawamura & Kawashima Expires April 21, 2010 [Page 9]
505 Internet-Draft IPv6 Text Representation October 2009
510 Capital case D and 0 can be quite often misread. Capital B and 8 can
514 4. A Recommendation for IPv6 Text Representation
516 A recommendation for a canonical text representation format of IPv6
517 addresses is presented in this section. The recommendation in this
518 document is one that, complies fully with [RFC4291], is implemented
519 by various operating systems, and is human friendly. The
520 recommendation in this document SHOULD be followed by humans and
521 systems when generating an address to represent as text, but all
522 implementations MUST accept any legitimate [RFC4291] format.
524 4.1. Handling Leading Zeros in a 16 Bit Field
526 Leading zeros should be chopped for human legibility and easier
527 searching. Also, a single 16 bit 0000 field should be represented as
528 just 0. Place holder zeros are often cause of misreading.
532 4.2.1. Shorten As Much As Possible
534 The use of "::" should be used to its maximum capability (i.e. 2001:
535 db8::0:1 is not considered as clean representation).
537 4.2.2. Handling One 16 Bit 0 Field
539 "::" should not be used to shorten just one 16 bit 0 field for it
540 would tend to mislead that there are more than one 16 bit field that
543 4.2.3. Choice in Placement of "::"
545 When there is an alternative choice in the placement of a "::", the
546 longest run of consecutive 16 bit 0 fields should be shortened (i.e.
547 latter is shortened in 2001:0:0:1:0:0:0:1). When the length of the
548 consecutive 16 bit 0 fields are equal (i.e. 2001:db8:0:0:1:0:0:1),
549 the former is shortened. This is consistent with many current
550 implementations. One idea to avoid any confusion, is for the
551 operator to not use 16 bit field 0 in the first 64 bits. By nature
552 IPv6 addresses are usually assigned or allocated to end-users as
553 longer than 32 bits (typically 48 bits or longer).
559 Kawamura & Kawashima Expires April 21, 2010 [Page 10]
561 Internet-Draft IPv6 Text Representation October 2009
566 Recent implementations tend to represent IPv6 address as lower case.
567 It is better to use lower case to avoid problems such as described in
568 section 3.3.3 and 3.4.3.
571 5. Text Representation of Special Addresses
573 Addresses such as IPv4-Mapped IPv6 addresses, ISATAP [RFC5214], and
574 IPv4-translated addresses [RFC2765] have IPv4 addresses embedded in
575 the low-order 32 bits of the address. These addresses have special
576 representation that may mix hexadecimal and decimal notations. In
577 cases where there is a choice of whether to express the address as
578 fully hexadecimal or hexadecimal and decimal mixed, and if the
579 address type can be distinguished as having IPv4 addresses embedded
580 in the lower 32 bits solely from the 128bits of the address field
581 itself, mixed notation is the better choice. However, there may be
582 situations where hexadecimal representation is chosen to meet certain
583 needs. Addressing those needs is out of the scope of this document.
584 The text representation method noted in Section 4 should be applied
585 for the leading hexadecimal part (i.e. ::ffff:192.0.2.1 instead of
586 0:0:0:0:0:ffff:192.0.2.1).
589 6. Notes on Combining IPv6 Addresses with Port Numbers
591 When IPv6 addresses and port numbers are represented in text combined
592 together, there seems to be many different ways to do so. Examples
601 o 2001:db8::1 port 80
607 The situation is not much different in IPv4, but the most ambiguous
608 case with IPv6 is the second bullet. This is due to the "::"usage in
609 IPv6 addresses. This style is not recommended for its ambiguity.
610 The [] style as expressed in [RFC3986] is recommended. Other styles
611 are acceptable when cross-platform portability does not become an
615 Kawamura & Kawashima Expires April 21, 2010 [Page 11]
617 Internet-Draft IPv6 Text Representation October 2009
625 The recommended format of text representing an IPv6 address is
626 summarized as follows.
628 (1) omit leading zeros in a 16 bit field
630 (2) when using "::", shorten consecutive zero fields to their
631 maximum extent (leave no zero fields behind).
633 (3) "::" used where shortens address the most
635 (4) "::" used in the former part in case of a tie breaker
637 (5) do not shorten one 16 bit 0 field, but always shorten when
638 there are two or more consecutive 16 bit 0 fields
642 Hints for developers are written in the Appendix section.
645 8. Security Considerations
650 9. IANA Considerations
657 The authors would like to thank Jan Zorz, Randy Bush, Yuichi Minami,
658 Toshimitsu Matsuura for their generous and helpful comments in kick
659 starting this document. We also would like to thank Brian Carpenter,
660 Akira Kato, Juergen Schoenwaelder, Antonio Querubin, Dave Thaler,
661 Brian Haley, Suresh Krishnan, Jerry Huang, Roman Donchenko, Heikki
662 Vatiainen for their input. Also a very special thanks to Ron Bonica,
663 Fred Baker, Brian Haberman, Robert Hinden, Jari Arkko, and Kurt
664 Lindqvist for their support in bringing this document to the light of
671 Kawamura & Kawashima Expires April 21, 2010 [Page 12]
673 Internet-Draft IPv6 Text Representation October 2009
678 11.1. Normative References
680 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
681 Requirement Levels", BCP 14, RFC 2119, March 1997.
683 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing
684 Architecture", RFC 4291, February 2006.
686 11.2. Informative References
688 [RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm
689 (SIIT)", RFC 2765, February 2000.
691 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
692 Resource Identifier (URI): Generic Syntax", STD 66,
693 RFC 3986, January 2005.
695 [RFC4038] Shin, M-K., Hong, Y-G., Hagino, J., Savola, P., and E.
696 Castro, "Application Aspects of IPv6 Transition",
697 RFC 4038, March 2005.
699 [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site
700 Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214,
704 Appendix A. For Developers
706 We recommend that developers use display routines that conform to
707 these rules. For example, the usage of getnameinfo() with flags
708 argument NI_NUMERICHOST in FreeBSD 7.0 will give a conforming output,
709 except for the special addresses notes in Section 5. The function
710 inet_ntop() of FreeBSD7.0 is a good C code reference, but should not
711 be called directly. See [RFC4038] for details.
714 Appendix B. Prefix Issues
716 Problems with prefixes are just the same as problems encountered with
717 addresses. Text representation method of IPv6 prefixes should be no
718 different from that of IPv6 addresses.
727 Kawamura & Kawashima Expires April 21, 2010 [Page 13]
729 Internet-Draft IPv6 Text Representation October 2009
736 14-22, Shibaura 4-chome
737 Minatoku, Tokyo 108-8558
740 Phone: +81 3 3798 6085
741 Email: kawamucho@mesh.ad.jp
745 NEC AccessTechnica, Ltd.
747 Kakegawa-shi, Shizuoka 436-8501
750 Phone: +81 537 23 9655
751 Email: kawashimam@necat.nec.co.jp
783 Kawamura & Kawashima Expires April 21, 2010 [Page 14]