1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 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 781
|
<pre>Internet Engineering Task Force (IETF) S. Kawamura
Request for Comments: 5952 NEC BIGLOBE, Ltd.
Updates: <a href="./rfc4291">4291</a> M. Kawashima
Category: Standards Track NEC AccessTechnica, Ltd.
ISSN: 2070-1721 August 2010
<span class="h1">A Recommendation for IPv6 Address Text Representation</span>
Abstract
As IPv6 deployment increases, there will be a dramatic increase in
the need to use IPv6 addresses in text. While the IPv6 address
architecture in <a href="./rfc4291#section-2.2">Section 2.2 of RFC 4291</a> describes a flexible model
for text representation of an IPv6 address, this flexibility has been
causing problems for operators, system engineers, and users. This
document defines a canonical textual representation format. It does
not define a format for internal storage, such as within an
application or database. It is expected that the canonical format
will be followed by humans and systems when representing IPv6
addresses as text, but all implementations must accept and be able to
handle any legitimate <a href="./rfc4291">RFC 4291</a> format.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc5952">http://www.rfc-editor.org/info/rfc5952</a>.
<span class="grey">Kawamura & Kawashima Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Kawamura & Kawashima Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-1.1">1.1</a>. Requirements Language . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2">2</a>. Text Representation Flexibility of <a href="./rfc4291">RFC 4291</a> . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2.1">2.1</a>. Leading Zeros in a 16-Bit Field . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2.2">2.2</a>. Zero Compression . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-2.3">2.3</a>. Uppercase or Lowercase . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3">3</a>. Problems Encountered with the Flexible Model . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.1">3.1</a>. Searching . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.1.1">3.1.1</a>. General Summary . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.1.2">3.1.2</a>. Searching Spreadsheets and Text Files . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.1.3">3.1.3</a>. Searching with Whois . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.1.4">3.1.4</a>. Searching for an Address in a Network Diagram . . . . <a href="#page-7">7</a>
<a href="#section-3.2">3.2</a>. Parsing and Modifying . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-3.2.1">3.2.1</a>. General Summary . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-3.2.2">3.2.2</a>. Logging . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-3.2.3">3.2.3</a>. Auditing: Case 1 . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-3.2.4">3.2.4</a>. Auditing: Case 2 . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-3.2.5">3.2.5</a>. Verification . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-3.2.6">3.2.6</a>. Unexpected Modifying . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-3.3">3.3</a>. Operating . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-3.3.1">3.3.1</a>. General Summary . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-3.3.2">3.3.2</a>. Customer Calls . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-3.3.3">3.3.3</a>. Abuse . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-3.4">3.4</a>. Other Minor Problems . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-3.4.1">3.4.1</a>. Changing Platforms . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-3.4.2">3.4.2</a>. Preference in Documentation . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-3.4.3">3.4.3</a>. Legibility . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-4">4</a>. A Recommendation for IPv6 Text Representation . . . . . . . . <a href="#page-10">10</a>
<a href="#section-4.1">4.1</a>. Handling Leading Zeros in a 16-Bit Field . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-4.2">4.2</a>. "::" Usage . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-4.2.1">4.2.1</a>. Shorten as Much as Possible . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-4.2.2">4.2.2</a>. Handling One 16-Bit 0 Field . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-4.2.3">4.2.3</a>. Choice in Placement of "::" . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-4.3">4.3</a>. Lowercase . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-5">5</a>. Text Representation of Special Addresses . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-6">6</a>. Notes on Combining IPv6 Addresses with Port Numbers . . . . . <a href="#page-11">11</a>
<a href="#section-7">7</a>. Prefix Representation . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-8">8</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-9">9</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-10">10</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-10.1">10.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-10.2">10.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#appendix-A">Appendix A</a>. For Developers . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<span class="grey">Kawamura & Kawashima Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
A single IPv6 address can be text represented in many ways. Examples
are shown below.
2001:db8:0:0:1:0:0:1
2001:0db8:0:0:1:0:0:1
2001:db8::1:0:0:1
2001:db8::0:1:0:0:1
2001:0db8::1:0:0:1
2001:db8:0:0:1::1
2001:db8:0000:0:1::1
2001:DB8:0:0:1::1
All of the above examples represent the same IPv6 address. This
flexibility has caused many problems for operators, systems
engineers, and customers. The problems are noted in <a href="#section-3">Section 3</a>. A
canonical representation format to avoid problems is introduced in
<a href="#section-4">Section 4</a>.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Requirements Language</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Text Representation Flexibility of <a href="./rfc4291">RFC 4291</a></span>
Examples of flexibility in <a href="./rfc4291#section-2.2">Section 2.2 of [RFC4291]</a> are described
below.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Leading Zeros in a 16-Bit Field</span>
'It is not necessary to write the leading zeros in an individual
field.'
Conversely, it is also not necessary to omit leading zeros. This
means that it is possible to select from representations such as
those in the following example. The final 16-bit field is different,
but all of these addresses represent the same address.
<span class="grey">Kawamura & Kawashima Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
2001:db8:aaaa:bbbb:cccc:dddd:eeee:0001
2001:db8:aaaa:bbbb:cccc:dddd:eeee:001
2001:db8:aaaa:bbbb:cccc:dddd:eeee:01
2001:db8:aaaa:bbbb:cccc:dddd:eeee:1
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Zero Compression</span>
'A special syntax is available to compress the zeros. The use of
"::" indicates one or more groups of 16 bits of zeros.'
It is possible to select whether or not to omit just one 16-bit 0
field.
2001:db8:aaaa:bbbb:cccc:dddd::1
2001:db8:aaaa:bbbb:cccc:dddd:0:1
In cases where there is more than one field of only zeros, there is a
choice of how many fields can be shortened.
2001:db8:0:0:0::1
2001:db8:0:0::1
2001:db8:0::1
2001:db8::1
In addition, <a href="./rfc4291#section-2.2">Section 2.2 of [RFC4291]</a> notes,
'The "::" can only appear once in an address.'
This gives a choice on where in a single address to compress the
zero.
2001:db8::aaaa:0:0:1
2001:db8:0:0:aaaa::1
<span class="grey">Kawamura & Kawashima Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. Uppercase or Lowercase</span>
[<a id="ref-RFC4291">RFC4291</a>] does not mention any preference of uppercase or lowercase.
2001:db8:aaaa:bbbb:cccc:dddd:eeee:aaaa
2001:db8:aaaa:bbbb:cccc:dddd:eeee:AAAA
2001:db8:aaaa:bbbb:cccc:dddd:eeee:AaAa
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Problems Encountered with the Flexible Model</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Searching</span>
<span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a>. General Summary</span>
A search of an IPv6 address if conducted through a UNIX system is
usually case sensitive and extended options that allow for regular
expression use will come in handy. However, there are many
applications in the Internet today that do not provide this
capability. When searching for an IPv6 address in such systems, the
system engineer will have to try each and every possibility to search
for an address. This has critical impacts, especially when trying to
deploy IPv6 over an enterprise network.
<span class="h4"><a class="selflink" id="section-3.1.2" href="#section-3.1.2">3.1.2</a>. Searching Spreadsheets and Text Files</span>
Spreadsheet applications and text editors on GUI systems rarely have
the ability to search for text using regular expression. Moreover,
there are many non-engineers (who are not aware of case sensitivity
and regular expression use) that use these applications to manage IP
addresses. This has worked quite well with IPv4 since text
representation in IPv4 has very little flexibility. There is no
incentive to encourage these non-engineers to change their tool or
learn regular expression when they decide to go dual-stack. If the
entry in the spreadsheet reads, 2001:db8::1:0:0:1, but the search was
conducted as 2001:db8:0:0:1::1, this will show a result of no match.
One example where this will cause a problem is, when the search is
being conducted to assign a new address from a pool, and a check is
being done to see if it is not in use. This may cause problems for
the end-hosts or end-users. This type of address management is very
often seen in enterprise networks and ISPs.
<span class="h4"><a class="selflink" id="section-3.1.3" href="#section-3.1.3">3.1.3</a>. Searching with Whois</span>
The "whois" utility is used by a wide range of people today. When a
record is set to a database, one will likely check the output to see
if the entry is correct. If an entity was recorded as 2001:db8::/48,
<span class="grey">Kawamura & Kawashima Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
but the whois output showed 2001:0db8:0000::/48, most non-engineers
would think that their input was wrong and will likely retry several
times or make a frustrated call to the database hostmaster. If there
was a need to register the same prefix on different systems, and each
system showed a different text representation, this would confuse
people even more. Although this document focuses on addresses rather
than prefixes, it is worth mentioning the prefix problems because the
problems encountered with addresses and prefixes are mostly equal.
<span class="h4"><a class="selflink" id="section-3.1.4" href="#section-3.1.4">3.1.4</a>. Searching for an Address in a Network Diagram</span>
Network diagrams and blueprints often show what IP addresses are
assigned to a system devices. In times of trouble shooting there may
be a need to search through a diagram to find the point of failure
(for example, if a traceroute stopped at 2001:db8::1, one would
search the diagram for that address). This is a technique quite
often in use in enterprise networks and managed services. Again, the
different flavors of text representation will result in a time-
consuming search leading to longer mean times to restoration (MTTR)
in times of trouble.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Parsing and Modifying</span>
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. General Summary</span>
With all the possible methods of text representation, each
application must include a module, object, link, etc. to a function
that will parse IPv6 addresses in a manner such that no matter how it
is represented, they will mean the same address. Many system
engineers who integrate complex computer systems for corporate
customers will have difficulties finding that their favorite tool
will not have this function, or will encounter difficulties such as
having to rewrite their macros or scripts for their customers.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. Logging</span>
If an application were to output a log summary that represented the
address in full (such as 2001:0db8:0000:0000:1111:2222:3333:4444),
the output would be highly unreadable compared to the IPv4 output.
The address would have to be parsed and reformed to make it useful
for human reading. Sometimes logging for critical systems is done by
mirroring the same traffic to two different systems. Care must be
taken so that no matter what the log output is, the logs should be
parsed so they are equivalent.
<span class="grey">Kawamura & Kawashima Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a>. Auditing: Case 1</span>
When a router or any other network appliance machine configuration is
audited, there are many methods to compare the configuration
information of a node. Sometimes auditing will be done by just
comparing the changes made each day. In this case, if configuration
was done such that 2001:db8::1 was changed to 2001:0db8:0000:0000:
0000:0000:0000:0001 just because the new engineer on the block felt
it was better, a simple diff will show that a different address was
configured. If this was done on a wide scale network, people will be
focusing on 'why the extra zeros were put in' instead of doing any
real auditing. Lots of tools are just plain diffs that do not take
into account address representation rules.
<span class="h4"><a class="selflink" id="section-3.2.4" href="#section-3.2.4">3.2.4</a>. Auditing: Case 2</span>
Node configurations will be matched against an information system
that manages IP addresses. If output notation is different, there
will need to be a script that is implemented to cover for this. The
result of an SNMP GET operation, converted to text and compared to a
textual address written by a human is highly unlikely to match on the
first try.
<span class="h4"><a class="selflink" id="section-3.2.5" href="#section-3.2.5">3.2.5</a>. Verification</span>
Some protocols require certain data fields to be verified. One
example of this is X.509 certificates. If an IPv6 address field in a
certificate was incorrectly verified by converting it to text and
making a simple textual comparison to some other address, the
certificate may be mistakenly shown as being invalid due to a
difference in text representation methods.
<span class="h4"><a class="selflink" id="section-3.2.6" href="#section-3.2.6">3.2.6</a>. Unexpected Modifying</span>
Sometimes, a system will take an address and modify it as a
convenience. For example, a system may take an input of
2001:0db8:0::1 and make the output 2001:db8::1. If the zeros were
input for a reason, the outcome may be somewhat unexpected.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Operating</span>
<span class="h4"><a class="selflink" id="section-3.3.1" href="#section-3.3.1">3.3.1</a>. General Summary</span>
When an operator sets an IPv6 address of a system as 2001:db8:0:0:1:
0:0:1, the system may take the address and show the configuration
result as 2001:DB8::1:0:0:1. Someone familiar with IPv6 address
representation will know that the right address is set, but not
everyone may understand this.
<span class="grey">Kawamura & Kawashima Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h4"><a class="selflink" id="section-3.3.2" href="#section-3.3.2">3.3.2</a>. Customer Calls</span>
When a customer calls to inquire about a suspected outage, IPv6
address representation should be handled with care. Not all
customers are engineers, nor do they have a similar skill level in
IPv6 technology. The network operations center will have to take
extra steps to humanly parse the address to avoid having to explain
to the customers that 2001:db8:0:1::1 is the same as
2001:db8::1:0:0:0:1. This is one thing that will never happen in
IPv4 because IPv4 addresses cannot be abbreviated.
<span class="h4"><a class="selflink" id="section-3.3.3" href="#section-3.3.3">3.3.3</a>. Abuse</span>
Network abuse reports generally include the abusing IP address. This
'reporting' could take any shape or form of the flexible model. A
team that handles network abuse must be able to tell the difference
between a 2001:db8::1:0:1 and 2001:db8:1::0:1. Mistakes in the
placement of the "::" will result in a critical situation. A system
that handles these incidents should be able to handle any type of
input and parse it in a correct manner. Also, incidents are reported
over the phone. It is unnecessary to report if the letter is
uppercase or lowercase. However, when a letter is spelled uppercase,
people tend to specify that it is uppercase, which is unnecessary
information.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Other Minor Problems</span>
<span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a>. Changing Platforms</span>
When an engineer decides to change the platform of a running service,
the same code may not work as expected due to the difference in IPv6
address text representation. Usually, a change in a platform (e.g.,
Unix to Windows, Cisco to Juniper) will result in a major change of
code anyway, but flexibility in address representation will increase
the work load.
<span class="h4"><a class="selflink" id="section-3.4.2" href="#section-3.4.2">3.4.2</a>. Preference in Documentation</span>
A document that is edited by more than one author may become harder
to read.
<span class="h4"><a class="selflink" id="section-3.4.3" href="#section-3.4.3">3.4.3</a>. Legibility</span>
Capital case D and 0 can be quite often misread. Capital B and 8 can
also be misread.
<span class="grey">Kawamura & Kawashima Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. A Recommendation for IPv6 Text Representation</span>
A recommendation for a canonical text representation format of IPv6
addresses is presented in this section. The recommendation in this
document is one that complies fully with [<a href="./rfc4291" title=""IP Version 6 Addressing Architecture"">RFC4291</a>], is implemented by
various operating systems, and is human friendly. The recommendation
in this section SHOULD be followed by systems when generating an
address to be represented as text, but all implementations MUST
accept and be able to handle any legitimate [<a href="./rfc4291" title=""IP Version 6 Addressing Architecture"">RFC4291</a>] format. It is
advised that humans also follow these recommendations when spelling
an address.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Handling Leading Zeros in a 16-Bit Field</span>
Leading zeros MUST be suppressed. For example, 2001:0db8::0001 is
not acceptable and must be represented as 2001:db8::1. A single 16-
bit 0000 field MUST be represented as 0.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. "::" Usage</span>
<span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Shorten as Much as Possible</span>
The use of the symbol "::" MUST be used to its maximum capability.
For example, 2001:db8:0:0:0:0:2:1 must be shortened to 2001:db8::2:1.
Likewise, 2001:db8::0:1 is not acceptable, because the symbol "::"
could have been used to produce a shorter representation 2001:db8::1.
<span class="h4"><a class="selflink" id="section-4.2.2" href="#section-4.2.2">4.2.2</a>. Handling One 16-Bit 0 Field</span>
The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field.
For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
2001:db8::1:1:1:1:1 is not correct.
<span class="h4"><a class="selflink" id="section-4.2.3" href="#section-4.2.3">4.2.3</a>. Choice in Placement of "::"</span>
When there is an alternative choice in the placement of a "::", the
longest run of consecutive 16-bit 0 fields MUST be shortened (i.e.,
the sequence with three consecutive zero fields is shortened in 2001:
0:0:1:0:0:0:1). When the length of the consecutive 16-bit 0 fields
are equal (i.e., 2001:db8:0:0:1:0:0:1), the first sequence of zero
bits MUST be shortened. For example, 2001:db8::1:0:0:1 is correct
representation.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Lowercase</span>
The characters "a", "b", "c", "d", "e", and "f" in an IPv6 address
MUST be represented in lowercase.
<span class="grey">Kawamura & Kawashima Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Text Representation of Special Addresses</span>
Addresses such as IPv4-Mapped IPv6 addresses, ISATAP [<a href="./rfc5214" title=""Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)"">RFC5214</a>], and
IPv4-translatable addresses [<a href="#ref-ADDR-FORMAT" title=""IPv6 Addressing of IPv4/IPv6 Translators"">ADDR-FORMAT</a>] have IPv4 addresses
embedded in the low-order 32 bits of the address. These addresses
have a special representation that may mix hexadecimal and dot
decimal notations. The decimal notation may be used only for the
last 32 bits of the address. For these addresses, mixed notation is
RECOMMENDED if the following condition is met: the address can be
distinguished as having IPv4 addresses embedded in the lower 32 bits
solely from the address field through the use of a well-known prefix.
Such prefixes are defined in [<a href="./rfc4291" title=""IP Version 6 Addressing Architecture"">RFC4291</a>] and [<a href="./rfc2765" title=""Stateless IP/ICMP Translation Algorithm (SIIT)"">RFC2765</a>] at the time of
this writing. If it is known by some external method that a given
prefix is used to embed IPv4, it MAY be represented as mixed
notation. Tools that provide options to specify prefixes that are
(or are not) to be represented as mixed notation may be useful.
There is a trade-off here where a recommendation to achieve an exact
match in a search (no dot decimals whatsoever) and a recommendation
to help the readability of an address (dot decimal whenever possible)
does not result in the same solution. The above recommendation is
aimed at fixing the representation as much as possible while leaving
the opportunity for future well-known prefixes to be represented in a
human-friendly manner as tools adjust to newly assigned prefixes.
The text representation method noted in <a href="#section-4">Section 4</a> should be applied
for the leading hexadecimal part (i.e., ::ffff:192.0.2.1 instead of
0:0:0:0:0:ffff:192.0.2.1).
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Notes on Combining IPv6 Addresses with Port Numbers</span>
There are many different ways to combine IPv6 addresses and port
numbers that are represented in text. Examples are shown below.
o [2001:db8::1]:80
o 2001:db8::1:80
o 2001:db8::1.80
o 2001:db8::1 port 80
o 2001:db8::1p80
o 2001:db8::1#80
The situation is not much different in IPv4, but the most ambiguous
case with IPv6 is the second bullet. This is due to the "::"usage in
<span class="grey">Kawamura & Kawashima Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
IPv6 addresses. This style is NOT RECOMMENDED because of its
ambiguity. The [] style as expressed in [<a href="./rfc3986" title=""Uniform Resource Identifier (URI): Generic Syntax"">RFC3986</a>] SHOULD be
employed, and is the default unless otherwise specified. Other
styles are acceptable when there is exactly one style for the given
context and cross-platform portability does not become an issue. For
URIs containing IPv6 address literals, [<a href="./rfc3986" title=""Uniform Resource Identifier (URI): Generic Syntax"">RFC3986</a>] MUST be followed, as
well as the rules defined in this document.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Prefix Representation</span>
Problems with prefixes are the same as problems encountered with
addresses. The text representation method of IPv6 prefixes should be
no different from that of IPv6 addresses.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Security Considerations</span>
This document notes some examples where IPv6 addresses are compared
in text format. The example on <a href="#section-3.2.5">Section 3.2.5</a> is one that may cause a
security risk if used for access control. The common practice of
comparing X.509 data is done in binary format.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Acknowledgements</span>
The authors would like to thank Jan Zorz, Randy Bush, Yuichi Minami,
and Toshimitsu Matsuura for their generous and helpful comments in
kick starting this document. We also would like to thank Brian
Carpenter, Akira Kato, Juergen Schoenwaelder, Antonio Querubin, Dave
Thaler, Brian Haley, Suresh Krishnan, Jerry Huang, Roman Donchenko,
Heikki Vatiainen, Dan Wing, and Doug Barton for their input. Also, a
very special thanks to Ron Bonica, Fred Baker, Brian Haberman, Robert
Hinden, Jari Arkko, and Kurt Lindqvist for their support in bringing
this document to light in IETF working groups.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. References</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC2765">RFC2765</a>] Nordmark, E., "Stateless IP/ICMP Translation Algorithm
(SIIT)", <a href="./rfc2765">RFC 2765</a>, February 2000.
[<a id="ref-RFC3986">RFC3986</a>] Berners-Lee, T., Fielding, R., and L. Masinter,
"Uniform Resource Identifier (URI): Generic Syntax",
STD 66, <a href="./rfc3986">RFC 3986</a>, January 2005.
<span class="grey">Kawamura & Kawashima Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
[<a id="ref-RFC4291">RFC4291</a>] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture", <a href="./rfc4291">RFC 4291</a>, February 2006.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Informative References</span>
[<a id="ref-ADDR-FORMAT">ADDR-FORMAT</a>] Bao, C., <a style="text-decoration: none" href='https://www.google.com/search?sitesearch=datatracker.ietf.org%2Fdoc%2Fhtml%2F&q=inurl:draft-+%22IPv6+Addressing+of+IPv4%2FIPv6+Translators%22'>"IPv6 Addressing of IPv4/IPv6 Translators"</a>,
Work in Progress, July 2010.
[<a id="ref-RFC4038">RFC4038</a>] Shin, M-K., Hong, Y-G., Hagino, J., Savola, P., and E.
Castro, "Application Aspects of IPv6 Transition",
<a href="./rfc4038">RFC 4038</a>, March 2005.
[<a id="ref-RFC5214">RFC5214</a>] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site
Automatic Tunnel Addressing Protocol (ISATAP)",
<a href="./rfc5214">RFC 5214</a>, March 2008.
<span class="grey">Kawamura & Kawashima Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5952">RFC 5952</a> IPv6 Text Representation August 2010</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. For Developers</span>
We recommend that developers use display routines that conform to
these rules. For example, the usage of getnameinfo() with flags
argument NI_NUMERICHOST in FreeBSD 7.0 will give a conforming output,
except for the special addresses notes in <a href="#section-5">Section 5</a>. The function
inet_ntop() of FreeBSD7.0 is a good C code reference, but should not
be called directly. See [<a href="./rfc4038" title=""Application Aspects of IPv6 Transition"">RFC4038</a>] for details.
Authors' Addresses
Seiichi Kawamura
NEC BIGLOBE, Ltd.
14-22, Shibaura 4-chome
Minatoku, Tokyo 108-8558
JAPAN
Phone: +81 3 3798 6085
EMail: kawamucho@mesh.ad.jp
Masanobu Kawashima
NEC AccessTechnica, Ltd.
800, Shimomata
Kakegawa-shi, Shizuoka 436-8501
JAPAN
Phone: +81 537 23 9655
EMail: kawashimam@necat.nec.co.jp
Kawamura & Kawashima Standards Track [Page 14]
</pre>
|