idnits 2.17.1 draft-ietf-opsawg-large-flow-load-balancing-15.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 (October 7, 2014) is 3489 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-08) exists of draft-sridharan-virtualization-nvgre-06 -- Obsolete informational reference (is this intentional?): RFC 7223 (Obsoleted by RFC 8343) == Outdated reference: A later version (-08) exists of draft-davie-stt-06 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 OPSAWG R. Krishnan 2 Internet Draft Brocade Communications 3 Intended status: Informational L. Yong 4 Expires: April 6, 2015 Huawei USA 5 A. Ghanwani 6 Dell 7 Ning So 8 Tata Communications 9 B. Khasnabish 10 ZTE Corporation 11 October 7, 2014 13 Mechanisms for Optimizing LAG/ECMP Component Link Utilization in 14 Networks 16 draft-ietf-opsawg-large-flow-load-balancing-15.txt 18 Status of this Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. This document may not be modified, 22 and derivative works of it may not be created, except to publish it 23 as an RFC and to translate it into languages other than English. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that 27 other groups may also distribute working documents as Internet- 28 Drafts. 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 The list of current Internet-Drafts can be accessed at 36 http://www.ietf.org/ietf/1id-abstracts.txt 38 The list of Internet-Draft Shadow Directories can be accessed at 39 http://www.ietf.org/shadow.html 41 This Internet-Draft will expire on April 67, 2014. 43 Copyright Notice 45 Copyright (c) 2014 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 Abstract 60 Demands on networking infrastructure are growing exponentially due to 61 bandwidth hungry applications such as rich media applications and 62 inter-data center communications. In this context, it is important to 63 optimally use the bandwidth in wired networks that extensively use 64 link aggregation groups and equal cost multi-paths as techniques for 65 bandwidth scaling. This draft explores some of the mechanisms useful 66 for achieving this. 68 Table of Contents 70 1. Introduction...................................................3 71 1.1. Acronyms..................................................4 72 1.2. Terminology...............................................4 73 2. Flow Categorization............................................5 74 3. Hash-based Load Distribution in LAG/ECMP.......................6 75 4. Mechanisms for Optimizing LAG/ECMP Component Link Utilization..7 76 4.1. Differences in LAG vs ECMP................................8 77 4.2. Operational Overview......................................9 78 4.3. Large Flow Recognition...................................10 79 4.3.1. Flow Identification.................................10 80 4.3.2. Criteria and Techniques for Large Flow Recognition..11 81 4.3.3. Sampling Techniques.................................11 82 4.3.4. Inline Data Path Measurement........................13 83 4.3.5. Use of Multiple Methods for Large Flow Recognition..14 84 4.4. Load Rebalancing Options.................................14 85 4.4.1. Alternative Placement of Large Flows................14 86 4.4.2. Redistributing Small Flows..........................15 87 4.4.3. Component Link Protection Considerations............15 88 4.4.4. Load Rebalancing Algorithms.........................15 89 4.4.5. Load Rebalancing Example............................16 90 5. Information Model for Flow Rebalancing........................17 91 5.1. Configuration Parameters for Flow Rebalancing............17 92 5.2. System Configuration and Identification Parameters.......18 93 5.3. Information for Alternative Placement of Large Flows.....19 94 5.4. Information for Redistribution of Small Flows............19 95 5.5. Export of Flow Information...............................20 96 5.6. Monitoring information...................................20 97 5.6.1. Interface (link) utilization........................20 98 5.6.2. Other monitoring information........................21 99 6. Operational Considerations....................................21 100 6.1. Rebalancing Frequency....................................21 101 6.2. Handling Route Changes...................................21 102 6.3. Forwarding Resources.....................................22 103 7. IANA Considerations...........................................22 104 8. Security Considerations.......................................22 105 9. Contributing Authors..........................................22 106 10. Acknowledgements.............................................23 107 11. References...................................................23 108 11.1. Normative References....................................23 109 11.2. Informative References..................................23 111 1. Introduction 113 Networks extensively use link aggregation groups (LAG) [802.1AX] and 114 equal cost multi-paths (ECMP) [RFC 2991] as techniques for capacity 115 scaling. For the problems addressed by this document, network traffic 116 can be predominantly categorized into two traffic types: long-lived 117 large flows and other flows. These other flows, which include long- 118 lived small flows, short-lived small flows, and short-lived large 119 flows, are referred to as "small flows" in this document. Long-lived 120 large flows are simply referred to as "large flows." 122 Stateless hash-based techniques [ITCOM, RFC 2991, RFC 2992, RFC 6790] 123 are often used to distribute both large flows and small flows over 124 the component links in a LAG/ECMP. However the traffic may not be 125 evenly distributed over the component links due to the traffic 126 pattern. 128 This draft describes mechanisms for optimizing LAG/ECMP component 129 link utilization while using hash-based techniques. The mechanisms 130 comprise the following steps -- recognizing large flows in a router; 131 and assigning the large flows to specific LAG/ECMP component links or 132 redistributing the small flows when a component link on the router is 133 congested. 135 It is useful to keep in mind that in typical use cases for this 136 mechanism the large flows are those that consume a significant amount 137 of bandwidth on a link, e.g. greater than 5% of link bandwidth. The 138 number of such flows would necessarily be fairly small, e.g. on the 139 order of 10's or 100's per LAG/ECMP. In other words, the number of 140 large flows is NOT expected to be on the order of millions of flows. 141 Examples of such large flows would be IPsec tunnels in service 142 provider backbone networks or storage backup traffic in data center 143 networks. 145 1.1. Acronyms 147 DOS: Denial of Service 149 ECMP: Equal Cost Multi-path 151 GRE: Generic Routing Encapsulation 153 LAG: Link Aggregation Group 155 MPLS: Multiprotocol Label Switching 157 NVGRE: Network Virtualization using Generic Routing Encapsulation 159 PBR: Policy Based Routing 161 QoS: Quality of Service 163 STT: Stateless Transport Tunneling 165 TCAM: Ternary Content Addressable Memory 167 VXLAN: Virtual Extensible LAN 169 1.2. Terminology 171 Central management entity: Refers to an entity that is capable of 172 monitoring information about link utilization and flows in routers 173 across the network and may be capable of making traffic engineering 174 decisions for placement of large flows. It may include the functions 175 of a collector [RFC 7011]. 177 ECMP component link: An individual nexthop within an ECMP group. An 178 ECMP component link may itself comprise a LAG. 180 ECMP table: A table that is used as the nexthop of an ECMP route that 181 comprises the set of ECMP component links and the weights associated 182 with each of those ECMP component links. The input for looking up 183 the table is the hash value for the packet, and the weights are used 184 to determine which values of the hash function map to a given ECMP 185 component link. 187 LAG component link: An individual link within a LAG. A LAG component 188 link is typically a physical link. 190 LAG table: A table that is used as the output port which is a LAG 191 that comprises the set of LAG component links and the weights 192 associated with each of those component links. The input for looking 193 up the table is the hash value for the packet, and the weights are 194 used to determine which values of the hash function map to a given 195 LAG component link. 197 Large flow(s): Refers to long-lived large flow(s). 199 Small flow(s): Refers to any of, or a combination of, long-lived 200 small flow(s), short-lived small flows, and short-lived large 201 flow(s). 203 2. Flow Categorization 205 In general, based on the size and duration, a flow can be categorized 206 into any one of the following four types, as shown in Figure 1: 208 (a) Short-lived Large Flow (SLLF), 209 (b) Short-lived Small Flow (SLSF), 210 (c) Long-lived Large Flow (LLLF), and 211 (d) Long-lived Small Flow (LLSF). 213 Flow Bandwidth 214 ^ 215 |--------------------|--------------------| 216 | | | 217 Large | SLLF | LLLF | 218 Flow | | | 219 |--------------------|--------------------| 220 | | | 221 Small | SLSF | LLSF | 222 Flow | | | 223 +--------------------+--------------------+-->Flow Duration 224 Short-lived Long-lived 225 Flow Flow 227 Figure 1: Flow Categorization 229 In this document, as mentioned earlier, we categorize long-lived 230 large flows as "large flows", and all of the others -- long-lived 231 small flows, short-lived small flows, and short-lived large flows 232 as "small flows". 234 3. Hash-based Load Distribution in LAG/ECMP 236 Hash-based techniques are often used for traffic load balancing to 237 select among multiple available paths within a LAG/ECMP group. The 238 advantages of hash-based techniques for load distribution are the 239 preservation of the packet sequence in a flow and the real-time 240 distribution without maintaining per-flow state in the router. Hash- 241 based techniques use a combination of fields in the packet's headers 242 to identify a flow, and the hash function computed using these fields 243 is used to generate a unique number that identifies a link/path in a 244 LAG/ECMP group. The result of the hashing procedure is a many-to-one 245 mapping of flows to component links. 247 If the traffic mix constitutes flows such that the result of the hash 248 function across these flows is fairly uniform so that a similar 249 number of flows is mapped to each component link, if the individual 250 flow rates are much smaller as compared to the link capacity, and if 251 the rate differences are not dramatic, hash-based techniques produce 252 good results with respect to utilization of the individual component 253 links. However, if one or more of these conditions are not met, hash- 254 based techniques may result in imbalance in the loads on individual 255 component links. 257 One example is illustrated in Figure 2. In Figure 2, there are two 258 routers, R1 and R2, and there is a LAG between them which has 3 259 component links (1), (2), (3). There are a total of 10 flows that 260 need to be distributed across the links in this LAG. The result of 261 applying the hash-based technique is as follows: 263 . Component link (1) has 3 flows -- 2 small flows and 1 large 264 flow -- and the link utilization is normal. 266 . Component link (2) has 3 flows -- 3 small flows and no large 267 flow -- and the link utilization is light. 269 o The absence of any large flow causes the component link 270 under-utilized. 272 . Component link (3) has 4 flows -- 2 small flows and 2 large 273 flows -- and the link capacity is exceeded resulting in 274 congestion. 276 o The presence of 2 large flows causes congestion on this 277 component link. 279 +-----------+ -> +-----------+ 280 | | -> | | 281 | | ===> | | 282 | (1)|--------|(1) | 283 | | -> | | 284 | | -> | | 285 | (R1) | -> | (R2) | 286 | (2)|--------|(2) | 287 | | -> | | 288 | | -> | | 289 | | ===> | | 290 | | ===> | | 291 | (3)|--------|(3) | 292 | | | | 293 +-----------+ +-----------+ 295 Where: -> small flow 296 ===> large flow 298 Figure 2: Unevenly Utilized Component Links 300 This document presents mechanisms for addressing the imbalance in 301 load distribution resulting from commonly used hash-based techniques 302 for LAG/ECMP that were shown in the above example. The mechanisms use 303 large flow awareness to compensate for the imbalance in load 304 distribution. 306 4. Mechanisms for Optimizing LAG/ECMP Component Link Utilization 308 The suggested mechanisms in this draft are about a local optimization 309 solution; they are local in the sense that both the identification of 310 large flows and re-balancing of the load can be accomplished 311 completely within individual nodes in the network without the need 312 for interaction with other nodes. 314 This approach may not yield a global optimization of the placement of 315 large flows across multiple nodes in a network, which may be 316 desirable in some networks. On the other hand, a local approach may 317 be adequate for some environments for the following reasons: 319 1) Different links within a network experience different levels of 320 utilization and, thus, a "targeted" solution is needed for those hot- 321 spots in the network. An example is the utilization of a LAG between 322 two routers that needs to be optimized. 324 2) Some networks may lack end-to-end visibility, e.g. when a 325 certain network, under the control of a given operator, is a transit 326 network for traffic from other networks that are not under the 327 control of the same operator. 329 4.1. Differences in LAG vs ECMP 331 While the mechanisms explained herein are applicable to both LAGs and 332 ECMP groups, it is useful to note that there are some key differences 333 between the two that may impact how effective the mechanism is. This 334 relates, in part, to the localized information with which the scheme 335 is intended to operate. 337 A LAG is usually established across links that are between 2 adjacent 338 routers. As a result, the scope of problem of optimizing the 339 bandwidth utilization on the component links is fairly narrow. It 340 simply involves re-balancing the load across the component links 341 between these two routers, and there is no impact whatsoever to other 342 parts of the network. The scheme works equally well for unicast and 343 multicast flows. 345 On the other hand, with ECMP, redistributing the load across 346 component links that are part of the ECMP group may impact traffic 347 patterns at all of the nodes that are downstream of the given router 348 between itself and the destination. The local optimization may 349 result in congestion at a downstream node. (In its simplest form, an 350 ECMP group may be used to distribute traffic on component links that 351 are between two adjacent routers, and in that case, the ECMP group is 352 no different than a LAG for the purpose of this discussion. It 353 should be noted that an ECMP component link may itself comprise a 354 LAG, in which case the scheme may be further applied to the component 355 links within the LAG.) 357 +-----+ +-----+ 358 | S1 | | S2 | 359 +-----+ +-----+ 360 / \ \ / /\ 361 / +---------+ / \ 362 / / \ \ / \ 363 / / \ +------+ \ 364 / / \ / \ \ 365 +-----+ +-----+ +-----+ 366 | L1 | | L2 | | L3 | 367 +-----+ +-----+ +-----+ 369 Figure 3: Two-level Clos Network 371 To demonstrate the limitations of local optimization, consider a two- 372 level Clos network topology as shown in Figure 3 with three leaf 373 nodes (L1, L2, L3) and two spine nodes (S1, S2). Assume all of the 374 links are 10 Gbps. 376 Let L1 have two flows of 4 Gbps each towards L3, and let L2 have one 377 flow of 7 Gbps also towards L3. If L1 balances the load optimally 378 between S1 and S2, and L2 sends the flow via S1, then the downlink 379 from S1 to L3 would get congested resulting in packet discards. On 380 the other hand, if L1 had sent both its flows towards S1 and L2 had 381 sent its flow towards S2, there would have been no congestion at 382 either S1 or S2. 384 The other issue with applying this scheme to ECMP groups is that it 385 may not apply equally to unicast and multicast traffic because of the 386 way multicast trees are constructed. 388 Finally, it is possible for a single physical link to participate as 389 a component link in multiple ECMP groups, whereas with LAGs, a link 390 can participate as a component link of only one LAG. 392 4.2. Operational Overview 394 The various steps in optimizing LAG/ECMP component link utilization 395 in networks are detailed below: 397 Step 1) This involves large flow recognition in routers and 398 maintaining the mapping of the large flow to the component link that 399 it uses. The recognition of large flows is explained in Section 4.3. 401 Step 2) The egress component links are periodically scanned for link 402 utilization and the imbalance for the LAG/ECMP group is monitored. If 403 the imbalance exceeds a certain imbalance threshold, then re- 404 balancing is triggered. Measurement of the imbalance is discussed 405 further in 5.1. Additional criteria may also be used to determine 406 whether or not to trigger rebalancing, such as the maximum 407 utilization of any of the component links, in addition to the 408 imbalance. The use of sampling techniques for the measurement of 409 egress component link utilization, including the issues of depending 410 on ingress sampling for these measurements, are discussed in Section 411 4.3.3. 413 Step 3) As a part of rebalancing, the operator can choose to 414 rebalance the large flows on to lightly loaded component links of the 415 LAG/ECMP group, redistribute the small flows on the congested link to 416 other component links of the group, or a combination of both. 418 All of the steps identified above can be done locally within the 419 router itself or could involve the use of a central management 420 entity. 422 Providing large flow information to a central management entity 423 provides the capability to globally optimize flow distribution as 424 described in Section 4.1. Consider the following example. A router 425 may have 3 ECMP nexthops that lead down paths P1, P2, and P3. A 426 couple of hops downstream on path P1 there may be a congested link, 427 while paths P2 and P3 may be under-utilized. This is something that 428 the local router does not have visibility into. With the help of a 429 central management entity, the operator could redistribute some of 430 the flows from P1 to P2 and/or P3 resulting in a more optimized flow 431 of traffic. 433 The mechanisms described above are especially useful when bundling 434 links of different bandwidths for e.g. 10 Gbps and 100 Gbps as 435 described in [ID.ietf-rtgwg-cl-requirement]. 437 4.3. Large Flow Recognition 439 4.3.1. Flow Identification 441 A flow (large flow or small flow) can be defined as a sequence of 442 packets for which ordered delivery should be maintained. Flows are 443 typically identified using one or more fields from the packet header, 444 for example: 446 . Layer 2: Source MAC address, destination MAC address, VLAN ID. 448 . IP header: IP Protocol, IP source address, IP destination 449 address, flow label (IPv6 only) 451 . Transport protocol header: Source port number, destination port 452 number. These apply to protocols such as TCP, UDP, SCTP. 454 . MPLS Labels. 456 For tunneling protocols like Generic Routing Encapsulation (GRE) 457 [RFC 2784], Virtual eXtensible Local Area Network (VXLAN) [RFC 7348], 458 Network Virtualization using Generic Routing Encapsulation (NVGRE) 459 [NVGRE], Stateless Transport Tunneling (STT) [STT], Layer 2 Tunneling 460 Protocol (L2TP) [RFC 3931], etc., flow identification is possible 461 based on inner and/or outer headers as well as fields introduced by 462 the tunnel header, as any or all such fields may be used for load 463 balancing decisions [RFC 5640]. The above list is not exhaustive. 465 The mechanisms described in this document are agnostic to the fields 466 that are used for flow identification. 468 This method of flow identification is consistent with that of IPFIX 469 [RFC 7011]. 471 4.3.2. Criteria and Techniques for Large Flow Recognition 473 From a bandwidth and time duration perspective, in order to recognize 474 large flows we define an observation interval and observe the 475 bandwidth of the flow over that interval. A flow that exceeds a 476 certain minimum bandwidth threshold over that observation interval 477 would be considered a large flow. 479 The two parameters -- the observation interval, and the minimum 480 bandwidth threshold over that observation interval -- should be 481 programmable to facilitate handling of different use cases and 482 traffic characteristics. For example, a flow which is at or above 10% 483 of link bandwidth for a time period of at least 1 second could be 484 declared a large flow [DevoFlow]. 486 In order to avoid excessive churn in the rebalancing, once a flow has 487 been recognized as a large flow, it should continue to be recognized 488 as a large flow for as long as the traffic received during an 489 observation interval exceeds some fraction of the bandwidth 490 threshold, for example 80% of the bandwidth threshold. 492 Various techniques to recognize a large flow are described below. 494 4.3.3. Sampling Techniques 496 A number of routers support sampling techniques such as sFlow [sFlow- 497 v5, sFlow-LAG], PSAMP [RFC 5475] and NetFlow Sampling [RFC 3954]. 498 For the purpose of large flow recognition, sampling needs to be 499 enabled on all of the egress ports in the router where such 500 measurements are desired. 502 Using sFlow as an example, processing in a sFlow collector will 503 provide an approximate indication of the large flows mapping to each 504 of the component links in each LAG/ECMP group. It is possible to 505 implement this part of the collector function in the control plane of 506 the router reducing dependence on an external management station, 507 assuming sufficient control plane resources are available. 509 If egress sampling is not available, ingress sampling can suffice 510 since the central management entity used by the sampling technique 511 typically has multi-node visibility and can use the samples from an 512 immediately downstream node to make measurements for egress traffic 513 at the local node. 515 The option of using ingress sampling for this purpose may not be 516 available if the downstream device is under the control of a 517 different operator, or if the downstream device does not support 518 sampling. 520 Alternatively, since sampling techniques require that the sample be 521 annotated with the packet's egress port information, ingress sampling 522 may suffice. However, this means that sampling would have to be 523 enabled on all ports, rather than only on those ports where such 524 monitoring is desired. There is one situation in which this approach 525 may not work. If there are tunnels that originate from the given 526 router, and if the resulting tunnel comprises the large flow, then 527 this cannot be deduced from ingress sampling at the given router. 528 Instead, if egress sampling is unavailable, then ingress sampling 529 from the downstream router must be used. 531 To illustrate the use of ingress versus egress sampling, we refer to 532 Figure 2. Since we are looking at rebalancing flows at R1, we would 533 need to enable egress sampling on ports (1), (2), and (3) on R1. If 534 egress sampling is not available, and if R2 is also under the control 535 of the same administrator, enabling ingress sampling on R2's ports 536 (1), (2), and (3) would also work, but it would necessitate the 537 involvement of a central management entity in order for R1 to obtain 538 large flow information for each of its links. Finally, R1 can enable 539 ingress sampling only on all of its ports (not just the ports that 540 are part of the LAG/ECMP group being monitored) and that would 541 suffice if the sampling technique annotates the samples with the 542 egress port information. 544 The advantages and disadvantages of sampling techniques are as 545 follows. 547 Advantages: 549 . Supported in most existing routers. 551 . Requires minimal router resources. 553 Disadvantages: 555 . In order to minimize the error inherent in sampling, there is a 556 minimum delay for the recognition time of large flows, and in 557 the time that it takes to react to this information. 559 With sampling, the detection of large flows can be done on the order 560 of one second [DevoFlow]. A discussion on determining the 561 appropriate sampling frequency is available in the following 562 reference [SAMP-BASIC]. 564 4.3.4. Inline Data Path Measurement 566 Implementations may perform recognition of large flows by performing 567 measurements on traffic in the data path of a router. Such an 568 approach would be expected to operate at the interface speed on every 569 interface, accounting for all packets processed by the data path of 570 the router. An example of such an approach is described in IPFIX 571 [RFC 5470]. 573 Using inline data path measurement, a faster and more accurate 574 indication of large flows mapped to each of the component links in a 575 LAG/ECMP group may be possible (as compared to the sampling-based 576 approach). 578 The advantages and disadvantages of inline data path measurement are: 580 Advantages: 582 . As link speeds get higher, sampling rates are typically reduced 583 to keep the number of samples manageable which places a lower 584 bound on the detection time. With inline data path measurement, 585 large flows can be recognized in shorter windows on higher link 586 speeds since every packet is accounted for [NDTM]. 588 . Eliminates the potential dependence on an external management 589 station for large flow recognition. 591 Disadvantages: 593 . It is more resource intensive in terms of the tables sizes 594 required for monitoring all flows in order to perform the 595 measurement. 597 As mentioned earlier, the observation interval for determining a 598 large flow and the bandwidth threshold for classifying a flow as a 599 large flow should be programmable parameters in a router. 601 The implementation details of inline data path measurement of large 602 flows is vendor dependent and beyond the scope of this document. 604 4.3.5. Use of Multiple Methods for Large Flow Recognition 606 It is possible that a router may have line cards that support a 607 sampling technique while other line cards support inline data path 608 measurement of large flows. As long as there is a way for the router 609 to reliably determine the mapping of large flows to component links 610 of a LAG/ECMP group, it is acceptable for the router to use more than 611 one method for large flow recognition. 613 If both methods are supported, inline data path measurement may be 614 preferable because of its speed of detection [FLOW-ACC]. 616 4.4. Load Rebalancing Options 618 Below are suggested techniques for load balancing. Equipment vendors 619 may implement more than one technique, including those not described 620 in this document, and allow the operator to choose between them. 622 Note that regardless of the method used, perfect rebalancing of large 623 flows may not be possible since flows arrive and depart at different 624 times. Also, any flows that are moved from one component link to 625 another may experience momentary packet reordering. 627 4.4.1. Alternative Placement of Large Flows 629 Within a LAG/ECMP group, the member component links with least 630 average port utilization are identified. Some large flow(s) from the 631 heavily loaded component links are then moved to those lightly-loaded 632 member component links using a policy-based routing (PBR) rule in the 633 ingress processing element(s) in the routers. 635 With this approach, only certain large flows are subjected to 636 momentary flow re-ordering. 638 When a large flow is moved, this will increase the utilization of the 639 link that it moved to potentially creating imbalance in the 640 utilization once again across the component links. Therefore, when 641 moving large flows, care must be taken to account for the existing 642 load, and what the future load will be after large flow has been 643 moved. Further, the appearance of new large flows may require a 644 rearrangement of the placement of existing flows. 646 Consider a case where there is a LAG compromising four 10 Gbps 647 component links and there are four large flows, each of 1 Gbps. 648 These flows are each placed on one of the component links. 649 Subsequent, a fifth large flow of 2 Gbps is recognized and to 650 maintain equitable load distribution, it may require placement of one 651 of the existing 1 Gbps flow to a different component link. And this 652 would still result in some imbalance in the utilization across the 653 component links. 655 4.4.2. Redistributing Small Flows 657 Some large flows may consume the entire bandwidth of the component 658 link(s). In this case, it would be desirable for the small flows to 659 not use the congested component link(s). This can be accomplished in 660 one of the following ways. 662 This method works on some existing router hardware. The idea is to 663 prevent, or reduce the probability, that the small flow hashes into 664 the congested component link(s). 666 . The LAG/ECMP table is modified to include only non-congested 667 component link(s). Small flows hash into this table to be mapped 668 to a destination component link. Alternatively, if certain 669 component links are heavily loaded, but not congested, the 670 output of the hash function can be adjusted to account for large 671 flow loading on each of the component links. 673 . The PBR rules for large flows (refer to Section 4.4.1) must 674 have strict precedence over the LAG/ECMP table lookup result. 676 With this approach the small flows that are moved would be subject to 677 reordering. 679 4.4.3. Component Link Protection Considerations 681 If desired, certain component links may be reserved for link 682 protection. These reserved component links are not used for any flows 683 in the absence of any failures. In the case when the component 684 link(s) fail, all the flows on the failed component link(s) are moved 685 to the reserved component link(s). The mapping table of large flows 686 to component link simply replaces the failed component link with the 687 reserved link. Likewise, the LAG/ECMP table replaces the failed 688 component link with the reserved link. 690 4.4.4. Load Rebalancing Algorithms 692 Specific algorithms for placement of large flows are out of scope of 693 this document. One possibility is to formulate the problem for large 694 flow placement as the well-known bin-packing problem and make use of 695 the various heuristics that are available for that problem [bin- 696 pack]. 698 4.4.5. Load Rebalancing Example 700 Optimizing LAG/ECMP component utilization for the use case in Figure 701 2 is depicted below in Figure 4. The large flow rebalancing explained 702 in Section 4.4 is used. The improved link utilization is as follows: 704 . Component link (1) has 3 flows -- 2 small flows and 1 large 705 flow -- and the link utilization is normal. 707 . Component link (2) has 4 flows -- 3 small flows and 1 large 708 flow -- and the link utilization is normal now. 710 . Component link (3) has 3 flows -- 2 small flows and 1 large 711 flow -- and the link utilization is normal now. 713 +-----------+ -> +-----------+ 714 | | -> | | 715 | | ===> | | 716 | (1)|--------|(1) | 717 | | | | 718 | | ===> | | 719 | | -> | | 720 | | -> | | 721 | (R1) | -> | (R2) | 722 | (2)|--------|(2) | 723 | | | | 724 | | -> | | 725 | | -> | | 726 | | ===> | | 727 | (3)|--------|(3) | 728 | | | | 729 +-----------+ +-----------+ 731 Where: -> small flow 732 ===> large flow 734 Figure 4: Evenly Utilized Composite Links 736 Basically, the use of the mechanisms described in Section 4.4.1 737 resulted in a rebalancing of flows where one of the large flows on 738 component link (3) which was previously congested was moved to 739 component link (2) which was previously under-utilized. 741 5. Information Model for Flow Rebalancing 743 In order to support flow rebalancing in a router from an external 744 system, the exchange of some information is necessary between the 745 router and the external system. This section provides an exemplary 746 information model covering the various components needed for the 747 purpose. The model is intended to be informational and may be used 748 as input for development of a data model. 750 5.1. Configuration Parameters for Flow Rebalancing 752 The following parameters are required the configuration of this 753 feature: 755 . Large flow recognition parameters: 757 o Observation interval: The observation interval is the time 758 period in seconds over which the packet arrivals are 759 observed for the purpose of large flow recognition. 761 o Minimum bandwidth threshold: The minimum bandwidth threshold 762 would be configured as a percentage of link speed and 763 translated into a number of bytes over the observation 764 interval. A flow for which the number of bytes received, 765 for a given observation interval, exceeds this number would 766 be recognized as a large flow. 768 o Minimum bandwidth threshold for large flow maintenance: The 769 minimum bandwidth threshold for large flow maintenance is 770 used to provide hysteresis for large flow recognition. 771 Once a flow is recognized as a large flow, it continues to 772 be recognized as a large flow until it falls below this 773 threshold. This is also configured as a percentage of link 774 speed and is typically lower than the minimum bandwidth 775 threshold defined above. 777 . Imbalance threshold: A measure of the deviation of the 778 component link utilizations from the utilization of the overall 779 LAG/ECMP group. Since component links can be of a different 780 speed, the imbalance can be computed as follows. Let the 781 utilization of each component link in a LAG/ECMP group with n 782 links of speed b_1, b_2 .. b_n, be u_1, u_2 .. u_n. The mean 783 utilization is computed is u_ave = [ (u_1 x b_1) + (u_2 x b_2) + 784 .. + (u_n x b_n) ] / [b_1 + b_2 + .. + b_n]. The imbalance is 785 then computed as max_{i=1..n} | u_i - u_ave |. 787 . Rebalancing interval: The minimum amount of time between 788 rebalancing events. This parameter ensures that rebalancing is 789 not invoked too frequently as it impacts packet ordering. 791 These parameters may be configured on a system-wide basis or it may 792 apply to an individual LAG. It may be applied to an ECMP group 793 provided the component links are not shared with any other ECMP 794 group. 796 5.2. System Configuration and Identification Parameters 798 The following parameters are useful for router configuration and 799 operation when using the mechanisms in this document. 801 . IP address: The IP address of a specific router that the 802 feature is being configured on, or that the large flow placement 803 is being applied to. 805 . LAG ID: Identifies the LAG on a given router. The LAG ID may be 806 required when configuring this feature (to apply a specific set 807 of large flow identification parameters to the LAG) and will be 808 required when specifying flow placement to achieve the desired 809 rebalancing. 811 . Component Link ID: Identifies the component link within a LAG 812 or ECMP group. This is required when specifying flow placement 813 to achieve the desired rebalancing. 815 . Component Link Weight: The relative weight to be applied to 816 traffic for a given component link when using hash-based 817 techniques for load distribution. 819 . ECMP group: Identifies a particular ECMP group. The ECMP group 820 may be required when configuring this feature (to apply a 821 specific set of large flow identification parameters to the ECMP 822 group) and will be required when specifying flow placement to 823 achieve the desired rebalancing. We note that multiple ECMP 824 groups can share an overlapping set (or non-overlapping subset) 825 of component links. This document does not deal with the 826 complexity of addressing such configurations. 828 The feature may be configured globally for all LAGs and/or for all 829 ECMP groups, or it may be configured specifically for a given LAG or 830 ECMP group. 832 5.3. Information for Alternative Placement of Large Flows 834 In cases where large flow recognition is handled by an external 835 management station (see Section 4.3.3), an information model for 836 flows is required to allow the import of large flow information to 837 the router. 839 Typical fields use for identifying large flows were discussed in 840 Section 4.3.1. The IPFIX information model [RFC 7012] can be 841 leveraged for large flow identification. 843 Large Flow placement is achieved by specifying the relevant flow 844 information along with the following: 846 . For LAG: Router's IP address, LAG ID, LAG component link ID. 848 . For ECMP: Router's IP address, ECMP group, ECMP component link 849 ID. 851 In the case where the ECMP component link itself comprises a LAG, we 852 would have to specify the parameters for both the ECMP group as well 853 as the LAG to which the large flow is being directed. 855 5.4. Information for Redistribution of Small Flows 857 Redistribution of small flows is done using the following: 859 . For LAG: The LAG ID and the component link IDs along with the 860 relative weight of traffic to be assigned to each component link 861 ID are required. 863 . For ECMP: The ECMP group and the ECMP Nexthop along with the 864 relative weight of traffic to be assigned to each ECMP Nexthop 865 are required. 867 It is possible to have an ECMP nexthop that itself comprises a LAG. 868 In that case, we would have to specify the new weights for both the 869 ECMP nexthops within the ECMP group as well as the component links 870 within the LAG. 872 In the case where an ECMP component link itself comprises a LAG, we 873 would have to specify new weights for both the component links within 874 the ECMP group as well as the component links within the LAG. 876 5.5. Export of Flow Information 878 Exporting large flow information is required when large flow 879 recognition is being done on a router, but the decision to rebalance 880 is being made in an external management station. Large flow 881 information includes flow identification and the component link ID 882 that the flow currently is assigned to. Other information such as 883 flow QoS and bandwidth may be exported too. 885 The IPFIX information model [RFC 7012] can be leveraged for large 886 flow identification. 888 5.6. Monitoring information 890 5.6.1. Interface (link) utilization 892 The incoming bytes (ifInOctets), outgoing bytes (ifOutOctets) and 893 interface speed (ifSpeed) can be obtained, for example, from the 894 Interface table (iftable) MIB [RFC 1213]. 896 The link utilization can then be computed as follows: 898 Incoming link utilization = (delta_ifInOctets * 8) / (ifSpeed * T) 900 Outgoing link utilization = (delta_ifOutOctets * 8) / (ifSpeed * T) 902 Where T is the interval over which the utilization is being measured, 903 delta_ifInOctets is the change in ifInOctets over that interval, and 904 delta_ifOutOctets is the change in ifOutOctets over that interval. 906 For high speed Ethernet links, the etherStatsHighCapacityTable MIB 907 [RFC 3273] can be used. 909 Similar results may be achieved using the corresponding objects of 910 other interface management data models such as YANG [RFC 7223] if 911 those are used instead of MIBs. 913 For scalability, it is recommended to use the counter push mechanism 914 in [sflow-v5] for the interface counters. Doing so would help avoid 915 counter polling through the MIB interface. 917 The outgoing link utilization of the component links within a 918 LAG/ECMP group can be used to compute the imbalance (See Section 5.1) 919 for the LAG/ECMP group. 921 5.6.2. Other monitoring information 923 Additional monitoring information that is useful includes: 925 . Number of times rebalancing was done. 927 . Time since the last rebalancing event. 929 . The number of large flows currently rebalanced by the scheme. 931 . A list of the large flows that have been rebalanced including 933 o the rate of each large flow at the time of the last 934 rebalancing for that flow, 936 o the time that rebalancing was last performed for the given 937 large flow, and 939 o the interfaces that the large flows was (re)directed to. 941 . The settings for the weights of the interfaces within a 942 LAG/ECMP used by the small flows which depend on hashing. 944 6. Operational Considerations 946 6.1. Rebalancing Frequency 948 Flows should be rebalanced only when the imbalance in the utilization 949 across component links exceeds a certain threshold. Frequent 950 rebalancing to achieve precise equitable utilization across component 951 links could be counter-productive as it may result in moving flows 952 back and forth between the component links impacting packet ordering 953 and system stability. This applies regardless of whether large flows 954 or small flows are redistributed. It should be noted that reordering 955 is a concern for TCP flows with even a few packets because three out- 956 of-order packets would trigger sufficient duplicate ACKs to the 957 sender resulting in a retransmission [RFC 5681]. 959 The operator would have to experiment with various values of the 960 large flow recognition parameters (minimum bandwidth threshold, 961 observation interval) and the imbalance threshold across component 962 links to tune the solution for their environment. 964 6.2. Handling Route Changes 966 Large flow rebalancing must be aware of any changes to the FIB. In 967 cases where the nexthop of a route no longer to points to the LAG, or 968 to an ECMP group, any PBR entries added as described in Section 4.4.1 969 and 4.4.2 must be withdrawn in order to avoid the creation of 970 forwarding loops. 972 6.3. Forwarding Resources 974 Hash-based techniques used for load balancing with LAG/ECMP are 975 usually stateless. The mechanisms described in this document require 976 additional resources in the forwarding plane of routers for creating 977 PBR rules that are capable of overriding the forwarding decision from 978 the hash-based approach. These resources may limit the number of 979 flows that can be rebalanced and may also impact the latency 980 experienced by packets due to the additional lookups that are 981 required. 983 7. IANA Considerations 985 This memo includes no request to IANA. 987 8. Security Considerations 989 This document does not directly impact the security of the Internet 990 infrastructure or its applications. In fact, it could help if there 991 is a DOS attack pattern which causes a hash imbalance resulting in 992 heavy overloading of large flows to certain LAG/ECMP component 993 links. 995 An attacker with knowledge of the large flow recognition algorithm 996 and any stateless distribution method can generate flows that are 997 distributed in a way that overloads a specific path. This could be 998 used to cause the creation of PBR rules that exhaust the available 999 rule capacity on nodes. If PBR rules are consequently discarded, 1000 this could result in congestion on the attacker-selected path. 1001 Alternatively, tracking large numbers of PBR rules could result in 1002 performance degradation. 1004 9. Contributing Authors 1006 Sanjay Khanna 1007 Cisco Systems 1008 Email: sanjakha@gmail.com 1010 10. Acknowledgements 1012 The authors would like to thank the following individuals for their 1013 review and valuable feedback on earlier versions of this document: 1014 Shane Amante, Fred Baker, Michael Bugenhagen, Zhen Cao, Brian 1015 Carpenter, Benoit Claise, Michael Fargano, Wes George, Sriganesh 1016 Kini, Roman Krzanowski, Andrew Malis, Dave McDysan, Pete Moyer, 1017 Peter Phaal, Dan Romascanu, Curtis Villamizar, Jianrong Wong, George 1018 Yum, and Weifeng Zhang. As a part of the IETF Last Call process, 1019 valuable comments were received from Martin Thomson and Carlos 1020 Pignatro. 1022 11. References 1024 11.1. Normative References 1026 [802.1AX] IEEE Standards Association, "IEEE Std 802.1AX-2008 IEEE 1027 Standard for Local and Metropolitan Area Networks - Link 1028 Aggregation", 2008. 1030 [RFC 2991] Thaler, D. and C. Hopps, "Multipath Issues in Unicast and 1031 Multicast," November 2000. 1033 [RFC 7011] Claise, B. et al., "Specification of the IP Flow 1034 Information Export (IPFIX) Protocol for the Exchange of IP Traffic 1035 Flow Information," September 2013. 1037 [RFC 7012] Claise, B. and B. Trammell, "Information Model for IP Flow 1038 Information Export (IPFIX)," September 2013. 1040 11.2. Informative References 1042 [bin-pack] Coffman, Jr., E., M. Garey, and D. Johnson. Approximation 1043 Algorithms for Bin-Packing -- An Updated Survey. In Algorithm Design 1044 for Computer System Design, ed. by Ausiello, Lucertini, and Serafini. 1045 Springer-Verlag, 1984. 1047 [CAIDA] "Caida Internet Traffic Analysis," http://www.caida.org/home. 1049 [DevoFlow] Mogul, J., et al., "DevoFlow: Cost-Effective Flow 1050 Management for High Performance Enterprise Networks," Proceedings of 1051 the ACM SIGCOMM, August 2011. 1053 [FLOW-ACC] Zseby, T., et al., "Packet sampling for flow accounting: 1054 challenges and limitations," Proceedings of the 9th international 1055 conference on Passive and active network measurement, 2008. 1057 [ID.ietf-rtgwg-cl-requirement] Villamizar, C. et al., "Requirements 1058 for MPLS over a Composite Link," September 2013. 1060 [ITCOM] Jo, J., et al., "Internet traffic load balancing using 1061 dynamic hashing with flow volume," SPIE ITCOM, 2002. 1063 [NDTM] Estan, C. and G. Varghese, "New directions in traffic 1064 measurement and accounting," Proceedings of ACM SIGCOMM, August 2002. 1066 [NVGRE] Sridharan, M. et al., "NVGRE: Network Virtualization using 1067 Generic Routing Encapsulation," draft-sridharan-virtualization- 1068 nvgre-06, January 2015. 1070 [RFC 2784] Farinacci, D. et al., "Generic Routing Encapsulation 1071 (GRE)," March 2000. 1073 [RFC 6790] Kompella, K. et al., "The Use of Entropy Labels in MPLS 1074 Forwarding," November 2012. 1076 [RFC 1213] McCloghrie, K., "Management Information Base for Network 1077 Management of TCP/IP-based internets: MIB-II," March 1991. 1079 [RFC 2992] Hopps, C., "Analysis of an Equal-Cost Multi-Path 1080 Algorithm," November 2000. 1082 [RFC 3273] Waldbusser, S., "Remote Network Monitoring Management 1083 Information Base for High Capacity Networks," July 2002. 1085 [RFC 3931] Lau, J. (Ed.), M. Townsley (Ed.), and I. Goyret (Ed.), 1086 "Layer 2 Tunneling Protocol - Version 3," March 2005. 1088 [RFC 3954] Claise, B., "Cisco Systems NetFlow Services Export Version 1089 9," October 2004. 1091 [RFC 5470] G. Sadasivan et al., "Architecture for IP Flow Information 1092 Export," March 2009. 1094 [RFC 5475] Zseby, T. et al., "Sampling and Filtering Techniques for 1095 IP Packet Selection," March 2009. 1097 [RFC 5640] Filsfils, C., P. Mohapatra, and C. Pignataro, "Load 1098 Balancing for Mesh Softwires," August 2009. 1100 [RFC 5681] Allman, M. et al., "TCP Congestion Control," September 1101 2009. 1103 [RFC 7223] Bjorklund, M., "A YANG Data Model for Interface 1104 Management," May 2014. 1106 [SAMP-BASIC] Phaal, P. and S. Panchen, "Packet Sampling Basics," 1107 http://www.sflow.org/packetSamplingBasics/. 1109 [sFlow-v5] Phaal, P. and M. Lavine, "sFlow version 5," 1110 http://www.sflow.org/sflow_version_5.txt, July 2004. 1112 [sFlow-LAG] Phaal, P. and A. Ghanwani, "sFlow LAG counters 1113 structure," http://www.sflow.org/sflow_lag.txt, September 2012. 1115 [STT] Davie, B. (Ed.) and J. Gross, "A Stateless Transport Tunneling 1116 Protocol for Network Virtualization (STT)," draft-davie-stt-06, March 1117 2014. 1119 [RFC 7348] Mahalingam, M. et al., "VXLAN: A Framework for Overlaying 1120 Virtualized Layer 2 Networks over Layer 3 Networks," August 2014. 1122 [YONG] Yong, L., "Enhanced ECMP and Large Flow Aware Transport," 1123 draft-yong-pwe3-enhance-ecmp-lfat-01, September 2010. 1125 Appendix A. Internet Traffic Analysis and Load Balancing Simulation 1127 Internet traffic [CAIDA] has been analyzed to obtain flow statistics 1128 such as the number of packets in a flow and the flow duration. The 1129 five tuples in the packet header (IP addresses, TCP/UDP Ports, and IP 1130 protocol) are used for flow identification. The analysis indicates 1131 that < ~2% of the flows take ~30% of total traffic volume while the 1132 rest of the flows (> ~98%) contributes ~70% [YONG]. 1134 The simulation has shown that given Internet traffic pattern, the 1135 hash-based technique does not evenly distribute the flows over ECMP 1136 paths. Some paths may be > 90% loaded while others are < 40% loaded. 1137 The more ECMP paths exist, the more severe the misbalancing. This 1138 implies that hash-based distribution can cause some paths to become 1139 congested while other paths are underutilized [YONG]. 1141 The simulation also shows substantial improvement by using the large 1142 flow-aware hash-based distribution technique described in this 1143 document. In using the same simulated traffic, the improved 1144 rebalancing can achieve < 10% load differences among the paths. It 1145 proves how large flow-aware hash-based distribution can effectively 1146 compensate the uneven load balancing caused by hashing and the 1147 traffic characteristics [YONG]. 1149 Authors' Addresses 1151 Ram Krishnan 1152 Brocade Communications 1153 San Jose, 95134, USA 1154 Phone: +1-408-406-7890 1155 Email: ramkri123@gmail.com 1157 Lucy Yong 1158 Huawei USA 1159 5340 Legacy Drive 1160 Plano, TX 75025, USA 1161 Phone: +1-469-277-5837 1162 Email: lucy.yong@huawei.com 1164 Anoop Ghanwani 1165 Dell 1166 San Jose, CA 95134 1167 Phone: +1-408-571-3228 1168 Email: anoop@alumni.duke.edu 1170 Ning So 1171 Tata Communications 1172 Plano, TX 75082, USA 1173 Phone: +1-972-955-0914 1174 Email: ning.so@tatacommunications.com 1176 Bhumip Khasnabish 1177 ZTE Corporation 1178 New Jersey, 07960, USA 1179 Phone: +1-781-752-8003 1180 Email: vumip1@gmail.com