draft-ietf-sip-ipv6-abnf-fix-05.txt   rfc5954.txt 
SIP WG V. Gurbani, Ed. Internet Engineering Task Force (IETF) V. Gurbani, Ed.
Internet-Draft Bell Laboratories, Alcatel-Lucent Request for Comments: 5954 Bell Laboratories, Alcatel-Lucent
Updates: 3261 (if approved) B. Carpenter, Ed. Updates: 3261 B. Carpenter, Ed.
Intended status: Standards Track Univ. of Auckland Category: Standards Track Univ. of Auckland
Expires: November 1, 2010 B. Tate, Ed. ISSN: 2070-1721 B. Tate, Ed.
BroadSoft BroadSoft
April 30, 2010 August 2010
Essential correction for IPv6 ABNF and URI comparison in RFC3261 Essential Correction for IPv6 ABNF and URI Comparison in RFC 3261
draft-ietf-sip-ipv6-abnf-fix-05
Abstract Abstract
This document corrects the Augmented Backus-Naur Form (ABNF) This document corrects the Augmented Backus-Naur Form (ABNF)
production rule associated with generating IPv6 literals in RFC3261. production rule associated with generating IPv6 literals in RFC 3261.
It also clarifies the rule for Uniform Resource Identifier (URI) It also clarifies the rule for Uniform Resource Identifier (URI)
comparison when the URIs contain textual representation of IP comparison when the URIs contain textual representation of IP
addresses. addresses.
Status of this Memo Status of This Memo
This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at This is an Internet Standards Track document.
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at This document is a product of the Internet Engineering Task Force
http://www.ietf.org/shadow.html. (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 Section 2 of RFC 5741.
This Internet-Draft will expire on November 1, 2010. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc5954.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Problem statement . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1. Extra colon in IPv4-mapped IPv6 address . . . . . . . . . . 3 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . . 2
2.2. Comparing URIs with textual representation of IP 3.1. Extra Colon in IPv4-Mapped IPv6 Address . . . . . . . . . . 2
addresses . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.2. Comparing URIs with Textual Representation of IP
3. Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Resolution for extra colon in IPv4-mapped IPv6 address . . 4 4. Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Clarification for comparison of URIs with textual 4.1. Resolution for Extra Colon in IPv4-Mapped IPv6 Address . . 4
representation of IP addresses . . . . . . . . . . . . . . 5 4.2. Clarification for Comparison of URIs with Textual
4. Generating a Canonical IPv6 Textual Representation . . . . . . 6 Representation of IP Addresses . . . . . . . . . . . . . . 5
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 5. Generating a Canonical IPv6 Textual Representation . . . . . . 5
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 6
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 7 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 6
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.1. Normative References . . . . . . . . . . . . . . . . . . . 7 8.1. Normative References . . . . . . . . . . . . . . . . . . . 6
8.2. Informative References . . . . . . . . . . . . . . . . . . 7 8.2. Informative References . . . . . . . . . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Terminology 1. Introduction
This document corrects the Augmented Backus-Naur Form (ABNF)
production rule associated with generating IPv6 literals in RFC 3261
[1]. It also clarifies the rule for Uniform Resource Identifier
(URI) comparison when the URIs contain textual representation of IP
addresses.
2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [2]. document are to be interpreted as described in RFC 2119 [2].
2. Problem statement 3. Problem Statement
2.1. Extra colon in IPv4-mapped IPv6 address 3.1. Extra Colon in IPv4-Mapped IPv6 Address
The ABNF [4] for generating IPv6 literals in RFC3261 [1] is The ABNF [4] for generating IPv6 literals in RFC 3261 [1] is
incorrect. When generating IPv4-mapped IPv6 addresses, the incorrect. When generating IPv4-mapped IPv6 addresses, the
production rule may actually generate the following construct: production rule may actually generate the following construct:
[2001:db8:::192.0.2.1] - Note the extra colon before the IPv4 [2001:db8:::192.0.2.1] - Note the extra colon before the IPv4
address. address.
The correct construct, of course, would only include two colons The correct construct, of course, would only include two colons
before the IPv4 address. before the IPv4 address.
Historically, the ABNF pertaining to IPv6 references in RFC3261 Historically, the ABNF pertaining to IPv6 references in RFC 3261
was derived from Appendix B of RFC 2373 [7], which was flawed to was derived from Appendix B of RFC 2373 [7], which was flawed to
begin with (see also RFC2373 errata at begin with (see errata for RFC 2373 [8]). RFC 2373 has been
http://www.rfc-editor.org/cgi-bin/errataSearch.pl?rfc=2373.) subsequently obsoleted by RFC 4291 [6].
RFC2373 has been subsequently obsoleted by RFC 4291 [6].
The ABNF for IPv6 reference is reproduced from RFC3261 below: The ABNF for IPv6reference is reproduced from RFC 3261 below:
IPv6reference = "[" IPv6address "]" IPv6reference = "[" IPv6address "]"
IPv6address = hexpart [ ":" IPv4address ] IPv6address = hexpart [ ":" IPv4address ]
IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ] hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ]
hexseq = hex4 *( ":" hex4) hexseq = hex4 *( ":" hex4)
hex4 = 1*4HEXDIG hex4 = 1*4HEXDIG
Note that the ambiguity occurs in the <IPv6address> production rule Note that the ambiguity occurs in the <IPv6address> production rule
where the <IPv4address> non-terminal is prefixed by the ":" token. where the <IPv4address> non-terminal is prefixed by the ":" token.
Because the <hexpart> production rule is defined such that two of its Because the <hexpart> production rule is defined such that two of its
alternatives already include the "::" token, this may yield to the alternatives already include the "::" token, this may yield to the
faulty construction of an IPv6-mapped IPv4 address with an extra faulty construction of an IPv6-mapped IPv4 address with an extra
colon when expanding those alternatives. colon when expanding those alternatives.
2.2. Comparing URIs with textual representation of IP addresses 3.2. Comparing URIs with Textual Representation of IP Addresses
In SIP, URIs are compared for a variety of reasons. Registrars In SIP, URIs are compared for a variety of reasons. Registrars
compare URIs when they receive a binding update request, for compare URIs when they receive a binding update request, for
instance. Section 19.1.4 of RFC3261 [1] provides the rules for instance. Section 19.1.4 of RFC 3261 [1] provides the rules for
comparing URIs. Among other rules, it states that: comparing URIs. Among other rules, it states that:
For two URIs to be equal, the user, password, host, and port For two URIs to be equal, the user, password, host, and port
components must match. components must match.
Does the above rule then imply that the following URIs are equal: Does the above rule then imply that the following URIs are equal:
sip:bob@[::ffff:192.0.2.128] = sip:bob@[::ffff:c000:280]? sip:bob@[::ffff:192.0.2.128] = sip:bob@[::ffff:c000:280]?
sip:bob@[2001:db8::9:1] = sip:bob@[2001:db8::9:01]? sip:bob@[2001:db8::9:1] = sip:bob@[2001:db8::9:01]?
sip:bob@[0:0:0:0:0:FFFF:129.144.52.38] = sip:bob@ sip:bob@[0:0:0:0:0:FFFF:129.144.52.38] = sip:bob@
[::FFFF:129.144.52.38]? [::FFFF:129.144.52.38]?
In all of the above examples, the textual representation of the IPv6 In all of the above examples, the textual representation of the IPv6
address is different, but these addresses are binary equivalent address is different, but these addresses are binary equivalents
(implementers are also urged to consult Section 4 of this document (implementers are also urged to consult Section 5 of this document
for recommendations on IPv6 address text representations.) Section for recommendations on IPv6 address text representations). Section
19.1.4 of RFC3261 does not provide any rule for URIs containing 19.1.4 of RFC 3261 does not provide any rule for URIs containing
different textual representations of IPv6 addresses that all different textual representations of IPv6 addresses that all
correspond to the same binary equivalent. correspond to the same binary equivalent.
Note that the same ambiguity occurs for IPv4 addresses, i.e., is Note that the same ambiguity occurs for IPv4 addresses, i.e., is
192.0.2.128 = 192.00.02.128? However, IPv6, with its compressed 192.0.2.128 = 192.00.02.128? However, IPv6, with its compressed
notation and the need to represent hybrid addresses (like IPv4- notation and the need to represent hybrid addresses (like IPv4-
mapped IPv6 addresses) makes the representation issue more acute. mapped IPv6 addresses) makes the representation issue more acute.
The resolution discussed in Section 3.2 applies to textual The resolution discussed in Section 4.2 applies to textual
representations of both IPv6 and IPv4 addresses. representations of both IPv6 and IPv4 addresses.
3. Resolution 4. Resolution
3.1. Resolution for extra colon in IPv4-mapped IPv6 address 4.1. Resolution for Extra Colon in IPv4-Mapped IPv6 Address
The resolution to this ambiguity is simply to use the correct ABNF The resolution to this ambiguity is simply to use the correct ABNF
for the <IPv6address> production rule from Appendix A of RFC3986 [3]. for the <IPv6address> production rule from Appendix A of RFC 3986
For the sake of completeness, it is reproduced below: [3]. For the sake of completeness, it is reproduced below:
IPv6address = 6( h16 ":" ) ls32 IPv6address = 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32 / "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32 / [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32 / [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16 / [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::" / [ *6( h16 ":" ) h16 ] "::"
h16 = 1*4HEXDIG h16 = 1*4HEXDIG
ls32 = ( h16 ":" h16 ) / IPv4address ls32 = ( h16 ":" h16 ) / IPv4address
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9 dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99 / %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199 / "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249 / "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255 / "25" %x30-35 ; 250-255
Accordingly, this document updates RFC3261 as follows: the Accordingly, this document updates RFC 3261 as follows: the
<IPv6address> and <IPv4address> production rules MUST be deleted from <IPv6address> and <IPv4address> production rules from RFC 3261 MUST
RFC3261 and MUST be replaced with the production rules of the same NOT be used and instead, the production rules of the same name in RFC
name in RFC3986 (and reproduced above.) These changes, when made to 3986 (and reproduced above) MUST be used. This will render
RFC3261, will make <hexpart>, <hexseq>, and <hex4> production rules <hexpart>, <hexseq>, and <hex4> production rules in RFC 3261
obsolete. Thus this document also mandates that the <hexpart>, obsolete; as such, these three production rules -- namely, <hexpart>,
<hexseq>, and <hex4> production rules MUST be deleted from the ABNF <hexseq>, and <hex4> -- from RFC 3261 MUST NOT be used.
of RFC3261.
3.2. Clarification for comparison of URIs with textual representation The use of the <IPv4address> production rule from RFC 3986 no longer
of IP addresses allows syntactically valid -- though semantically invalid -- SIP URIs
of the form "sip:bob@444.555.666.777".
4.2. Clarification for Comparison of URIs with Textual Representation
of IP Addresses
The resolution to this ambiguity is a simple clarification The resolution to this ambiguity is a simple clarification
acknowledging that the textual representation of an IP addresses acknowledging that the textual representation of an IP address
varies, but it is the binary equivalence of the IP address that must varies, but it is the binary equivalence of the IP address that must
be taken into consideration when comparing two URIs that contain be taken into consideration when comparing two URIs that contain
varying textual representations of an IP address. varying textual representations of an IP address.
Accordingly, the existing rule from the bulleted list in Section Accordingly, the existing rule from the bulleted list in Section
19.1.4 of RFC3261 MUST be modified as follows: 19.1.4 of RFC 3261 MUST be modified as follows:
OLD: OLD:
o For two URIs to be equal, the user, password, host, and port o For two URIs to be equal, the user, password, host, and port
components must match. components must match.
NEW: NEW:
o For two URIs to be equal, the user, password, host, and port o For two URIs to be equal, the user, password, host, and port
components must match. If the host component contains a textual components must match. If the host component contains a textual
representation of IP addresses, then the representation of those representation of IP addresses, then the representation of those
IP addresses may vary. If so, the host components are considered IP addresses may vary. If so, the host components are considered
to match if the different textual representations yield the same to match if the different textual representations yield the same
binary IP address. binary IP address.
In addition, the text in the following paragraph MUST be added to the In addition, the text in the following paragraph MUST be added to the
existing list of examples in Section 19.1.4 of RFC3261 in order to existing list of examples in Section 19.1.4 of RFC 3261 in order to
demonstrate the intent of the modified rule: demonstrate the intent of the modified rule:
The following URIs are equivalent because the underlying binary The following URIs are equivalent because the underlying binary
representation of the IP addresses are the same although their representation of the IP addresses are the same although their
textual representations vary: textual representations vary:
sip:bob@[::ffff:192.0.2.128] sip:bob@[::ffff:192.0.2.128]
sip:bob@[::ffff:c000:280] sip:bob@[::ffff:c000:280]
sip:bob@[2001:db8::9:1] sip:bob@[2001:db8::9:1]
sip:bob@[2001:db8::9:01] sip:bob@[2001:db8::9:01]
sip:bob@[0:0:0:0:0:FFFF:129.144.52.38] sip:bob@[0:0:0:0:0:FFFF:129.144.52.38]
sip:bob@[::FFFF:129.144.52.38] sip:bob@[::FFFF:129.144.52.38]
4. Generating a Canonical IPv6 Textual Representation 5. Generating a Canonical IPv6 Textual Representation
Implementers SHOULD generate IPv6 text representation as defined in Implementers SHOULD generate IPv6 text representation as defined in
[5]. RFC 5952 [5].
5. Security Considerations
This document does not introduce any new security considerations.
6. IANA Considerations 6. Security Considerations
This document does not include any IANA considerations. This document does not introduce any new security considerations
beyond those described in RFC 3261 [1].
7. Acknowledgments 7. Acknowledgments
The ABNF for IPv6 was developed by Roy T. Fielding and Andrew Main The ABNF for IPv6 was developed by Roy T. Fielding and Andrew Main
and published in RFC3986. and published in RFC 3986.
Jeroen van Bemmel, Peter Blatherwick, Gonzalo Camarillo, Paul Jeroen van Bemmel, Peter Blatherwick, Gonzalo Camarillo, Paul
Kyzivat, Jonathan Rosenberg, Michael Thomas, and Dale Worley provided Kyzivat, Jonathan Rosenberg, Michael Thomas, and Dale Worley provided
invaluable discussion points on the SIP WG mailing list on the URI invaluable discussion points on the SIP WG mailing list on the URI
equivalency problem. Alfred Hoenes urged the use of angle brackets equivalency problem. Alfred Hoenes urged the use of angle brackets
(as specified in Section 2.1 of [4]) to denote productions. (as specified in Section 2.1 of RFC 5234 [4]) to denote productions.
8. References 8. References
8.1. Normative References 8.1. Normative References
[1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., [1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP:
Session Initiation Protocol", RFC 3261, June 2002. Session Initiation Protocol", RFC 3261, June 2002.
[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997. Levels", BCP 14, RFC 2119, March 1997.
[3] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [3] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986,
January 2005. January 2005.
[4] Crocker, D. and P. Overell, "Augmented BNF for Syntax [4] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008. Specifications: ABNF", STD 68, RFC 5234, January 2008.
[5] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 [5] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6
Address Text Representation", Address Text Representation", RFC 5952, August 2010.
draft-ietf-6man-text-addr-representation-07 (work in progress),
February 2010.
8.2. Informative References 8.2. Informative References
[6] Hinden, R. and S. Deering, "IP Version 6 Addressing [6] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture", RFC 4291, February 2006. Architecture", RFC 4291, February 2006.
[7] Hinden, R. and S. Deering, "IP Version 6 Addressing [7] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture", RFC 2373, July 1998. Architecture", RFC 2373, July 1998.
[8] "RFC Editor Errata", <http://www.rfc-editor.org/errata.php>.
Authors' Addresses Authors' Addresses
Vijay K. Gurbani (editor) Vijay K. Gurbani (editor)
Bell Laboratories, Alcatel-Lucent Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane 1960 Lucent Lane
Room 9C-533 Room 9C-533
Naperville, IL 60563 Naperville, IL 60563
USA USA
Phone: +1 630 224-0216 Phone: +1 630 224-0216
Email: vkg@bell-labs.com EMail: vkg@bell-labs.com
Brian E. Carpenter (editor) Brian E. Carpenter (editor)
Department of Computer Science Department of Computer Science
University of Auckland University of Auckland
PB 92019 PB 92019
Auckland, 1142 Auckland, 1142
New Zealand New Zealand
Email: brian.e.carpenter@gmail.com EMail: brian.e.carpenter@gmail.com
Brett Tate (editor) Brett Tate (editor)
BroadSoft BroadSoft
Email: brett@broadsoft.com EMail: brett@broadsoft.com
 End of changes. 42 change blocks. 
107 lines changed or deleted 103 lines changed or added

This html diff was produced by rfcdiff 1.38. The latest version is available from http://tools.ietf.org/tools/rfcdiff/