idnits 2.17.1 draft-ietf-sunset4-nat64-port-allocation-02.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 date (January 18, 2016) is 3020 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 6145 (Obsoleted by RFC 7915) -- Obsolete informational reference (is this intentional?): RFC 1323 (Obsoleted by RFC 7323) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group G. Chen 3 Internet-Draft China Mobile 4 Intended status: Informational W. Li 5 Expires: July 21, 2016 China Telecom 6 T. Tsou 7 J. Huang 8 Huawei Technologies 9 T. Taylor 10 PT Taylor Consulting 11 JF. Tremblay 12 Viagenie 13 January 18, 2016 15 Analysis of NAT64 Port Allocation Methods for Shared IPv4 Addresses 16 draft-ietf-sunset4-nat64-port-allocation-02 18 Abstract 20 This document enumerates methods of port assignment in Carrier Grade 21 NATs (CGNs), focused particularly on NAT64 environments. Different 22 NAT port allocation methods have been categorized and described. A 23 series of port allocation design principle has been proposed to 24 facilitate the implementations and deployment. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on July 21, 2016. 43 Copyright Notice 45 Copyright (c) 2016 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 2. Description of Port Allocation Methods . . . . . . . . . . . 3 62 2.1. Specific Feature of NAT64 Port Consumption . . . . . . . 3 63 2.2. Classification of Port Allocation Models . . . . . . . . 3 64 2.2.1. Stateful vs. Stateless . . . . . . . . . . . . . . . 3 65 2.2.2. Dynamic vs. Static . . . . . . . . . . . . . . . . . 4 66 2.2.3. Centralized vs. Distributed . . . . . . . . . . . . . 5 67 2.3. Port Allocation Solutions . . . . . . . . . . . . . . . . 6 68 2.3.1. Stateful Technologies . . . . . . . . . . . . . . . . 6 69 2.3.2. Stateless Technologies . . . . . . . . . . . . . . . 6 70 2.3.3. Port Control Protocol (PCP) . . . . . . . . . . . . . 7 71 3. Port Allocation Design Principles . . . . . . . . . . . . . . 7 72 3.1. Log Volume Optimization . . . . . . . . . . . . . . . . . 7 73 3.2. Connectivity State Optimization . . . . . . . . . . . . . 9 74 3.3. Port Randomization . . . . . . . . . . . . . . . . . . . 9 75 3.4. Port-range Implementation Recommendation . . . . . . . . 10 76 3.4.1. Port Randomization and Port-Range Deallocation . . . 10 77 3.4.2. Issues Of Traceability . . . . . . . . . . . . . . . 11 78 3.4.3. Other Considerations . . . . . . . . . . . . . . . . 12 79 4. Security Considerations . . . . . . . . . . . . . . . . . . . 12 80 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 81 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14 82 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 83 7.1. Normative References . . . . . . . . . . . . . . . . . . 14 84 7.2. Informative References . . . . . . . . . . . . . . . . . 15 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 87 1. Introduction 89 As a result of the depletion of public IPv4 addresses, Carrier Grade 90 NAT (CGN) has been adopted by ISPs to share the available IPv4 91 resources. Overall, a CGN function maps IP addresses from one 92 address realm to another, relying upon a mechanism of multiplexing 93 multiple subscribers' connections over a number of shared IPv4 94 addresses to provide connectivity services to end hosts. A network- 95 based NAT is implied by several approaches to IPv4 service continuity 96 over an IPv6 network including DS-Lite [RFC6333], NAT64 ([RFC6145] 97 and [RFC6146]), etc. 99 In this memo, Section 2 has described the category of port allocation 100 mechnism and relevant solutions. Section 3 looks more closely at 101 different port allocation design principles, including log volume 102 consideration, connectivity state optimization, Port-range 103 implementation and port randomization. The proposals made in this 104 section are applicable to the CGN environment in general, 105 independently of the particular flavor of translation being used. 107 2. Description of Port Allocation Methods 109 2.1. Specific Feature of NAT64 Port Consumption 111 There was a test comparison of port consumption [RFC7269] on NAT64 112 and NAT44. Top100 websites (referring to Alexa statistics) were 113 assessed to evaluate status of port usage on NAT44 and NAT64 114 respectively. It has been observed that the port consumption per 115 session on NAT64 is roughly only half that on NAT44. 43 percent of 116 top100 websites have AAAA records, therefore the NAT64 didn't have to 117 assign ports to the traffic going to those websites. The results may 118 be different if more services (e.g. game, web-mail, etc) are 119 considered. But it is apparent that the effects of port saving on 120 NAT64 will be amplified by increasing native IPv6 support. 122 Apart from the above observation, port allocation can be tuned 123 according to the phase of IPv6 migration. As more content providers 124 and services become available over IPv6, the utilization of NAT64 125 goes down since fewer destinations require translation progressing. 126 Thus as IPv6 migration proceeds, it will be possible to relax the 127 multiplexing ratio of IPv4 address sharing (see Appendix B of 128 [RFC6269]). 130 2.2. Classification of Port Allocation Models 132 This section lists several categories to allocate the port 133 information in NAT64. It also describes example cases for each 134 allocation model. 136 2.2.1. Stateful vs. Stateless 138 o Stateful 140 The stateful NAT can be implemented either by static address 141 translation or dynamic address translation. 143 In the case of static address assignment, a one-to-one address 144 mapping for hosts between a IPv6 network address and an IPv4 145 network address is pre-configured on the NAT operation. This case 146 normally occurs when a server is deployed in an IPv6 domain. The 147 static configuration ensures stable inbound connectivity. 149 Dynamic address assignment would periodically free the binding so 150 that the global address could be recycled for later use. This 151 increases the efficiency of usage of IPv4 resources. 153 o Stateless 155 Stateless NAT is performed in compliance with [RFC6145]. The 156 public IPv4 address is required to be embedded in the IPv6 157 address. Thus the NAT64 can directly extract the address and has 158 no need to record mapping states. 160 A promising usage of stateless NAT may appear in a data centre 161 environment where IPv6 server pools receive inbound connections from 162 IPv4 users externally [I-D.ietf-v6ops-siit-dc]. NAT usage in other 163 cases may be controversial. First off, the static one-to-one mapping 164 does not address the issue of IPv4 depletion. Secondly, it 165 introduces a dependency between IPv4 and IPv6 addressing. That 166 creates other limitations since a change of IPv4 address will cause 167 renumbering of IPv6 addresses. 169 2.2.2. Dynamic vs. Static 171 Port assignments can be dynamic (ports allocated on demand) or static 172 (ports allocated as part of the configuration process). 174 o Dynamic assignment 176 NAT64 uses dynamic assignment, since this achieves higher port 177 utilization. Port allocations can be made with per-session or 178 per-customer granularity. Per-session assignment is configured on 179 the NAT64 by default since it maximizes port utilization. 180 However, if only individual port numbers are assigned, this can 181 result in a heavy log volume that may have to be recorded for 182 legal data retention systems. To mitigate that concern, the NAT64 183 may dynamically allocate a port range for each connected 184 subscriber or upon receipt of a first outgoing packet from an IPv6 185 host. This will significantly reduce log volume. 187 A proper port-range configuration should take user experiences 188 into the considerations. A subscriber normally uses multiple 189 applications simultaneously, e.g. maps applications, online video 190 or game. The number of concurrent sessions is essential to 191 determine the number of ports the subscriber needs. A study from 192 China Mobile has revealed that the average number of sessions 193 consumed by one user's device was around 200 to 300 ports. 194 Several devices may appear behind a CPE. Based on this 195 observation, 1000 ports per subscriber household will provide 196 enough room for multiple active users. Administrators should 197 monitor usage to adjust this number if users are being limited by 198 this number, or if usage is so low that fewer ports would be 199 sufficient. 201 o Static assignment 203 Static assignment makes port reservations in bulk for each 204 internal address before subscriber connection. The assigned ports 205 can be in either a contiguous port range or a non-contiguous port 206 range for the sake of defense against port-guessing attacks (see 207 Section 3.4.1). Log recording for each port assignment may not be 208 necessary due to the stable mapping relations. Considerations of 209 the interaction between port-range allocation and capacity impact 210 are also applicable in the case of static assignment. [RFC7422] 211 describes a deterministic algorithm to assign a port range for an 212 internal IP address pool in a sequence. 214 2.2.3. Centralized vs. Distributed 216 There is an increasing need to connect NAT64 with downstream 217 NAT46-capable devices to support IPv4 users/applications on an 218 IPv6-only path. Several solutions have been proposed in this area, 219 e.g., 464xlat [RFC6877], MAP-T [RFC7599] and 4rd [RFC7600]. Port 220 allocation can be categorized as a centralized assignment on NAT64 or 221 as a port delegation distributed to downstream devices (e.g, Customer 222 Edge connected with NAT64). 224 o Centralized Assignment 226 A centralized method makes port assignments once IP flows come to 227 the NAT64. The allocation policy is enforced on a centralized 228 point. Either a dynamic or static port assignment is made for 229 received sessions. 231 o Distributed Assignment 233 NAT64 can also delegate the pre-allocated port range to customer 234 edge devices. That can be achieved through additional out-of-band 235 provisioning signals (e.g., [I-D.ietf-pcp-port-set], [RFC7598]). 236 The distributed model normally is performed A+P style [RFC6346] 237 for static port assignment. The NAT64 should also hold the 238 corresponding mapping in order to validate port usage in the 239 outgoing direction and route inbound packets. Delegated port 240 ranges shift NAT64 port computations/states into downstream 241 devices. The detailed benefits of this approach are documented in 242 [I-D.ietf-softwire-stateless-4v6-motivation]. 244 2.3. Port Allocation Solutions 246 2.3.1. Stateful Technologies 248 [RFC6146] describes a process where the dynamic binding is created by 249 an outgoing packet, but it may also be created by other means such as 250 a Port Control Protocol request (see Section 2.3.3). Looking beyond 251 NAT64 for the moment, DS-Lite [RFC6333] refers to the cautions in 252 [RFC6269] but does not specify any port allocation method. Both 253 techniques DS-Lite and NAT64 assume a centralized model. 255 The specifications for both transition methods thus allow 256 implementations to use the proposals made in individual port 257 allocation and port range allocation 259 2.3.2. Stateless Technologies 261 The port allocation solutions that are being specified at the time of 262 writing of this document are all variations on the static distributed 263 model, to minimize the amount of state that has to be held in the 264 network. That work includes: 266 o Light-weight 4over6 (LW4o6 [RFC7596]), which requires the CPE to 267 be configured explicitly with the shared IPv4 address and port set 268 it will use on the WAN side of its NAT44 function. The border 269 router is configured with the same information, reducing the state 270 it must hold from per-session to per-subscriber amounts. 272 o Mapping of Address and Port with Encapsulation (MAP-E [RFC7597]) 273 and the experimental specifications Mapping of Address and Port 274 with Translation (MAP-T [RFC7599]) and 4rd [RFC7600], already 275 mentioned. These rely on an algorithmic embedding of WAN-side 276 IPv4 address and assigned port set within the IPv6 prefix assigned 277 to each CPE. Both the CPE and the border router must be 278 configured with this information. However, the algorithm is 279 designed to aggregate routing information such that the amount of 280 state carried by the border router is of a lower order of 281 magnitude than even the per-subscriber level. 283 All A+P variants support a 1-1 mapping mode, where the IPv4 and IPv6 284 addresses assigned to a CPE are independent. This can be helpful in 285 transition, but, as with LW4o6, raises the amount of state in the 286 network back to the per-subscriber level. 288 For a packet destined to a host outside the MAP domain from which the 289 packet originated: MAP-E and 4rd treat the packet as an IPv4 over 290 IPv6 tunnel via the border router. 292 MAP-T uses stateless mapping in the sense of Section 2.2.1 by 293 embedding the destination IPv4 address within the IPv6 address of the 294 packet sent to the border router. 296 2.3.3. Port Control Protocol (PCP) 298 The Port Control Protocol (PCP, [RFC6887]) can be used to reserve a 299 single port or a port set [I-D.ietf-pcp-port-set] for applications. 300 It requires that the NAT be controlled by a PCP server function. PCP 301 provides an out-of-band signalling mechanism for coordinating dynamic 302 allocation of ports between hosts and the border router, removes the 303 need for ALGs, allows for successful incoming connections, etc. 305 3. Port Allocation Design Principles 307 3.1. Log Volume Optimization 309 [RFC6269] provides a thoughtful analysis on the issues of IP address 310 sharing. It points out that IP address sharing may impact law 311 enforcement since source address information will be lost during the 312 translation.In order to identify a specific user associated with an 313 IP address in a particular time slot, network administrators have to 314 log the mapping status for each connection in a dedicated logging 315 server. The storage of log information may pose a challenge to 316 operators, since it requires additional resources and data inspection 317 processes to identify users. For concrete details of what should be 318 logged, see Section 3.1 of [I-D.ietf-behave-syslog-nat-logging]. The 319 actual logging may use either IPFIX [RFC7011] or Syslog [RFC5424] 320 depending on the operator's requirements. 322 It is desirable to reduce the volume of the logged information. 323 Referring to the classification of port allocation methods given 324 above, dynamic assignments can be managed on either a per-session or 325 per-customer granularity. The coarser granularity will lead to lower 326 log volume storage. A test was made by recording the log information 327 from 200,000 subscribers in the Chinese network for 60 days. The 328 volume of recorded information reached up to 42.5 terabytes with per- 329 session logging in the raw format. The volume could be reduced to 330 10.6 terabytes with gzip format. Compared with that, it only 331 occupied 40.6 gigabytes, three orders of magnitude smaller volume, 332 with per-customer logging in the raw format (A port range sized by 333 1000 ports have been used). With static allocation, of course, no 334 logs for port assignment are required, but a record of the 335 configuration change is still required. 337 On the other hand, the lower logging volumes are associated with 338 lower efficiency of port utilization. A port allocation based on 339 per-customer granularity has to retain vacant ports in order to avoid 340 traffic overflow. The efficiency can be evaluated by port 341 utilization rate, and will be even lower if the static port 342 allocation method is used. Inactive users may also impact the 343 efficiency. 345 Table 1 summarizes the test results using Syslog. The ports were 346 pre-allocated to customers regardless of online or offline status. 348 +--------------------+--------------+----------------+--------------+ 349 | Port Allocation | Log | Estimated Log | Port | 350 | Method | Granularity | Volume | Utilization | 351 +--------------------+--------------+----------------+--------------+ 352 | Dynamic NAPT | Per-session | 42.5 terabytes | 100% | 353 | Dynamic port-range | Per-customer | 40.6 Gigabytes | 75% | 354 | Deterministic NAT, | None | None | (60% * 75%) | 355 | MAP-T, 4rd | | | = 45% | 356 +--------------------+--------------+----------------+--------------+ 358 Table 1: Estimated Log Volumes For 200,000 Users Over 60 Days 360 Note: 75% is the estimated port utilization ratio per active 361 subscriber. 60% is the estimated ratio of active subscribers to the 362 total number of subscribers. 364 The data shown in Table 1 roughly demonstrates the tradeoff between 365 port utilization and log volume reduction. Administrators may 366 consider the following factors to make their design choice that would 367 meet their deployment requirements: 369 o average connectivity per customer per day; 371 o peak connectivity per day; 373 o the number of public IPv4 addresses available to the NAT64; 375 o application demands for specific ports; 377 o processing capabilities of the NAT64; 379 o tolerable log volume. 381 3.2. Connectivity State Optimization 383 It has been observed that port consumption is significantly increased 384 once subscribers land on a web page for video on demand, an online 385 game, or map services. In those cases, multiple TCP connections may 386 be initiated to optimize the performance of data transmissions for 387 video download and message exchange. Given the video traffic growth 388 trend, this likely presents a challenge for network operators who 389 need to optimize connectivity states and avoid port depletion. Those 390 optimizations may even affect the method of port-range allocation, 391 because a subscriber is only allowed to use a pre-configured port 392 resource. 394 Two optimizations may be considered: 396 o Reducing the TIME-WAIT state. It is rather common that users 397 change video channels often. Investigations have shown that 60% 398 of videos are watched for less than 20% of their duration. The 399 user's access patterns may leave a number of the TIME-WAIT states. 400 Therefore, acceleration of TIME-WAIT state transitions could 401 increase the efficiency of port utilization. [RFC6191] defines a 402 mechanism for reducing TIME-WAIT state by proposing TCP timestamps 403 and sequence numbers. 405 [I-D.ietf-tsvwg-behave-requirements-update] recommended applying 406 [RFC6191] and PAWS (Protect Against Wrapped Sequence numbers, 407 described in [RFC1323]) to NAT. This may also be a way to improve 408 port utilization. 410 o Another possibility is to use Address-Dependent Mapping or Address 411 and Port-Dependent Mapping [RFC4787] to increase port utilization. 412 This feature has already been implemented on a vendor-specific 413 basis. However, it should be noted that REQ-7 and REQ-12 in 414 [RFC6888] may reduce the incentive to use anything but the 415 Address-Independent Mapping behaviour recommended by [RFC4787]. 417 3.3. Port Randomization 419 Port randomization is a feature to enhance the defense against 420 hijacking of flows. [RFC6056] specifies that: 422 "A NAPT that does not implement port preservation ([RFC4787], 423 [RFC5382]) should obfuscate selection of the ephemeral port of a 424 packet when it is changed during translation of that packet." 426 A NAPT based on per-session allocation normally follows this 427 recommendation. 429 See Section 4 for a fuller discussion of port randomization. 431 3.4. Port-range Implementation Recommendation 433 Allocating a range of N ports at once reduces the log volume by a 434 factor of N, while also reducing port utilization by a factor which 435 varies with the address sharing ratio and other configuration 436 parameters. This provides a clear motivation to use dynamic 437 allocation of port-ranges rather than individual ports when it is 438 possible to do so while maintaining a satisfactory level of port 439 utilization (and by implication, shared global IPv4 address 440 utilization). Dynamic allocation of port ranges may be used either 441 as the sole strategy for port allocation on the NAPT, or as a 442 supplement to an initial static allocation. This section will 443 provide specific consideration to the implementation. 445 3.4.1. Port Randomization and Port-Range Deallocation 447 When the user sends out the first packet, a port resource pool is 448 allocated for the user, e.g., assigning ports 2001~2300 of a public 449 IP address to the user's resource pool. Only one log should be 450 generated for this port block. When the NAT needs to set up a new 451 mapping entry for the user, it can use a port in the user's resource 452 pool and the corresponding public IP address. If the user needs more 453 port resources, the NAT can allocate another port block, e.g., ports 454 3501~3800, to the user's resource pool. Again, just one log needs to 455 be generated for this port block. 457 Cryptographically random port assignment is discussed in Section 2.2 458 of [RFC6431]. Indeed, [RFC6431] takes this idea further by 459 allocating non-contiguous sets of ports using a pseudorandom 460 function. Scattering the allocated ports in this way provides a 461 modest barrier to port guessing attacks. The use of randomization is 462 discussed further in Section 4. 464 Suppose now that a given internal address has been assigned more than 465 one block of ports. The individual sessions using ports within a 466 port block will start and end at different times. If no ports in 467 some port block are used for some configurable time, the NAT can 468 remove the port block from the resource pool allocated to a given 469 internal address, and make it available for other users. In theory, 470 it is unnecessary to log deallocations of blocks of ports, because 471 the ports in deallocated blocks will not be used again until the 472 blocks are reallocated. However, the deallocation may be logged when 473 it occurs to add robustness to troubleshooting or other procedures. 475 The deallocation procedure presents a number of difficulties in 476 practice. The first problem is the choice of timeout value for the 477 block. If idle timers are applied for the individual mappings 478 (sessions) within the block, and these conform to the recommendations 479 for NAT behaviour for the protocol concerned, then the additional 480 time that might be configured as a guard for the block as a whole 481 need not be more than a few minutes. The block timer in this case 482 serves only as a slightly more conservative extension of the 483 individual session idle timers. If, instead, a single idle timer is 484 used for the whole block, it must itself conform to the 485 recommendations for the protocol with which that block of ports is 486 associated. For example, REQ-5 of [RFC5382] requires an idle timer 487 expiry duration of at least 2 hours and 4 minutes for TCP. The 488 suggestions made in Section 3.2 may be considered for reducing this 489 time. 491 The next issue with port block deallocation is the conflict between 492 the desire to randomize port allocation and the desire to make unused 493 resources available to other internal addresses. As mentioned above, 494 ideally port selection will take place over the entire set of blocks 495 allocated to the internal address. However, taken to its fullest 496 extent, such a policy will minimize the probability that all ports in 497 any given block are idle long enough for it to be released. 499 As an alternative, it is suggested that when choosing which block to 500 select a port from, the NAT should omit from its range of choice the 501 block that has been idle the longest, unless no ports are available 502 in any of the other blocks. The expression "block that has been idle 503 the longest" designates the block in which the time since the last 504 packet was observed in any of its sessions, in either direction, is 505 earlier than the corresponding time in any of the other blocks 506 assigned to that internal address. As [RFC6269] points out, port 507 randomization is just one security measure of several, and the loss 508 of randomness incurred by the suggested procedure is justified by the 509 increased utilization of port resources it allows. 511 3.4.2. Issues Of Traceability 513 Section 12 of [RFC6269] provides a good discussion of the 514 traceability issue. Complete traceability given the NAT logging 515 practices proposed in this draft requires that the remote destination 516 record the source port of a request along with the source address 517 (and presumably protocol, if not implicit) [RFC6302]. In addition, 518 the logs at each end must be timestamped, and the clocks must be 519 synchronized within a certain degree of accuracy. Here is one reason 520 for the guard timing on block release, to increase the tolerable 521 level of clock skew between the two ends. 523 Where source port logging can be enabled, this memo strongly urges 524 the operators to do so. Similarly, intrusion detection systems 525 should capture source port as well as source address of suspect 526 packets. 528 In some cases [RFC6269], a server may not record the source port of a 529 connection. To allow traceability, the NAT device needs to record 530 the destination IP address of a connection. As [RFC6269] points out, 531 this will provide an incomplete solution to the issue of traceability 532 because multiple users of the same shared public IP address may 533 access the service at the same time. From the point of view of this 534 draft, in such situations the game is lost, so to speak, and port 535 allocation at the NAT might as well be completely dynamic. 537 The final possibility to consider is where the NAT does not do per- 538 session logging even given the possibility that the remote end is 539 failing to capture source ports. In that case, the port allocation 540 strategy proposed in this section can be used. The impact on 541 traceability is that analysis of the logs would yield only the list 542 of all internal addresses mapped to a given public address during the 543 period of time concerned. This has an impact on privacy as well as 544 traceability, depending on the follow-up actions taken. 546 3.4.3. Other Considerations 548 [RFC6269] notes several issues introduced by the use of dynamic as 549 opposed to static port assignment. For example, Section 12.2 of that 550 document notes the effect on authentication procedures. These issues 551 must be resolved, but are not specific to the dynamic port-range 552 allocation strategy. 554 4. Security Considerations 556 The discussion which follows addresses an issue that is particularly 557 relevant to the strategies described in Section 3 of this document. 558 The security considerations applicable to NAT operation for various 559 protocols as documented in, for example, [RFC4787] and [RFC5382] also 560 apply to this proposal. 562 [RFC6056] summarizes the TCP port-guessing attack, by means of which 563 an attacker can hijack one end of a TCP connection. One mitigating 564 measure is to make the source port number used for a TCP connection 565 less predictable. [RFC6056] provides various algorithms for this 566 purpose. 568 As Section 3.1 of that RFC notes: "...provided adequate algorithms 569 are in use, the larger the range from which ephemeral ports are 570 selected, the smaller the chances of an attacker are to guess the 571 selected port number." Conversely, the reduced range sizes proposed 572 by the present document increase the attacker's chances of guessing 573 correctly. This result cannot be totally avoided. However, 574 mitigating measures to improve this situation can be taken both at 575 port block assignment time and when selecting individual ports from 576 the blocks that have been allocated to a given user. 578 At assignment time, one possibility is to assign ports as non- 579 contiguous sets of values as proposed in [RFC6431]. However, this 580 approach creates a lot of complexity for operations, and the pseudo 581 randomization can create uncertainty when the accuracy of logs is 582 important to protect someone's life or liberty. 584 Alternatively, the NAT can assign blocks of contiguous ports. 585 However, at assignment time the NAT could attempt to randomize its 586 choice of which of the available idle blocks it would assign to a 587 given user. This strategy has to be traded off against the 588 desirability of minimizing the chance of conflict between what 589 [RFC6056] calls "transport protocol instances" by assigning the most- 590 idle block, as suggested in Section 3. A compromise policy might be 591 to assign blocks only if they have been idle for a certain amount of 592 time whenever possible, and select pseudorandomly between the blocks 593 available according to this criterion. In this case it is suggested 594 that the time value used be greater than the guard timing mentioned 595 in Section 3, and that no block should ever be reassigned until it 596 has been idle at least for the duration given by the guard timer. 598 Note that with the possible exception of cryptographically-based port 599 allocations, attackers could reverse-engineer algorithmically-derived 600 port allocations to either target a specific subscriber or to spoof 601 traffic to make it appear to have been generated by a specific 602 subscriber. However, this is exactly the same level of security that 603 the subscriber would experience in the absence of CGN. CGN is not 604 intended to provide additional security by obscurity. 606 While the block assignment strategy can provide some mitigation of 607 the port guessing attack, the largest contribution will come from 608 pseudo-randomization at port selection time. [RFC6056] provides a 609 number of algoriths for achieving this pseudo-randomization. When 610 the available ports are contained in blocks which are not in general 611 consecutive, the algorithms clearly need some adaptation. The task 612 is complicated by the fact that the number of blocks allocated to the 613 user may vary over time. Adaptation is left as an exercise for the 614 implementor. 616 5. IANA Considerations 618 This document makes no request of IANA. 620 6. Acknowledgements 622 This document is the result of a merger of the original draft-chen- 623 sunset4-cgn-port-allocation and draft-tsou-behave-natx4-log- 624 reduction. Version -02 of draft-chen contains the following 625 acknowledgements: 627 The author would like to thank Lee Howard and Simon Perreault for 628 their helpful comments. 630 Many thanks to Wesley George and Marc Blanchet encourage the 631 author to continue this work. 633 The authors of draft-tsou-behave-natx4-log-reduction have their own 634 thanks to give. Mohamed Boucadair reviewed the initial document and 635 provided useful comments to improve it. Reinaldo Penno, Joel 636 Jaeggli, and Dan Wing provided comments on the subsequent version 637 that resulted in major revisions. Serafim Petsis provided 638 encouragement to publication after a hiatus of two years. 640 The present version of the document benefited from further comments 641 by Lee Howard, Mohamed Boucadair and Alberto Leiva. 643 7. References 645 7.1. Normative References 647 [RFC6056] Larsen, M. and F. Gont, "Recommendations for Transport- 648 Protocol Port Randomization", BCP 156, RFC 6056, 649 DOI 10.17487/RFC6056, January 2011, 650 . 652 [RFC6145] Li, X., Bao, C., and F. Baker, "IP/ICMP Translation 653 Algorithm", RFC 6145, DOI 10.17487/RFC6145, April 2011, 654 . 656 [RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful 657 NAT64: Network Address and Protocol Translation from IPv6 658 Clients to IPv4 Servers", RFC 6146, DOI 10.17487/RFC6146, 659 April 2011, . 661 [RFC6269] Ford, M., Ed., Boucadair, M., Durand, A., Levis, P., and 662 P. Roberts, "Issues with IP Address Sharing", RFC 6269, 663 DOI 10.17487/RFC6269, June 2011, 664 . 666 7.2. Informative References 668 [I-D.ietf-behave-syslog-nat-logging] 669 Chen, Z., Zhou, C., Tsou, T., and T. Taylor, "Syslog 670 Format for NAT Logging (Work in Progress)", January 2014. 672 [I-D.ietf-pcp-port-set] 673 Sun, Q., Boucadair, M., Sivakumar, S., Zhou, C., Tsou, T., 674 and S. Perrault, "Port Control Protocol (PCP) Extension 675 for Port Set Allocation (Work in Progress)", October 2015. 677 [I-D.ietf-softwire-stateless-4v6-motivation] 678 Boucadair, M., Matsushima, S., Lee, Y., Bonness, O., 679 Borges, I., and G. Chen, "Motivations for Carrier-side 680 Stateless IPv4 over IPv6 Migration Solutions (Expired work 681 in Progress)", November 2012. 683 [I-D.ietf-tsvwg-behave-requirements-update] 684 Penno, R., Perrault, S., Boucadair, M., Kamiset, S., and 685 K. Naito, "Network Address Translation (NAT) Behavioral 686 Requirements Updates (Work in Progress)", November 2015. 688 [I-D.ietf-v6ops-siit-dc] 689 Anderson, T., "SIIT-DC: Stateless IP/ICMP Translation for 690 IPv6 Data Centre Environments (Work in progress)", October 691 2015. 693 [RFC1323] Jacobson, V., Braden, R., and D. Borman, "TCP Extensions 694 for High Performance", RFC 1323, DOI 10.17487/RFC1323, May 695 1992, . 697 [RFC4787] Audet, F., Ed. and C. Jennings, "Network Address 698 Translation (NAT) Behavioral Requirements for Unicast 699 UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January 700 2007, . 702 [RFC5382] Guha, S., Ed., Biswas, K., Ford, B., Sivakumar, S., and P. 703 Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, 704 RFC 5382, DOI 10.17487/RFC5382, October 2008, 705 . 707 [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, 708 DOI 10.17487/RFC5424, March 2009, 709 . 711 [RFC6191] Gont, F., "Reducing the TIME-WAIT State Using TCP 712 Timestamps", BCP 159, RFC 6191, DOI 10.17487/RFC6191, 713 April 2011, . 715 [RFC6302] Durand, A., Gashinsky, I., Lee, D., and S. Sheppard, 716 "Logging Recommendations for Internet-Facing Servers", 717 BCP 162, RFC 6302, DOI 10.17487/RFC6302, June 2011, 718 . 720 [RFC6333] Durand, A., Droms, R., Woodyatt, J., and Y. Lee, "Dual- 721 Stack Lite Broadband Deployments Following IPv4 722 Exhaustion", RFC 6333, DOI 10.17487/RFC6333, August 2011, 723 . 725 [RFC6346] Bush, R., Ed., "The Address plus Port (A+P) Approach to 726 the IPv4 Address Shortage", RFC 6346, 727 DOI 10.17487/RFC6346, August 2011, 728 . 730 [RFC6431] Boucadair, M., Levis, P., Bajko, G., Savolainen, T., and 731 T. Tsou, "Huawei Port Range Configuration Options for PPP 732 IP Control Protocol (IPCP)", RFC 6431, 733 DOI 10.17487/RFC6431, November 2011, 734 . 736 [RFC6877] Mawatari, M., Kawashima, M., and C. Byrne, "464XLAT: 737 Combination of Stateful and Stateless Translation", 738 RFC 6877, DOI 10.17487/RFC6877, April 2013, 739 . 741 [RFC6887] Wing, D., Ed., Cheshire, S., Boucadair, M., Penno, R., and 742 P. Selkirk, "Port Control Protocol (PCP)", RFC 6887, 743 DOI 10.17487/RFC6887, April 2013, 744 . 746 [RFC6888] Perreault, S., Ed., Yamagata, I., Miyakawa, S., Nakagawa, 747 A., and H. Ashida, "Common Requirements for Carrier-Grade 748 NATs (CGNs)", BCP 127, RFC 6888, DOI 10.17487/RFC6888, 749 April 2013, . 751 [RFC7011] Claise, B., Ed., Trammell, B., Ed., and P. Aitken, 752 "Specification of the IP Flow Information Export (IPFIX) 753 Protocol for the Exchange of Flow Information", STD 77, 754 RFC 7011, DOI 10.17487/RFC7011, September 2013, 755 . 757 [RFC7269] Chen, G., Cao, Z., Xie, C., and D. Binet, "NAT64 758 Deployment Options and Experience", RFC 7269, 759 DOI 10.17487/RFC7269, June 2014, 760 . 762 [RFC7422] Donley, C., Grundemann, C., Sarawat, V., Sundaresan, K., 763 and O. Vautrin, "Deterministic Address Mapping to Reduce 764 Logging in Carrier-Grade NAT Deployments", RFC 7422, 765 DOI 10.17487/RFC7422, December 2014, 766 . 768 [RFC7596] Cui, Y., Sun, Q., Boucadair, M., Tsou, T., Lee, Y., and I. 769 Farrer, "Lightweight 4over6: An Extension to the Dual- 770 Stack Lite Architecture", RFC 7596, DOI 10.17487/RFC7596, 771 July 2015, . 773 [RFC7597] Troan, O., Ed., Dec, W., Li, X., Bao, C., Matsushima, S., 774 Murakami, T., and T. Taylor, Ed., "Mapping of Address and 775 Port with Encapsulation (MAP-E)", RFC 7597, 776 DOI 10.17487/RFC7597, July 2015, 777 . 779 [RFC7598] Mrugalski, T., Troan, O., Farrer, I., Perreault, S., Dec, 780 W., Bao, C., Yeh, L., and X. Deng, "DHCPv6 Options for 781 Configuration of Softwire Address and Port-Mapped 782 Clients", RFC 7598, DOI 10.17487/RFC7598, July 2015, 783 . 785 [RFC7599] Li, X., Bao, C., Dec, W., Ed., Troan, O., Matsushima, S., 786 and T. Murakami, "Mapping of Address and Port using 787 Translation (MAP-T)", RFC 7599, DOI 10.17487/RFC7599, July 788 2015, . 790 [RFC7600] Despres, R., Jiang, S., Ed., Penno, R., Lee, Y., Chen, G., 791 and M. Chen, "IPv4 Residual Deployment via IPv6 - A 792 Stateless Solution (4rd)", RFC 7600, DOI 10.17487/RFC7600, 793 July 2015, . 795 Authors' Addresses 797 Gang Chen 798 China Mobile 799 29, Jinrong Avenue 800 Xicheng District, 801 Beijing 100033 802 China 804 Email: phdgang@gmail.com, chengang@chinamobile.com 805 Weibo Li 806 China Telecom 807 109, Zhongshan Ave. West, Tianhe District 808 Guangzhou 510630 809 P.R. China 811 Email: mweiboli@gmail.com 813 Tina Tsou 814 Huawei Technologies 815 Bantian, Longgang District 816 Shenzhen 518129 817 P.R. China 819 Email: tina.tsou.zouting@huawei.com 821 James Huang 822 Huawei Technologies 823 Bantian, Longgang District 824 Shenzhen 518129 825 P.R. China 827 Email: James.huang@huawei.com 829 Tom Taylor 830 PT Taylor Consulting 831 Ottawa, Ontario 832 Canada 834 Email: tom.taylor.stds@gmail.com 836 Jean-Francois Tremblay 837 Viagenie 838 246 Aberdeen 839 Quebec, QC G1R 2E1 840 Canada 842 Phone: +1 418 656 9254 843 Email: jean-francois.tremblay@viagenie.ca 844 URI: http://viagenie.ca