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
|
<pre>Internet Engineering Task Force (IETF) V. Gurbani, Ed.
Request for Comments: 5954 Bell Laboratories, Alcatel-Lucent
Updates: <a href="./rfc3261">3261</a> B. Carpenter, Ed.
Category: Standards Track Univ. of Auckland
ISSN: 2070-1721 B. Tate, Ed.
BroadSoft
August 2010
<span class="h1">Essential Correction for IPv6 ABNF and URI Comparison in <a href="./rfc3261">RFC 3261</a></span>
Abstract
This document corrects the Augmented Backus-Naur Form (ABNF)
production rule associated with generating IPv6 literals in <a href="./rfc3261">RFC 3261</a>.
It also clarifies the rule for Uniform Resource Identifier (URI)
comparison when the URIs contain textual representation of IP
addresses.
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/rfc5954">http://www.rfc-editor.org/info/rfc5954</a>.
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">Gurbani, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5954">RFC 5954</a> SIP IPv6 ABNF August 2010</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-3">3</a>. Problem Statement . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-3.1">3.1</a>. Extra Colon in IPv4-Mapped IPv6 Address . . . . . . . . . . <a href="#page-2">2</a>
3.2. Comparing URIs with Textual Representation of IP
Addresses . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4">4</a>. Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.1">4.1</a>. Resolution for Extra Colon in IPv4-Mapped IPv6 Address . . <a href="#page-4">4</a>
4.2. Clarification for Comparison of URIs with Textual
Representation of IP Addresses . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-5">5</a>. Generating a Canonical IPv6 Textual Representation . . . . . . <a href="#page-5">5</a>
<a href="#section-6">6</a>. Security Considerations . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-7">7</a>. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-8">8</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-8.1">8.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-8.2">8.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document corrects the Augmented Backus-Naur Form (ABNF)
production rule associated with generating IPv6 literals in <a href="./rfc3261">RFC 3261</a>
[<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>]. It also clarifies the rule for Uniform Resource Identifier
(URI) comparison when the URIs contain textual representation of IP
addresses.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</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">RFC 2119</a> [<a href="#ref-2" title=""Key words for use in RFCs to Indicate Requirement Levels"">2</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Problem Statement</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Extra Colon in IPv4-Mapped IPv6 Address</span>
The ABNF [<a href="#ref-4" title=""Augmented BNF for Syntax Specifications: ABNF"">4</a>] for generating IPv6 literals in <a href="./rfc3261">RFC 3261</a> [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>] is
incorrect. When generating IPv4-mapped IPv6 addresses, the
production rule may actually generate the following construct:
[2001:db8:::192.0.2.1] - Note the extra colon before the IPv4
address.
The correct construct, of course, would only include two colons
before the IPv4 address.
<span class="grey">Gurbani, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5954">RFC 5954</a> SIP IPv6 ABNF August 2010</span>
Historically, the ABNF pertaining to IPv6 references in <a href="./rfc3261">RFC 3261</a>
was derived from <a href="./rfc2373#appendix-B">Appendix B of RFC 2373</a> [<a href="#ref-7" title=""IP Version 6 Addressing Architecture"">7</a>], which was flawed to
begin with (see errata for <a href="./rfc2373">RFC 2373</a> [<a href="#ref-8" title=""RFC Editor Errata"">8</a>]). <a href="./rfc2373">RFC 2373</a> has been
subsequently obsoleted by <a href="./rfc4291">RFC 4291</a> [<a href="#ref-6" title=""IP Version 6 Addressing Architecture"">6</a>].
The ABNF for IPv6reference is reproduced from <a href="./rfc3261">RFC 3261</a> below:
IPv6reference = "[" IPv6address "]"
IPv6address = hexpart [ ":" IPv4address ]
IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ]
hexseq = hex4 *( ":" hex4)
hex4 = 1*4HEXDIG
Note that the ambiguity occurs in the <IPv6address> production rule
where the <IPv4address> non-terminal is prefixed by the ":" token.
Because the <hexpart> production rule is defined such that two of its
alternatives already include the "::" token, this may yield to the
faulty construction of an IPv6-mapped IPv4 address with an extra
colon when expanding those alternatives.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Comparing URIs with Textual Representation of IP Addresses</span>
In SIP, URIs are compared for a variety of reasons. Registrars
compare URIs when they receive a binding update request, for
instance. <a href="./rfc3261#section-19.1.4">Section 19.1.4 of RFC 3261</a> [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>] provides the rules for
comparing URIs. Among other rules, it states that:
For two URIs to be equal, the user, password, host, and port
components must match.
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@[2001:db8::9:1] = sip:bob@[2001:db8::9:01]?
sip:bob@[0:0:0:0:0:FFFF:129.144.52.38] = sip:bob@
[::FFFF:129.144.52.38]?
In all of the above examples, the textual representation of the IPv6
address is different, but these addresses are binary equivalents
(implementers are also urged to consult <a href="#section-5">Section 5</a> of this document
for recommendations on IPv6 address text representations). <a href="./rfc3261#section-19.1.4">Section</a>
<a href="./rfc3261#section-19.1.4">19.1.4 of RFC 3261</a> does not provide any rule for URIs containing
different textual representations of IPv6 addresses that all
correspond to the same binary equivalent.
<span class="grey">Gurbani, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5954">RFC 5954</a> SIP IPv6 ABNF August 2010</span>
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
notation and the need to represent hybrid addresses (like IPv4-
mapped IPv6 addresses) makes the representation issue more acute.
The resolution discussed in <a href="#section-4.2">Section 4.2</a> applies to textual
representations of both IPv6 and IPv4 addresses.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Resolution</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Resolution for Extra Colon in IPv4-Mapped IPv6 Address</span>
The resolution to this ambiguity is simply to use the correct ABNF
for the <IPv6address> production rule from <a href="./rfc3986#appendix-A">Appendix A of RFC 3986</a>
[<a href="#ref-3" title=""Uniform Resource Identifier (URI): Generic Syntax"">3</a>]. For the sake of completeness, it is reproduced below:
IPv6address = 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::"
h16 = 1*4HEXDIG
ls32 = ( h16 ":" h16 ) / IPv4address
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255
Accordingly, this document updates <a href="./rfc3261">RFC 3261</a> as follows: the
<IPv6address> and <IPv4address> production rules from <a href="./rfc3261">RFC 3261</a> MUST
NOT be used and instead, the production rules of the same name in <a href="./rfc3986">RFC</a>
<a href="./rfc3986">3986</a> (and reproduced above) MUST be used. This will render
<hexpart>, <hexseq>, and <hex4> production rules in <a href="./rfc3261">RFC 3261</a>
obsolete; as such, these three production rules -- namely, <hexpart>,
<hexseq>, and <hex4> -- from <a href="./rfc3261">RFC 3261</a> MUST NOT be used.
The use of the <IPv4address> production rule from <a href="./rfc3986">RFC 3986</a> no longer
allows syntactically valid -- though semantically invalid -- SIP URIs
of the form "sip:bob@444.555.666.777".
<span class="grey">Gurbani, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5954">RFC 5954</a> SIP IPv6 ABNF August 2010</span>
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Clarification for Comparison of URIs with Textual Representation</span>
<span class="h3"> of IP Addresses</span>
The resolution to this ambiguity is a simple clarification
acknowledging that the textual representation of an IP address
varies, but it is the binary equivalence of the IP address that must
be taken into consideration when comparing two URIs that contain
varying textual representations of an IP address.
Accordingly, the existing rule from the bulleted list in <a href="./rfc3261#section-19.1.4">Section</a>
<a href="./rfc3261#section-19.1.4">19.1.4 of RFC 3261</a> MUST be modified as follows:
OLD:
o For two URIs to be equal, the user, password, host, and port
components must match.
NEW:
o For two URIs to be equal, the user, password, host, and port
components must match. If the host component contains a textual
representation of IP addresses, then the representation of those
IP addresses may vary. If so, the host components are considered
to match if the different textual representations yield the same
binary IP address.
In addition, the text in the following paragraph MUST be added to the
existing list of examples in <a href="./rfc3261#section-19.1.4">Section 19.1.4 of RFC 3261</a> in order to
demonstrate the intent of the modified rule:
The following URIs are equivalent because the underlying binary
representation of the IP addresses are the same although their
textual representations vary:
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@[0:0:0:0:0:FFFF:129.144.52.38]
sip:bob@[::FFFF:129.144.52.38]
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Generating a Canonical IPv6 Textual Representation</span>
Implementers SHOULD generate IPv6 text representation as defined in
<a href="./rfc5952">RFC 5952</a> [<a href="#ref-5" title=""A Recommendation for IPv6 Address Text Representation"">5</a>].
<span class="grey">Gurbani, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5954">RFC 5954</a> SIP IPv6 ABNF August 2010</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
This document does not introduce any new security considerations
beyond those described in <a href="./rfc3261">RFC 3261</a> [<a href="#ref-1" title=""SIP: Session Initiation Protocol"">1</a>].
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Acknowledgments</span>
The ABNF for IPv6 was developed by Roy T. Fielding and Andrew Main
and published in <a href="./rfc3986">RFC 3986</a>.
Jeroen van Bemmel, Peter Blatherwick, Gonzalo Camarillo, Paul
Kyzivat, Jonathan Rosenberg, Michael Thomas, and Dale Worley provided
invaluable discussion points on the SIP WG mailing list on the URI
equivalency problem. Alfred Hoenes urged the use of angle brackets
(as specified in <a href="./rfc5234#section-2.1">Section 2.1 of RFC 5234</a> [<a href="#ref-4" title=""Augmented BNF for Syntax Specifications: ABNF"">4</a>]) to denote productions.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
[<a id="ref-1">1</a>] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP:
Session Initiation Protocol", <a href="./rfc3261">RFC 3261</a>, June 2002.
[<a id="ref-2">2</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-3">3</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.
[<a id="ref-4">4</a>] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>, January 2008.
[<a id="ref-5">5</a>] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6
Address Text Representation", <a href="./rfc5952">RFC 5952</a>, August 2010.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
[<a id="ref-6">6</a>] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture", <a href="./rfc4291">RFC 4291</a>, February 2006.
[<a id="ref-7">7</a>] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture", <a href="./rfc2373">RFC 2373</a>, July 1998.
[<a id="ref-8">8</a>] "RFC Editor Errata", <<a href="http://www.rfc-editor.org/errata.php">http://www.rfc-editor.org/errata.php</a>>.
<span class="grey">Gurbani, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5954">RFC 5954</a> SIP IPv6 ABNF August 2010</span>
Authors' Addresses
Vijay K. Gurbani (editor)
Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane
Room 9C-533
Naperville, IL 60563
USA
Phone: +1 630 224-0216
EMail: vkg@bell-labs.com
Brian E. Carpenter (editor)
Department of Computer Science
University of Auckland
PB 92019
Auckland, 1142
New Zealand
EMail: brian.e.carpenter@gmail.com
Brett Tate (editor)
BroadSoft
EMail: brett@broadsoft.com
Gurbani, et al. Standards Track [Page 7]
</pre>
|