idnits 2.17.1 draft-bcx-behave-address-fmt-extension-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (December 23, 2014) is 3411 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'PSID' is mentioned on line 387, but not defined == Unused Reference: 'RFC6144' is defined on line 514, but no explicit reference was found in the text == Unused Reference: 'RFC6346' is defined on line 517, but no explicit reference was found in the text ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 3633 (Obsoleted by RFC 8415) == Outdated reference: A later version (-13) exists of draft-ietf-softwire-map-12 == Outdated reference: A later version (-08) exists of draft-xli-behave-divi-06 Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 behave C. Bao 3 Internet-Draft X. Li 4 Intended status: Standards Track CERNET Center/Tsinghua University 5 Expires: June 26, 2015 December 23, 2014 7 Extended IPv6 Addressing for Encoding Port Range 8 draft-bcx-behave-address-fmt-extension-07 10 Abstract 12 This document discusses an extension of the algorithmic translation 13 between IPv4 and IPv4-translatable IPv6 addresses. The extended 14 address format contains transport-layer port set identification 15 (PSID) which allows several IPv6 nodes to share a single IPv4 address 16 with each node managing a different range of ports. This address 17 format extension can be used for IPv4/IPv6 translation, as well as 18 IPv4 over IPv6 tunneling. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on June 26, 2015. 37 Copyright Notice 39 Copyright (c) 2014 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 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 This document may contain material from IETF Documents or IETF 53 Contributions published or made publicly available before November 54 10, 2008. The person(s) controlling the copyright in some of this 55 material may not have granted the IETF Trust the right to allow 56 modifications of such material outside the IETF Standards Process. 57 Without obtaining an adequate license from the person(s) controlling 58 the copyright in such materials, this document may not be modified 59 outside the IETF Standards Process, and derivative works of it may 60 not be created outside the IETF Standards Process, except to format 61 it for publication as an RFC or to translate it into languages other 62 than English. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 67 1.1. Applicability Scope . . . . . . . . . . . . . . . . . . . 3 68 1.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 3 69 2. Port Mapping Algorithm . . . . . . . . . . . . . . . . . . . 4 70 2.1. Mathematical representation of the Algorithm . . . . . . 4 71 2.2. Bit Representation of the Algorithm . . . . . . . . . . . 4 72 2.3. Example of the Algorithm . . . . . . . . . . . . . . . . 5 73 2.3.1. PSID with fixed prefix length . . . . . . . . . . . . 5 74 2.3.2. PSID with variable prefix length . . . . . . . . . . 5 75 2.4. Features of the Algorithm . . . . . . . . . . . . . . . . 6 76 3. Extended IPv4-translatable IPv6 Address . . . . . . . . . . . 6 77 3.1. Address Format . . . . . . . . . . . . . . . . . . . . . 6 78 3.2. Considerations of Using a Shorter Prefix length . . . . . 8 79 3.3. Mapping Extended IPv4-translatable IPv6 Address to 80 RFC1918 Space . . . . . . . . . . . . . . . . . . . . . . 8 81 4. DHCP Options Extensions . . . . . . . . . . . . . . . . . . . 9 82 5. Comparisons with MAP . . . . . . . . . . . . . . . . . . . . 9 83 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 84 7. Security Considerations . . . . . . . . . . . . . . . . . . . 10 85 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 86 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 87 9.1. Normative References . . . . . . . . . . . . . . . . . . 11 88 9.2. Informative References . . . . . . . . . . . . . . . . . 11 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 91 1. Introduction 93 This document discusses an extension of the address format defined in 94 [RFC6052]. In Section 2.2, the IPv4-embedded IPv6 address format is 95 defined which composed of a variable length prefix, the embedded IPv4 96 address, and a variable length suffix, as presented in the following 97 diagram, in which PL designates the prefix length: 99 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 100 |PL| 0-------------32--40--48--56--64--72--80--88--96--104-112-120-| 101 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 102 |32| prefix |v4(32) | u | suffix | 103 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 104 |40| prefix |v4(24) | u |(8)| suffix | 105 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 106 |48| prefix |v4(16) | u | (16) | suffix | 107 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 108 |56| prefix |(8)| u | v4(24) | suffix | 109 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 110 |64| prefix | u | v4(32) | suffix | 111 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 112 |96| prefix | v4(32) | 113 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 115 Figure 1: Address Format 117 In [RFC6052] Section 3.5, it states: 119 "There have been proposals to complement stateless translation 120 with a port-range feature. Instead of mapping an IPv4 address to 121 exactly one IPv6 prefix, the options would allow several IPv6 122 nodes to share an IPv4 address, with each node managing a 123 different range of ports. If a port range extension is needed, it 124 could be defined later, using bits currently reserved as null in 125 the suffix." 127 This document defines such a suffix encoding scheme and the 128 corresponding port mapping algorithm. 130 1.1. Applicability Scope 132 The address format extension presented in this document is used for 133 IPv4/IPv6 stateless translation and dual IPv4/IPv6 stateless 134 translation without prefix delegation [I-D.xli-behave-divi]. The 135 address format used for dual IPv4/IPv6 stateless translation and 136 encapsulation with prefix delegation should refer to 137 [I-D.ietf-softwire-map-t] [I-D.ietf-softwire-map]. 139 1.2. Conventions 141 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 142 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 143 document are to be interpreted as described in [RFC2119]. 145 2. Port Mapping Algorithm 147 2.1. Mathematical representation of the Algorithm 149 There exist many port mapping algorithms and each one may have 150 advantages and disadvantages, as well as has its best application 151 scenario. Since different PSID MUST have non-overlapped port range, 152 the two extreme cases are: (1) the port number is not continue for 153 each PSID, but uniformly distributed cross the whole port range 154 (0-65535); (2) the port number is continue in a single range for each 155 PSID. The port mapping algorithm proposed here is called generalized 156 modulus algorithm and it is flexible, meets these two cases and 157 simple. 159 For given sharing ratio (R) and the maximum number of continue ports 160 (M), the generalized modulus algorithm is defined as 162 1. The port number (P) of a given PSID (K) is composed of 164 P = R*M*j + M*K + i 166 Where 167 o PSID: K=0 to R-1 168 o Port range index: j = (1024/M)/R to ((65536/M)/R)-1, if the 169 well-known port numbers (0-1023) are excluded. 170 o Port continue index: i=0 to M-1 172 2. The PSID (K) of a given port number (P) is determined by 174 K = (floor(P/M)) % R 176 Where 177 o % is modular operator 178 o floor(arg) is a function returns the largest integer not 179 greater than arg 181 3. The well-known port number (0-1023) can be used, if additional 182 port mapping rule is defined. 184 2.2. Bit Representation of the Algorithm 186 Given sharing ratio (R=2^k), the maximum number of continue ports 187 (M=2^m), for any PSID (K) available ports (P) can be represented as: 189 0 8 15 190 +---------------+----------+------+-------------------+ 191 | P | 192 ----------------+-----------------+-------------------+ 193 | A (j) | PSID (K) | M (i) | 194 +---------------+----------+------+-------------------+ 195 |<----a bits--->|<-----k bits---->|<------m bits----->| 196 |<---c bits--->|<-----(k+m-c) bits--->| 198 Figure 2: Bit representation 200 Where j and i are the same indexes defined in the port mapping 201 algorithm. 203 For any port number, the PSID can be obtained by bit mask operation 204 and therefore the generalized modulus algorithm does not introduce 205 the computational complexity. 207 Note that in above figure there is a PSID prefix length (c). Based 208 on this definition, PSID is also in CIDR style and more ports can be 209 assigned to a single CE when PSID prefix length (c < k). 211 When m=0, the generalized modulus algorithm becomes modulus 212 operation. When a=0, the generalized modulus algorithm becomes 213 division operation. 215 2.3. Example of the Algorithm 217 2.3.1. PSID with fixed prefix length 219 For example, for R=128 (k=7), M=4 (m=2) 221 Port range-1 | Port rang-2 | Port 222 ------------------------------------------------------------------- 223 PSID=0 | 1024, 1025, 1026, 1027, | 1536, 1537, 1538, 1539, | 2048 224 PSID=1 | 1028, 1029, 1030, 1031, | 1540, 1541, 1542, 1543, | .... 225 PSID=2 | 1032, 1033, 1034, 1035, | 1544, 1545, 1546, 1547, | .... 226 PSID=3 | 1036, 1037, 1038, 1039, | 1548, 1549, 1550, 1551, | .... 227 ... 228 PSID=127 | 1532, 1533, 1534, 1535, | 2044, 2045, 2046, 2047, | .... 230 Figure 3: Example 1 232 2.3.2. PSID with variable prefix length 234 For example, different PSIDs have different prefix length (c) 235 Host | PSID prefix | Number of ports 236 ------------------------------------------------------- 237 Host0 | 000/2 | 2x8192 238 Host1 | 010/3 | 1x8192 239 Host2 | 011/3 | 1x8192 240 Host3 | 100/1 | 4x8192 241 ------------------------------------------------------- 243 Figure 4: Example 2 245 2.4. Features of the Algorithm 247 The generalized modulus operation has the following features: 249 1. There is no waste of the port number, except the well-known 250 ports. 252 2. The algorithm is flexible, the control parameters are sharing 253 ratio (R), the continue port range (M) and PSID prefix length 254 (c). 256 3. It does not introduce algorithm complexity. 258 4. It allows service providers to define their own address sharing 259 ratio, the theoretical value is from 1:1 to 1:65536 and a more 260 practical value is from 1:1 to 1:4096. 262 5. It supports deployments using differentiated port ranges. 264 6. It supports differentiated port ranges within a single shared 265 IPv4 address. 267 7. It support excluding the well known ports 0-1023. 269 8. It supports assigning well known ports to a CE. 271 9. It supports legacy RTP/RTCP compatibility. 273 3. Extended IPv4-translatable IPv6 Address 275 3.1. Address Format 277 Based on the port mapping algorithm, the extended address format is 278 shown in the following figure. 280 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 281 |PL| 0-------------32--40--48--56--64--72--80--88--96--104-112-120-| 282 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 283 |32| prefix |v4(32) | u | PSID | 0 | Q | 284 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 285 |40| prefix |v4(24) | u |(8)| PSID | 0 | Q | 286 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 287 |48| prefix |v4(16) | u | (16) | PSID | 0 | Q | 288 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 289 |56| prefix |(8)| u | v4(24) | PSID | 0 | Q | 290 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 291 |64| prefix | u | v4(32) |PSID |0| Q | 292 +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 294 Figure 5: Address Format 296 Where PL designates the prefix length. 298 The PSID is placed right after the IPv4 address, since the 299 combination of the IPv4 address and the PSID represents the more 300 specifics in CIDR style which is sharing an IPv4 address with others. 302 The PSID prefix length (Q=c) is encoded in the last octet (bits 303 120-127) to indicate the number of ports can be used. When Q=0, the 304 extended address format will become the address format defined in 305 [RFC6052]. The relations between Q, the sharing ratio (R), the 306 maximum continue port range (M) and the number of ports can be shown 307 in the following figure. 309 Q Ratio | Maximum M | # of Ports 310 ------------------------------------------ 311 0 1:1 65,536 65,536 312 1 1:2 32,786 32,786 313 2 1:4 16,384 16,384 314 3 1:8 8,192 8,192 315 4 1:16 4,096 4,096 316 5 1:32 2,048 2,048 317 6 1:64 1,024 1,024 318 7 1:128 512 512 319 8 1:256 256 256 320 9 1:512 128 128 321 10 1:1,024 64 64 322 11 1:2,048 32 32 323 12 1:4,096 16 16 324 ------------------------------------------ 326 Figure 6: Port range 328 Since newly defined IPv6 addresses with suffix are more specifics 329 compared with the original address format defined in [RFC6052], the 330 routing considerations in that document are also applied here. 331 Furthermore, the port range is embedded in the extended 332 IPv4-translatable IPv6 addresses and bound to the PSID therefore the 333 packets containing extended IPv4-translatable IPv6 addresses as the 334 destination can be routed to different IPv6 nodes. 336 3.2. Considerations of Using a Shorter Prefix length 338 Since IPv4 address plus variable length PSID represents the more 339 specifics, the prefix length (PL) defined in [RFC6052] can be 340 shorter. In these cases, the interface identifier (IID: second 64 341 bits) will not contains PSID and therefore can be used for regular 342 prefix delegation, as shown in the following figure. 344 +--+---+---+----+----+-------+----+----+----+---+---+---+------+ 345 |PL| 0-----24---28---32------56---60---64---72------96-----120-| 346 +--+---+---+----+----+-------+----+----+----+---+---+---+------+ 347 |24| prefix| v4(32) | PSID | u | | Q | 348 +--+---+---+----+----+-------+----+----+----+---+---+---+------+ 349 |28| prefix | v4(32) |PSID| u | | Q | 350 +--+---+---+----+----+-------+----+----+----+---+---+---+------+ 351 |32| prefix | v4(32) | u | | Q | 352 +--+---+---+----+----+-------+----+----+----+---+---+---+------+ 354 Figure 7: Shorter PL 356 Note that PL can take any value. For example, 358 o PL=24: Q=8, R=256 359 o PL=25: Q=7, R=128 360 o PL=26: Q=6, R=64 361 o PL=27: Q=5, R=32 362 o PL=28: Q=4, R=16 363 o PL=29: Q=3, R=8 364 o PL=30: Q=2, R=4 365 o PL=31: Q=1, R=2 366 o PL=32: Q=0, R=1 368 However, there will be a waste of the IPv6 address space in order to 369 represent the IPv4-converted addresses. 371 3.3. Mapping Extended IPv4-translatable IPv6 Address to RFC1918 Space 373 Based on the algorithm defined in this document, a public IPv4 374 address and PSID can be mapped to extended IPv4-translatable IPv6 375 address and vise versa. 377 On the other hand, it is also possible to map the extended 378 IPv4-translatable IPv6 address to [RFC1918] address space. In this 379 case, one public IPv4 address can be mapped to several RFC1918 380 addresses and used by IPv4 or dual stack hosts. 382 For public IPv4 address a.b.c.d, 384 o If R <= 256, the corresponding RFC1918 address is 10.c.d.PSID 385 (PSID has 8 bits) 387 o Otherwise, the corresponding RFC1918 address is 10.d.[PSID] (PSID 388 has 16 bits) 390 4. DHCP Options Extensions 392 Based on the address format and the port mapping algorithm defined in 393 this document, the IPv6 host needs to get the corresponding 394 parameters via DHCPv6 [RFC3315][RFC3633] or others signaling scheme. 395 These parameters are: 397 1. The IPv6 prefix 399 2. The IPv6 prefix length 401 3. The IPv4 prefix 403 4. The IPv4 prefix length 405 5. The sharing ratio (R) 407 6. The maximum number of continue ports (M) 409 7. The PSID (K) 411 8. The PSID length (c) 413 5. Comparisons with MAP 415 There are common parts and differences between this document and the 416 address format defined in [I-D.ietf-softwire-map] 417 [I-D.ietf-softwire-map-t]. 419 1. The address format extension defined in this document is used for 420 single and dual stateless translation without prefix delegation, 421 while MAP is used for encapsulation and dual stateless 422 translation with prefix delegation. 424 2. The address format extension defined in this document uses same 425 IPv6 prefix for the source address from a CE to any destination 426 (IPv4-translatable address) and the destination address from a CE 427 to the outside IPv4 Internet (IPv4-converted address), while MAP 428 uses different IPv6 prefixes, due to the requirements of prefix 429 delegation. 431 3. The address format extension defined in this document uses same 432 IPv6 prefix for all CEs, so there is no need to define prefix 433 encoding scheme (e.g. CE index, or EA-bits), while MAP defines 434 the prefix encoding scheme, due to the requirements of prefix 435 delegation. 437 4. Due to the nature of using same IPv6 prefix for both 438 IPv4-translatable address and IPv4-converted address, there is no 439 referral problem and mesh scenarios can be supported without 440 additional mapping rules, while MAP does require additional 441 mapping rule for supporting mesh scenario. 443 5. The address format extension defined in this document and MAP 444 share the same suffix coding scheme (IPv4 address + PSID). 446 6. The AFT and MAP share the same port mapping algorithm 447 (generalized modulus algorithm). 449 6. IANA Considerations 451 This memo adds no new IANA considerations. 453 7. Security Considerations 455 There is no special security consideration. 457 8. Acknowledgements 459 Thanks to Wojciech Dec, Remi Despres, Ole Troan, Rajiv Asati, 460 Chongfeng Xie, Qiong Sun, Fred Baker, Wing Dan, M. Boucadair and all 461 the friends for the fruitful discussions during the unification of 462 the port mapping algorithm of 463 [I-D.mdt-softwire-mapping-address-and-port]. Also thanks to Wentao 464 Shang, Guoliang Han, Yu Zhai, Haotao Zhang and Weicai Wang for their 465 contributions. 467 9. References 468 9.1. Normative References 470 [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and 471 E. Lear, "Address Allocation for Private Internets", BCP 472 5, RFC 1918, February 1996. 474 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 475 Requirement Levels", BCP 14, RFC 2119, March 1997. 477 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 478 and M. Carney, "Dynamic Host Configuration Protocol for 479 IPv6 (DHCPv6)", RFC 3315, July 2003. 481 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 482 Host Configuration Protocol (DHCP) version 6", RFC 3633, 483 December 2003. 485 [RFC6052] Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. 486 Li, "IPv6 Addressing of IPv4/IPv6 Translators", RFC 6052, 487 October 2010. 489 9.2. Informative References 491 [I-D.ietf-softwire-map] 492 Troan, O., Dec, W., Li, X., Bao, C., Matsushima, S., 493 Murakami, T., and T. Taylor, "Mapping of Address and Port 494 with Encapsulation (MAP)", draft-ietf-softwire-map-12 495 (work in progress), November 2014. 497 [I-D.ietf-softwire-map-t] 498 Li, X., Bao, C., Dec, W., Troan, O., Matsushima, S., and 499 T. Murakami, "Mapping of Address and Port using 500 Translation (MAP-T)", draft-ietf-softwire-map-t-08 (work 501 in progress), December 2014. 503 [I-D.mdt-softwire-mapping-address-and-port] 504 Bao, C., Troan, O., Matsushima, S., Murakami, T., and X. 505 Li, "Mapping of Address and Port (MAP)", draft-mdt- 506 softwire-mapping-address-and-port-03 (work in progress), 507 January 2012. 509 [I-D.xli-behave-divi] 510 Bao, C., Li, X., Zhai, Y., and W. Shang, "dIVI: Dual- 511 Stateless IPv4/IPv6 Translation", draft-xli-behave-divi-06 512 (work in progress), January 2014. 514 [RFC6144] Baker, F., Li, X., Bao, C., and K. Yin, "Framework for 515 IPv4/IPv6 Translation", RFC 6144, April 2011. 517 [RFC6346] Bush, R., "The Address plus Port (A+P) Approach to the 518 IPv4 Address Shortage", RFC 6346, August 2011. 520 Authors' Addresses 522 Congxiao Bao 523 CERNET Center/Tsinghua University 524 Room 225, Main Building, Tsinghua University 525 Beijing 100084 526 China 528 Phone: +86 10-62785983 529 Email: congxiao@cernet.edu.cn 531 Xing Li 532 CERNET Center/Tsinghua University 533 Room 225, Main Building, Tsinghua University 534 Beijing 100084 535 China 537 Phone: +86 10-62785983 538 Email: xing@cernet.edu.cn