idnits 2.17.1 draft-ietf-behave-v4v6-bih-03.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 : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 3 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 3 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. -- The draft header indicates that this document obsoletes RFC3338, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document obsoletes RFC2767, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 485 has weird spacing: '...address trans...' == Line 486 has weird spacing: '... app res. ...' == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. == 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 (March 11, 2011) is 4795 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) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 2767 (Obsoleted by RFC 6535) ** Obsolete normative reference: RFC 2893 (Obsoleted by RFC 4213) ** Obsolete normative reference: RFC 3338 (Obsoleted by RFC 6535) Summary: 5 errors (**), 0 flaws (~~), 8 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Behave WG B. Huang 3 Internet-Draft H. Deng 4 Obsoletes: 3338, 2767 China Mobile 5 (if approved) T. Savolainen 6 Intended status: Standards Track Nokia 7 Expires: September 12, 2011 March 11, 2011 9 Dual Stack Hosts Using "Bump-in-the-Host" (BIH) 10 draft-ietf-behave-v4v6-bih-03 12 Abstract 14 Bump-In-the-Host (BIH) is a host-based IPv4 to IPv6 protocol 15 translation mechanism that allows a class of IPv4-only applications 16 that work through NATs to communicate with IPv6-only peers. The host 17 on which applications are running may be connected to IPv6-only or 18 dual-stack access networks. BIH hides IPv6 and makes the IPv4-only 19 applications think they are talking with IPv4 peers by local 20 synthesis of IPv4 addresses. 22 Status of this Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on September 12, 2011. 39 Copyright Notice 41 Copyright (c) 2011 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 This document may contain material from IETF Documents or IETF 55 Contributions published or made publicly available before November 56 10, 2008. The person(s) controlling the copyright in some of this 57 material may not have granted the IETF Trust the right to allow 58 modifications of such material outside the IETF Standards Process. 59 Without obtaining an adequate license from the person(s) controlling 60 the copyright in such materials, this document may not be modified 61 outside the IETF Standards Process, and derivative works of it may 62 not be created outside the IETF Standards Process, except to format 63 it for publication as an RFC or to translate it into languages other 64 than English. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 69 1.1. Acknowledgement of previous work . . . . . . . . . . . . . 5 70 2. Components of the Bump-in-the-Host . . . . . . . . . . . . . . 6 71 2.1. Function Mapper . . . . . . . . . . . . . . . . . . . . . 7 72 2.2. Protocol translator . . . . . . . . . . . . . . . . . . . 8 73 2.3. Extension Name Resolver . . . . . . . . . . . . . . . . . 8 74 2.3.1. Special exclusion sets for A and AAAA records . . . . 9 75 2.3.2. DNSSEC support . . . . . . . . . . . . . . . . . . . . 9 76 2.3.3. Reverse DNS lookup . . . . . . . . . . . . . . . . . . 9 77 2.4. Address Mapper . . . . . . . . . . . . . . . . . . . . . . 10 78 3. Behavior and network Examples . . . . . . . . . . . . . . . . 11 79 4. Considerations . . . . . . . . . . . . . . . . . . . . . . . . 15 80 4.1. Socket API Conversion . . . . . . . . . . . . . . . . . . 15 81 4.2. ICMP Message Handling . . . . . . . . . . . . . . . . . . 15 82 4.3. IPv4 Address Pool and Mapping Table . . . . . . . . . . . 15 83 4.4. Multi-interface . . . . . . . . . . . . . . . . . . . . . 16 84 4.5. Multicast . . . . . . . . . . . . . . . . . . . . . . . . 16 85 4.6. DNS cache . . . . . . . . . . . . . . . . . . . . . . . . 16 86 5. Considerations due ALG requirements . . . . . . . . . . . . . 17 87 6. Security Considerations . . . . . . . . . . . . . . . . . . . 18 88 7. Changes since RFC2767 and RFC3338 . . . . . . . . . . . . . . 19 89 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 20 90 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 91 9.1. Normative References . . . . . . . . . . . . . . . . . . . 21 92 9.2. Informative References . . . . . . . . . . . . . . . . . . 21 93 Appendix A. Implementation option for the ENR . . . . . . . . . . 23 94 Appendix B. API list intercepted by BIH . . . . . . . . . . . . . 24 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 26 97 1. Introduction 99 This document describes Bump-in-the-Host (BIH), a successor and 100 combination of the Bump-in-the-Stack (BIS)[RFC2767] and Bump-in-the- 101 API (BIA) [RFC3338] technologies, which enable IPv4-only legacy 102 applications to communicate with IPv6-only servers by synthesizing 103 IPv4 addresses from AAAA records. 105 The supported class of applications includes those that use DNS for 106 IP address resolution and that do not embed IP address literals in 107 protocol payloads. This essentially includes legacy client-server 108 applications using the DNS that are agnostic to the IP address family 109 used by the destination and that are able to do NAT traversal. The 110 synthetic IPv4 addresses shown to applications are taken from the 111 RFC1918 private address pool in order to ensure that possible NAT 112 traversal techniques will be initiated. 114 IETF recommends using dual-stack or tunneling based solutions for 115 IPv6 transition and specifically recommends against deployments 116 utilizing double protocol translation. Use of BIH together with a 117 NAT64 is NOT RECOMMENDED as a competing technology for tunneling 118 based transition solutions. 120 BIH includes two major implementation options: a protocol translator 121 between the IPv4 and the IPv6 stacks of a host, or an API translator 122 between the IPv4 socket API module and the TCP/IP module. 123 Essentially, IPv4 is translated into IPv6 at the socket API layer or 124 at the IP layer. 126 When BIH is implemented at the socket API layer, the translator 127 intercepts IPv4 socket API function calls and invokes corresponding 128 IPv6 socket API function calls to communicate with IPv6 hosts. 130 When BIH is implemented at the networking layer the IPv4 packets are 131 intercepted and converted to IPv6 using the IP conversion mechanism 132 defined in Stateless IP/ICMP Translation Algorithm (SIIT) 133 [I-D.ietf-behave-v6v4-xlate]. The protocol translation has the same 134 benefits and drawbacks as SIIT. 136 The location of the BIH refers essentially to the location of the 137 protocol translation function. The location of DNS synthesis is 138 orthogonal to the location of protocol translation, and may or may 139 not happen at the same level. 141 BIH can be used whenever an IPv4-only application needs to 142 communicate with an IPv6-only server, independently of the address 143 families supported by the access network. Hence the access network 144 can be IPv6-only or dual-stack capable. 146 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 147 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 148 document are to be interpreted as described in [RFC2119] . 150 This document uses terms defined in [RFC2460] , [RFC2893] , [RFC2767] 151 and [RFC3338]. 153 1.1. Acknowledgement of previous work 155 This document is a direct update to and directly derivative from 156 Kazuaki TSHUCHIYA, Hidemitsu HIGUCHI, and Yoshifumi ATARASHI's Bump- 157 in-the-Stack [RFC2767] and from Seungyun Lee, Myung-Ki Shin, Yong-Jin 158 Kim, Alain Durand, and Erik Nordmark's Bump-in-the-API [RFC3338], 159 which similarly provide a dual stack host means to communicate with 160 other IPv6 hosts using existing IPv4 applications. 162 2. Components of the Bump-in-the-Host 164 Figure 1 shows the architecture of a host in which BIH is implemented 165 as a socket API layer translator, i.e., as a "Bump-in-the-API". 167 +----------------------------------------------+ 168 | +------------------------------------------+ | 169 | | | | 170 | | IPv4 applications | | 171 | | | | 172 | +------------------------------------------+ | 173 | +------------------------------------------+ | 174 | | Socket API (IPv4, IPv6) | | 175 | +------------------------------------------+ | 176 | +-[ API translator]------------------------+ | 177 | | +-----------+ +---------+ +------------+ | | 178 | | | Ext. Name | | Address | | Function | | | 179 | | | Resolver | | Mapper | | Mapper | | | 180 | | +-----------+ +---------+ +------------+ | | 181 | +------------------------------------------+ | 182 | +--------------------+ +-------------------+ | 183 | | | | | | 184 | | TCP(UDP)/IPv4 | | TCP(UDP)/IPv6 | | 185 | | | | | | 186 | +--------------------+ +-------------------+ | 187 +----------------------------------------------+ 189 Figure 1: Architecture of a dual stack host using protocol 190 translation at socket layer 192 Figure 2 shows the architecture of a host in which BIH is implemented 193 as a network layer translator, i.e., a "Bump-in-the-Stack". 195 +------------------------------------------------------------+ 196 | +------------------------------------------+ | 197 | | IPv4 applications | | 198 | | Host's main DNS resolver | | 199 | +------------------------------------------+ | 200 | +------------------------------------------+ | 201 | | TCP/UDP | | 202 | +------------------------------------------+ | 203 | +------------------------------------------+ +---------+ | 204 | | IPv4 | | | | 205 | +------------------------------------------+ | Address | | 206 | +------------------+ +---------------------+ | Mapper | | 207 | | Protocol | | Extension Name | | | | 208 | | Translator | | Resolver | | | | 209 | +------------------+ +---------------------+ | | | 210 | +------------------------------------------+ | | | 211 | | IPv4 / IPv6 | | | | 212 | +------------------------------------------+ +---------+ | 213 +------------------------------------------------------------+ 215 Figure 2: Architecture of a dual-stack host using protocol 216 translation at the network layer 218 Dual stack hosts defined in RFC 2893 [RFC2893] need applications, 219 TCP/IP modules and addresses for both IPv4 and IPv6. The proposed 220 hosts in this document have an API or network-layer translator to 221 allow existing IPv4 applications to communicate with IPv6-only peers. 222 The BIH architecture consists of an Extension Name Resolver, an 223 Address Mapper, and depending on implementation either a Function 224 Mapper or a Protocol Translator. It is worth noting that Extension 225 Name Resolver's placement is orthogonal decision to placement of 226 protocol translation. For example, the Extension Name Resolver may 227 reside in the socket API while protocol translation takes place at 228 the networking layer. 230 2.1. Function Mapper 232 The function mapper translates an IPv4 socket API function into an 233 IPv6 socket API function. 235 When detecting IPv4 socket API function calls from IPv4 applications, 236 the function mapper intercepts the function calls and invokes IPv6 237 socket API functions that correspond to the IPv4 socket API 238 functions. 240 See Appendix B for a list of functions that MUST be intercepted by 241 the function mapper. 243 2.2. Protocol translator 245 The protocol translator translates IPv4 into IPv6 and vice versa 246 using the IP conversion mechanism defined in SIIT 247 [I-D.ietf-behave-v6v4-xlate]. To avoid unnecessary fragmentation, 248 host's IPv4 module should be configured with small enough MTU (IPv6 249 link MTU - 20 bytes). 251 2.3. Extension Name Resolver 253 The Extension Name Resolver (ENR) returns a proper answer in response 254 to the IPv4 application's name resolution request. 256 In the case of the socket API layer implementation option, when an 257 IPv4 application tries to do a forward lookup to resolve names via 258 the resolver library (e.g., gethostbyname()), BIH intercepts the 259 function call and instead calls the IPv6 equivalent functions (e.g., 260 getnameinfo()) that will resolve both A and AAAA records. This 261 implementation option is name resolution protocol agnostic, and hence 262 supports techniques such as "hosts-file", NetBIOS, mDNS, and 263 essentially anything underlying operating system uses. 265 In the case of the network layer implementation option, the ENR 266 intercepts the A query and creates an additional AAAA query with 267 essentially the same content. The ENR will then collect replies to 268 both A and AAAA queries and, depending on results, either return an A 269 reply unmodified or synthesize a new A reply. The network layer 270 implementation option will only be able to catch applications' name 271 resolution requests that result in actual DNS queries, hence is more 272 limited when compared to socket API layer implementation option. 274 In either implementation option, if only AAAA records are available 275 for the queried name, the ENR asks the address mapper to assign a 276 local IPv4 address corresponding to each IPv6 address. In the case 277 of the API layer implementation option, the ENR will simply the make 278 API (e.g. gethostbyname) return the synthetic address. In the case 279 of the network-layer implementation option, the ENR synthesizes an A 280 record for the assigned IPv4 address, and delivers it up the stack. 282 If there is a real A record available, the ENR SHOULD NOT synthesize 283 IPv4 addresses. By default an ENR implementation MUST NOT synthesize 284 IPv4 addresses when real A records exist. 286 If the response contains a CNAME or a DNAME record, then the CNAME or 287 DNAME chain is followed until the first terminating A or AAAA record 288 is reached. 290 Application | Network | ENR behavior 291 query | response | 292 ------------+----------+------------------------ 293 A | A | 294 A | AAAA | 295 A | A/AAAA | 297 Figure 3: ENR behavior illustration 299 2.3.1. Special exclusion sets for A and AAAA records 301 An ENR implementation MAY by default exclude certain IPv4 and IPv6 302 addresses seen on received A and AAAA records. The addresses to be 303 excluded by default SHOULD include martian addresses such as those 304 that should not appear in the DNS or on the wire. Additional 305 addresses MAY be excluded based on possibly configurable local 306 policies. 308 2.3.2. DNSSEC support 310 When the ENR is implemented at the network layer, the A record 311 synthesis can cause essentially the same issues as are described in 312 [I-D.ietf-behave-dns64] section 3. To avoid unwanted discarding of 313 synthetic A records on the host's main resolver, the host's main 314 resolver MUST send DNS questions with the CD "Checking Disabled" bit 315 cleared. The ENR can support DNSSEC as any resolver on a host. 317 When the ENR is implemented at the socket API level, there are no 318 problems with DNSSEC, as the ENR itself uses socket APIs for DNS 319 resolution. 321 DNSSEC can also be supported by configuring the (stub) resolver on a 322 host to trust validations done by the ENR located at network layer or 323 alternatively the validating resolver can implement ENR on itself. 325 In order to properly support DNSSEC, the ENR SHOULD be implemented at 326 the socket API level. If the socket API level implementation is not 327 possible, DNSSEC support SHOULD be provided by other means. 329 2.3.3. Reverse DNS lookup 331 When an application initiates a reverse DNS query for a PTR record, 332 to find a name for an IP address, the ENR MUST check whether the 333 queried IP address can be found in the Address Mapper's mapping table 334 and is a local IP address. If an entry is found and the queried 335 address is locally generated, the ENR MUST initiate a corresponding 336 reverse DNS query for the real IPv6 address. In the case application 337 requested reverse lookup for an address not part of the local IPv4 338 address pool, e.g., a global address, the request MUST be forwarded 339 unmodified to the network. 341 For example, when an application initiates a reverse DNS query for a 342 synthesized locally valid IPv4 address, the ENR needs to intercept 343 that query. The ENR asks the address mapper for the IPv6 address 344 that corresponds to the IPv4 address. The ENR shall perform a 345 reverse lookup procedure for the destination's IPv6 address and 346 return the name received as a response to the application that 347 initiated the IPv4 query. 349 2.4. Address Mapper 351 The address mapper maintains a local IPv4 address pool. The pool 352 consists of private IPv4 addresses as per section 4.3. Also, the 353 address mapper maintains a table consisting of pairs of locally 354 selected IPv4 addresses and destinations' IPv6 addresses. 356 When the extension name resolver, translator, or the function mapper 357 requests the address mapper to assign an IPv4 address corresponding 358 to an IPv6 address, the address mapper selects and returns an IPv4 359 address out of the local pool, and registers a new entry into the 360 table. The registration occurs in the following 3 cases: 362 (1) When the extension name resolver gets only AAAA records for the 363 target host name in the dual stack or IPv6-only network and there is 364 no existing mapping entry for the IPv6 addresses. One or more local 365 IPv4 addresses will be returned to application and mappings for local 366 IPv4 addresses to real IPv6 addresses are created. 368 (2) When the extension name resolver gets both A records and AAAA 369 records, but the A records contain only excluded IPv4 addresses. 370 Behavior will follow the case (1). 372 (3) When the function mapper gets a socket API function call 373 triggered by a received IPv6 packet and there is no existing mapping 374 entry for the IPv6 source address (for example, client sent UDP 375 request to anycast address but response was received from unicast 376 address). 378 Other possible combinations are outside of BIH and BIH is not 379 involved in those. 381 3. Behavior and network Examples 383 Figure 4 illustrates a very basic network scenario. An IPv4-only 384 application is running on a host attached to the IPv6-only Internet 385 and is talking to an IPv6-only server. Communication is made 386 possible by Bump-In-the-Host. 388 +----+ +-------------+ 389 | H1 |----------- IPv6 Internet -------- | IPv6 server | 390 +----+ +-------------+ 391 v4 only 392 application 394 Figure 4: Network Scenario #1 396 Figure 5 illustrates a possible network scenario where an IPv4-only 397 application is running on a host attached to a dual-stack network, 398 but the destination server is running on a private site that is 399 numbered with public IPv6 addresses and private IPv4 addresses 400 without port forwarding setup on the NAT44. The only means to 401 contact the server is to use IPv6. 403 +----------------------+ +------------------------------+ 404 | Dual Stack Internet | | IPv4 Private site (Net 10) | 405 | | | | 406 | | | +----------+ | 407 | | | | | | 408 | +----+ +---------+ | | | 409 | | H1 |-------- | NAT44 |-------------| Server | | 410 | +----+ +---------+ | | | 411 | v4 only | | +----------+ | 412 | application | | Dual Stack | 413 | | | 10.1.1.1 | 414 | | | AAAA:2009::1 | 415 | | | | 416 +----------------------+ +------------------------------+ 418 Figure 5: Network Scenario #2 420 Illustrations of host behavior in both implementation options are 421 given here. Figure 6 illustrates the setup where BIH is implemented 422 as a bump in the API, and figure 7 illustrates the setup where BIH is 423 implemented as a bump in the stack. 425 "dual stack" "host6" 426 IPv4 Socket | [ API Translator ] | TCP(UDP)/IP Name 427 appli- API | ENR Address Function| (v6/v4) Server 428 cation | Mapper Mapper | 429 | | | | | | | | 430 <> | | | 431 | | | | | | | | 432 |------->|------->| Query of IPv4 address for host6. | | 433 | | | | | | | | 434 | | |------------------------------------------------->| 435 | | | Query of 'A' records and 'AAAA' for host6 | 436 | | | | | | | | 437 | | |<-------------------------------------------------| 438 | | | Reply with the 'AAAA' record. | | 439 | | | | | | | 440 | | |<> | 441 | | | | | | | 442 | | |+++++++>| Request one IPv4 address | 443 | | | | corresponding to the IPv6 address. 444 | | | | | | | 445 | | | |<> | 446 | | | | | | | 447 | | |<+++++++| Reply with the IPv4 address. | 448 | | | | | | | 449 |<-------|<-------| Reply with the IPv4 address | 450 | | | | | | | 451 | | | | | | | 452 <> | | | 453 | | | | | | | 454 |=======>|=========================>|An IPv4 Socket API function call 455 | | | | | | | 456 | | | |<+++++++| Request IPv6 addresses| 457 | | | | | corresponding to the | 458 | | | | | IPv4 addresses. | 459 | | | | | | | 460 | | | |+++++++>| Reply with the IPv6 addresses. 461 | | | | | | | 462 | | | | |<> 463 | | | | | | | 464 | An IPv6 Socket API function call.|=======================>| 465 | | | | | | | 466 | | | | |<> | 468 | | | | | | | 469 | An IPv6 Socket API function call.|<=======================| 470 | | | | | | | 471 | | | | |<> 472 | | | | | | | 473 | | | |<+++++++| Request IPv4 addresses| 474 | | | | | corresponding to the | 475 | | | | | IPv6 addresses. | 476 | | | | | | | 477 | | | |+++++++>| Reply with the IPv4 addresses. 478 | | | | | | | 479 |<=======|<=========================| An IPv4 Socket function call. 480 | | | | | | | 482 Figure 6: Example of BIH as API addition 484 "dual stack" "host6" 485 IPv4 stub TCP/ ENR address translator IPv6 486 app res. IPv4 mapper 487 | | | | | | | | 488 <> | | 489 |-->| | | | | | | 490 | |----------->| Query of 'A' records for "host6". | Name 491 | | | | | | | | Server 492 | | | |------------------------------------------->| 493 | | | | Query of 'A' records and 'AAAA' for "host6" 494 | | | | | | | | | 495 | | | |<-------------------------------------------| 496 | | | | Reply only with 'AAAA' record. | 497 | | | | | | | | 498 | | | |<> | 499 | | | | | | | | 500 | | | |-------->| Request one IPv4 address | 501 | | | | | corresponding to each IPv6 address. 502 | | | | | | | | 503 | | | | |<> | 504 | | | | | | | | 505 | | | |<--------| Reply with the IPv4 address. 506 | | | | | | | | 507 | | | |<> 508 | | | | | | | | 509 | |<-----------| Reply with the 'A' record. | | 510 | | | | | | | | 511 |<--|<>| | | 514 | | | | | | | | 515 |=======>|========================>| An IPv4 packet. | 516 | | | | | | | | 517 | | | | |<------| Request IPv6 addresses 518 | | | | | | corresponding to the IPv4 519 | | | | | | addresses. | 520 | | | | | | | | 521 | | | | |------>| Reply with the IPv6| 522 | | | | | | addresses. | 523 | | | | | | | | 524 | | | | | |<> 525 | | | | | | | | 526 | | | |An IPv6 packet. |==========>|========>| 527 | | | | | | | | 528 | | | | | <> 529 | | | | | | | | 530 | | | |An IPv6 packet. |<==========|<========| 531 | | | | | | | | 532 | | | | | |<> 533 | | | | | | | | 534 |<=======|=========================| An IPv4 packet. | 535 | | | | | | | | 537 Figure 7: Example of BIH at the network layer 539 4. Considerations 541 4.1. Socket API Conversion 543 IPv4 socket API functions are translated into IPv6 socket API 544 functions that are semantically as identical as possible and vice 545 versa. See Appendix B for the API list intercepted by BIH. However, 546 IPv4 socket API functions are not fully compatible with IPv6 since 547 IPv4 supports features that are not present in IPv6, such as 548 SO_BROADCAST. 550 4.2. ICMP Message Handling 552 When an application needs ICMP messages values (e.g., Type, Code, 553 etc.) sent from the network layer, ICMPv4 message values MAY be 554 translated into ICMPv6 message values based on SIIT 555 [I-D.ietf-behave-v6v4-xlate], and vice versa. 557 4.3. IPv4 Address Pool and Mapping Table 559 The address pool consists of the private IPv4 addresses as per 560 [RFC1918]. This pool can be implemented at different granularities 561 in the node, e.g., a single pool per node, or at some finer 562 granularity such as per-user or per-process. In the case of a large 563 number of IPv4 applications communicating with a large number of IPv6 564 servers, the available address space may be exhausted if the 565 granularity is not fine enough. This should be a rare event and 566 chances will decrease as IPv6 support increases. The possible 567 problem can also mitigated with smart management techniques of the 568 address pool. For example, entries with the longest inactivity time 569 can be cleared and IPv4 addresses reused for creating new entries. 571 The RFC1918 address space was chosen because generally legacy 572 applications understand it as a private address space. A new 573 dedicated address space would run a risk of not being understood by 574 applications as private. 127/8 and 169.254/16 are rejected due to 575 possible assumptions applications may make when seeing those. 577 The RFC1918 addresses have a risk of conflicting with other 578 interfaces. The conflicts can be mitigated by using a least commonly 579 used portion of the RFC1918 address space. Addresses from 172.16/12 580 are thought to be less likely to conflict than addresses from 10/8 or 581 192.168/16 spaces, hence the RECOMMENDED IPv4 addresses are following 582 (Editor's comment: this is first proposal, educated better guesses 583 are welcome): 585 Source addresses: 172.21.112.0/30. Source addresses have to be 586 allocated because applications use getsockname() calls and in the BIS 587 mode an IP address of the IPv4 interface has to be shown (e.g., by 588 'ifconfig'). More than one address is allocated to allow 589 implementation flexibility, e.g., for cases where a host has multiple 590 IPv6 interfaces. The source addresses are from different subnets 591 than destination addresses to that ensure applications would not make 592 on-link assumptions and would instead enable NAT traversal functions. 594 Primary destination addresses: 172.21.80.0/20. The address mapper 595 will select destination addresses primarily out of this pool. 597 Secondary destination addresses: 10.170.160.0/20. The address mapper 598 will select destination addresses out of this pool if the node has a 599 dual-stack connection conflicting with primary destination addresses. 601 4.4. Multi-interface 603 In the case of dual-stack destinations BIH MUST NOT do protocol 604 translation from IPv4 to IPv6 when the host has any IPv4 interfaces, 605 native or tunneled, available for use. 607 It is possible that an IPv4 interface is activated during BIH 608 operation, for example if a node moves to a coverage area of an IPv4- 609 enabled network. In such an event, BIH MUST stop initiating protocol 610 translation sessions for new connections and BIH MAY disconnect 611 active sessions. The choice of disconnection is left for 612 implementations and it may depend on whether IPv4 address conflict 613 occurs between addresses used by BIH and addresses used by the new 614 IPv4 interface. 616 4.5. Multicast 618 Protocol translation for multicast is not supported. 620 4.6. DNS cache 622 When BIH shuts down, e.g., due to an IPv4 interface becoming 623 available, BIH MUST flush the node's DNS cache of possible locally 624 generated entries. This cache may be in the ENR itself, but also 625 possibly host's caching stub resolver. 627 5. Considerations due ALG requirements 629 No ALG functionality is specified herein as ALG design is generally 630 not encouraged for host-based translation and as BIH is intended for 631 applications that do not include IP addresses in protocol payloads. 633 6. Security Considerations 635 The security considerations of BIH mostly relies on that of 636 [I-D.ietf-behave-v6v4-xlate-stateful]. 638 In the socket-layer implementation approach, the differences are due 639 to the address translation occurring at the API and not in the 640 network layer. That is, since the mechanism uses the API translator 641 at the socket API layer, hosts can utilize the security of the 642 network layer (e.g., IPsec) when they communicate with IPv6 hosts 643 using IPv4 applications via the mechanism. As such, there is no need 644 for DNS ALG as in NAT-PT, so there is no interference with DNSSEC 645 either. 647 In the network-layer implementation approach, IPv4-using IKE will not 648 work. This means IPv4-based IPsec/IKE using VPN solutions cannot 649 work through BIH. However, transport and application layer solutions 650 such as TLS or SSL-VPN do work through BIH. 652 The use of address pooling may open a denial-of-service attack 653 vulnerability. So BIH should employ the same sort of protection 654 techniques as NAT64 [I-D.ietf-behave-v6v4-xlate-stateful] does. 656 7. Changes since RFC2767 and RFC3338 658 This document combines and obsoletes both [RFC2767] and [RFC3338]. 660 The changes in this document mainly reflect the following components: 662 1. Supporting IPv6-only network connections 664 2. The IPv4 address pool uses private address instead of reserved 665 IPv4 addresses (0.0.0.1 - 0.0.0.255) 667 3. Extending ENR and address mapper to operate differently 669 4. Adding an alternative way to implement the ENR 671 5. Standards track instead of experimental/informational 673 6. Supporting reverse (PTR) queries 675 8. Acknowledgments 677 The author thanks the discussion from Gang Chen, Dapeng Liu, Bo Zhou, 678 Hong Liu, Tao Sun, Zhen Cao, Feng Cao et al. in the development of 679 this document. 681 The efforts of Suresh Krishnan, Mohamed Boucadair, Yiu L. Lee, James 682 Woodyatt, Lorenzo Colitti, Qibo Niu, Pierrick Seite, Dean Cheng, 683 Christian Vogt, Jan M. Melen, Ed Jankiewizh, Marnix Goossens, Ala 684 Hamarsheh, Dan Wing, Magnus Westerlun and Julien Laganier in 685 reviewing this document are gratefully acknowledged. 687 Special acknowledgements go to Dave Thaler for his extensive review 688 and support. 690 The authors of RFC2767 acknowledged WIDE Project, Kazuhiko YAMAMOTO, 691 Jun MURAI, Munechika SUMIKAWA, Ken WATANABE, and Takahisa MIYAMOTO. 692 The authors of RFC3338 acknowledged implementation contributions by 693 Wanjik Lee (wjlee@arang.miryang.ac.kr) and i2soft Corporation 694 (www.i2soft.net). 696 The authors of Bump-in-the-Wire (BIW) (draft-ietf-biw-00.txt, October 697 2006), P. Moster, L. Chin, and D. Green, are acknowledged. Some 698 ideas and clarifications from BIW have been adapted to this document. 700 9. References 702 9.1. Normative References 704 [I-D.ietf-behave-dns64] 705 Bagnulo, M., Sullivan, A., Matthews, P., and I. Beijnum, 706 "DNS64: DNS extensions for Network Address Translation 707 from IPv6 Clients to IPv4 Servers", 708 draft-ietf-behave-dns64-11 (work in progress), 709 October 2010. 711 [I-D.ietf-behave-v6v4-xlate] 712 Li, X., Bao, C., and F. Baker, "IP/ICMP Translation 713 Algorithm", draft-ietf-behave-v6v4-xlate-23 (work in 714 progress), September 2010. 716 [I-D.ietf-behave-v6v4-xlate-stateful] 717 Bagnulo, M., Matthews, P., and I. Beijnum, "Stateful 718 NAT64: Network Address and Protocol Translation from IPv6 719 Clients to IPv4 Servers", 720 draft-ietf-behave-v6v4-xlate-stateful-12 (work in 721 progress), July 2010. 723 [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and 724 E. Lear, "Address Allocation for Private Internets", 725 BCP 5, RFC 1918, February 1996. 727 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 728 Requirement Levels", BCP 14, RFC 2119, March 1997. 730 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 731 (IPv6) Specification", RFC 2460, December 1998. 733 [RFC2767] Tsuchiya, K., HIGUCHI, H., and Y. Atarashi, "Dual Stack 734 Hosts using the "Bump-In-the-Stack" Technique (BIS)", 735 RFC 2767, February 2000. 737 [RFC2893] Gilligan, R. and E. Nordmark, "Transition Mechanisms for 738 IPv6 Hosts and Routers", RFC 2893, August 2000. 740 [RFC3338] Lee, S., Shin, M-K., Kim, Y-J., Nordmark, E., and A. 741 Durand, "Dual Stack Hosts Using "Bump-in-the-API" (BIA)", 742 RFC 3338, October 2002. 744 9.2. Informative References 746 [RFC3493] Gilligan, R., Thomson, S., Bound, J., McCann, J., and W. 747 Stevens, "Basic Socket Interface Extensions for IPv6", 748 RFC 3493, February 2003. 750 Appendix A. Implementation option for the ENR 752 It is not necessary to implement the ENR at the kernel level, but it 753 can be implemented instead at the user space by setting the host's 754 default DNS server to point to 127.0.0.1. DNS queries would then 755 always be sent to the ENR, which furthermore ensures that both A and 756 AAAA queries are sent to the actual DNS server and A queries are 757 always answered and required mappings created. 759 Appendix B. API list intercepted by BIH 761 The following functions are the API list which SHOULD be intercepted 762 by BIH module when implemented at socket layer. Please note that 763 this list may not be fully exhaustive. 765 The functions that the application uses to pass addresses into the 766 system are: 768 bind() 770 connect() 772 sendmsg() 774 sendto() 776 gethostbyaddr() 778 getnameinfo() 780 The functions that return an address from the system to an 781 application are: 783 accept() 785 recvfrom() 787 recvmsg() 789 getpeername() 791 getsockname() 793 gethostbyname() 795 getaddrinfo() 797 The functions that are related to socket options are: 799 getsocketopt() 801 setsocketopt() 803 As well, raw sockets for IPv4 and IPv6 MAY be intercepted. 805 Most of the socket functions require a pointer to the socket address 806 structure as an argument. Each IPv4 argument is mapped into 807 corresponding an IPv6 argument, and vice versa. 809 According to [RFC3493], the following new IPv6 basic APIs and 810 structures are required. 812 IPv4 new IPv6 813 ------------------------------------------------ 814 AF_INET AF_INET6 815 sockaddr_in sockaddr_in6 816 gethostbyname() getaddrinfo() 817 gethostbyaddr() getnameinfo() 818 inet_ntoa()/inet_addr() inet_pton()/inet_ntop() 819 INADDR_ANY in6addr_any 821 Figure 8 823 BIH MAY intercept inet_ntoa() and inet_addr() and use the address 824 mapper for those. Doing that enables BIH to support literal IP 825 addresses. 827 The gethostbyname() and getaddrinfo() calls return a list of 828 addresses. When the name resolver function invokes getaddrinfo() and 829 getaddrinfo() returns multiple IP addresses, whether IPv4 or IPv6, 830 they SHOULD all be represented in the addresses returned by 831 gethostbyname(). Thus if getaddrinfo() returns multiple IPv6 832 addresses, this implies that multiple address mappings will be 833 created; one for each IPv6 address. 835 Authors' Addresses 837 Bill Huang 838 China Mobile 839 53A,Xibianmennei Ave., 840 Xuanwu District, 841 Beijing 100053 842 China 844 Email: bill.huang@chinamobile.com 846 Hui Deng 847 China Mobile 848 53A,Xibianmennei Ave., 849 Xuanwu District, 850 Beijing 100053 851 China 853 Email: denghui02@gmail.com 855 Teemu Savolainen 856 Nokia 857 Hermiankatu 12 D 858 FI-33720 TAMPERE 859 Finland 861 Email: teemu.savolainen@nokia.com