idnits 2.17.1 draft-ietf-idr-flowspec-l2vpn-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5575]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: In single VLAN case, the component type MUST not be used. -- The document date (January 03, 2019) is 1937 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '4762' on line 118 == Outdated reference: A later version (-22) exists of draft-ietf-idr-flow-spec-v6-09 ** Obsolete normative reference: RFC 5575 (Obsoleted by RFC 8955) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Hao 3 Internet-Draft D. Eastlake 4 Intended status: Standards Track Huawei 5 Expires: July 7, 2019 J. Uttaro 6 AT&T 7 S. Litkowski 8 Orange Business Service 9 S. Zhuang 10 Huawei 11 January 03, 2019 13 BGP Dissemination of L2VPN Flow Specification Rules 14 draft-ietf-idr-flowspec-l2vpn-09 16 Abstract 18 This document defines a BGP flow-spec extension to disseminate L2 VPN 19 Ethernet traffic filtering rules. SAFI=134 in [RFC5575] is redefined 20 for this purpose. A new subset of component types and extended 21 community also are defined. A new subset of component types and new 22 extended community also are defined. 24 Requirements Language 26 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 27 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 28 document are to be interpreted as described in RFC 2119 [RFC2119]. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at https://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on July 7, 2019. 47 Copyright Notice 49 Copyright (c) 2019 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (https://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 65 2. Layer 2 Flow Specification encoding in BGP . . . . . . . . . 3 66 3. Ethernet Flow Specification encoding in BGP . . . . . . . . . 4 67 3.1. Order of Traffic Filtering Rules . . . . . . . . . . . . 6 68 4. Ethernet Flow Specification Traffic Actions . . . . . . . . . 7 69 4.1. VLAN-action . . . . . . . . . . . . . . . . . . . . . . . 8 70 4.2. TPID-action . . . . . . . . . . . . . . . . . . . . . . . 9 71 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . 11 73 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 74 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 11 75 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 76 9.1. Normative References . . . . . . . . . . . . . . . . . . 11 77 9.2. Informative References . . . . . . . . . . . . . . . . . 12 78 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 80 1. Introduction 82 BGP Flow-spec is an extension to BGP that supports the dissemination 83 of traffic flow specification rules. It leverages the BGP Control 84 Plane to simplify the distribution of ACLs. Using this extension new 85 filter rules can be injected to all BGP peers simultaneously without 86 changing router configuration. The typical application of BGP Flow- 87 spec is to automate the distribution of traffic filter lists to 88 routers for DDOS mitigation, access control, etc. 90 [RFC5575] defines a new BGP Network Layer Reachability 91 Information(NLRI) format used to distribute traffic flow 92 specification rules. NLRI (AFI=1, SAFI=133) is for IPv4 unicast 93 filtering. NLRI (AFI=1, SAFI=134) is for BGP/MPLS VPN filtering. 94 The Flow specification match part only includes L3/L4 information 95 like source/destination prefix, protocol, ports, and etc., so traffic 96 flows can only be selectively filtered based on L3/L4 information. 98 Layer 2 Virtual Private Networks (L2VPNs) have already been deployed 99 in an increasing number of networks today. In L2VPN network, we also 100 have requirement to deploy BGP Flow-spec to mitigate DDoS attack 101 traffic. Within L2VPN network, both IP and non-IP Ethernet traffic 102 maybe exist. For IP traffic filtering, the Flow specification rules 103 defined in [RFC5575] which include match criteria and actions can 104 still be used, flow specification rules received via new NLRI format 105 apply only to traffic that belongs to the VPN instance(s) in which it 106 is imported. For non-IP Ethernet traffic filtering, Layer 2 related 107 information like source/destination MAC and VLAN should be 108 considered. But the flow specification match criteria defined in 109 [RFC5575] only include layer 3 and layer 4 IP information, not layer 110 2 Ethernet information. 112 There are different kinds of L2VPN networks like EVPN [RFC7432], BGP 113 VPLS [RFC4761], LDP VPLS [RFC4762] and border gateway protocol (BGP) 114 auto discovery [RFC6074]. Because the flow-spec feature relies on 115 BGP protocol to distribute traffic filtering rules, it can only be 116 incrementally deployed in those L2VPN networks where BGP has already 117 been used for auto discovery and/or signaling purposes such as BGP- 118 based VPLS [RFC4761], EVPN and LDP-based VPLS [RFC4762] [4762] with 119 BGP auto-discovery [RFC6074]. 121 This draft proposes a new subset of flow-spec component types and an 122 extended community to support L2VPN flow-spec application. The flow- 123 spec rules can be enforced on all border routers or on some interface 124 sets of the border routers. SAFI=134 in [RFC5575] is redefined for 125 dissemination of traffic filtering information in an L2VPN 126 environment. 128 2. Layer 2 Flow Specification encoding in BGP 130 The [RFC5575] defines SAFI 133 and SAFI 134 for "dissemination of 131 IPv4 flow specification rules" and "dissemination of VPNv4 flow 132 specification rules" respectively. [I-D.ietf-idr-flow-spec-v6] 133 redefines the [RFC5575] SAFIs in order to make them applicable to 134 both IPv4 and IPv6 applications. This document will further redefine 135 the SAFI 134 in order to make them applicable to L2VPN applications. 137 The following changes are defined: 139 "SAFI 134 for dissemination of L3VPN flow specification rules" to now 140 be defined as "SAFI 134 for dissemination of VPN flow specification 141 rules" 142 For SAFI 134 the indication to which address family it is referring 143 to will be recognized by AFI value (AFI=1 for VPNv4, AFI=2 VPNv6 and 144 AFI=25 for L2VPN). Such modification is fully backwards compatible 145 with existing implementation and production deployments. 147 For SAFI 134 the indication to which address family it is referring 148 to will be recognized by AFI value (AFI=1 for VPNv4, AFI=2 VPNv6 and 149 AFI=25 for L2VPN). Such modification is fully backwards compatible 150 with existing implementation and production deployments. 152 3. Ethernet Flow Specification encoding in BGP 154 The NLRI format for this address family consists of a fixed-length 155 Route Distinguisher field (8 bytes) followed by a flow specification, 156 following the encoding defined in this document. The NLRI length 157 field includes both the 8 bytes of the Route Distinguisher as well as 158 the subsequent flow specification. 160 Flow specification rules received via this NLRI apply only to traffic 161 that belongs to the VPN instance(s) into which it is imported. Flow 162 rules are accepted by default when received from remote PE routers. 164 Besides the component types defined in [RFC5575] and 165 [I-D.ietf-idr-flow-spec-v6], this document specifies the following 166 additional component types for L2 VPN Ethernet traffic filtering: 168 Type 14 - Ethernet Type 170 Encoding: 172 Defines a list of {operation, value} pairs used to match two-octet 173 field. Values are encoded as 2-byte quantities. Ethernet II framing 174 defines the two-octet Ethernet Type (EtherType) field in an Ethernet 175 frame, preceded by destination and source MAC addresses, that 176 identifies an upper layer protocol encapsulating the frame data. 178 Type 15 - Source MAC 180 Encoding: 181 Defines the source MAC Address to match. 183 Type 16 - Destination MAC 185 Encoding: 186 Defines the destination MAC Address to match. 188 Type 17 - DSAP(Destination Service Access Point) in LLC 189 Encoding: 191 Defines a list of {operation, value} pairs used to match the 1-octet 192 DSAP in the 802.2 LLC (Logical Link Control Header). Values are 193 encoded as 1-byte quantities. The operation field is encoded as a 194 'Numeric operator' defined in [RFC5575]. 196 Type 18 - SSAP(Source Service Access Point) in LLC 198 Encoding: 200 Defines a list of {operation, value} pairs used to match the 1-octet 201 SSAP in the 802.2 LLC. Values are encoded as 1-byte quantities. 203 Type 19 - Control field in LLC 205 Encoding: 207 Defines a list of {operation, value} pairs used to match 1-octet 208 control field in the 802.2 LLC. Values are encoded as 1-byte 209 quantities. 211 Type 20 - SNAP 213 Encoding: 215 Defines a list of {operation, value} pairs used to match 5-octet SNAP 216 (Sub-Network Access Protocol) field. Values are encoded as 5-byte 217 quantities. 219 Type 21 - VLAN ID 221 Encoding: 223 Defines a list of {operation, value} pairs used to match VLAN ID. 224 Values are encoded as 2-byte quantities, where the four most 225 significant bits are zero and the 12 least significant bits contain 226 the VLAN value. 228 In the virtual local-area network (VLAN) stacking case, the VLAN ID 229 is the outer VLAN ID. 231 Type 22 - VLAN COS 233 Encoding: 235 Defines a list of {operation, value} pairs used to match 3-bit VLAN 236 COS fields [802.1Q]. Values are encoded using a single byte, where 237 the five most significant bits are zero and the three least 238 significant bits contain the VLAN COS value. 240 In the virtual local-area network (VLAN) stacking case, the VLAN COS 241 is outer VLAN COS. 243 Type 23 - Inner VLAN ID 245 Encoding: 247 Defines a list of {operation, value} pairs used to match the inner 248 VLAN ID using for virtual local-area network (VLAN) stacking or Q in 249 Q use. Values are encoded as 2-byte quantities, where the four most 250 significant bits are zero and the 12 least significant bits contain 251 the VLAN value. 253 In single VLAN case, this component type MUST NOT be used. 255 Type 24 - Inner VLAN COS 257 Encoding: 259 Defines a list of {operation, value} pairs used to match 3-bit inner 260 VLAN COS fields [802.1Q] using for virtual local-area network (VLAN) 261 stacking or Q in Q use. Values are encoded using a single byte, 262 where the five most significant bits are zero and the three least 263 significant bits contain the VLAN COS value. 265 In single VLAN case, the component type MUST not be used. 267 3.1. Order of Traffic Filtering Rules 269 The original definition for the order of traffic filtering rules can 270 be reused with new consideration for the MAC Address offset. As long 271 as the offsets are equal, the comparison is the same, retaining 272 longest-prefix-match semantics. If the offsets are not equal, the 273 lowest offset has precedence, as this flow matches the most 274 significant bit. 276 Pseudocode: 277 flow_rule_L2_cmp (a, b) 278 { 279 comp1 = next_component(a); 280 comp2 = next_component(b); 281 while (comp1 || comp2) { 282 // component_type returns infinity on end-of-list 283 if (component_type(comp1) < component_type(comp2)) { 284 return A_HAS_PRECEDENCE; 285 } 286 if (component_type(comp1) > component_type(comp2)) { 287 return B_HAS_PRECEDENCE; 288 } 290 if (component_type(comp1) == MAC_DESTINATION || MAC_SOURCE) { 291 common = MIN(MAC Address length (comp1), 292 MAC Address length (comp2)); 293 cmp = MAC Address compare(comp1, comp2, common); 294 // not equal, lowest value has precedence 295 // equal, longest match has precedence 296 } else { 297 common = 298 MIN(component_length(comp1), component_length(comp2)); 299 cmp = memcmp(data(comp1), data(comp2), common); 300 // not equal, lowest value has precedence 301 // equal, longest string has precedence 302 } 303 } 304 return EQUAL; 305 } 307 4. Ethernet Flow Specification Traffic Actions 309 The default action for a layer 2 traffic filtering flow specification 310 is to accept traffic that matches that particular rule. The 311 following extended community values per [RFC5575] can be used to 312 specify particular actions in an L2 VPN network: 314 +--------+--------------------+--------------------------+ 315 | type | extended community | encoding | 316 +--------+--------------------+--------------------------+ 317 | 0x8006 | traffic-rate | 2-byte as#, 4-byte float | 318 | 0x8007 | traffic-action | bitmask | 319 | 0x8008 | redirect | 6-byte Route Target | 320 | 0x8009 | traffic-marking | DSCP value | 321 +--------+--------------------+--------------------------+ 322 Redirect: The action should be redefined to allow the traffic to be 323 redirected to a MAC or IP VRF routing instance that lists the 324 specified route-target in its import policy. 326 Besides the above extended communities, this document also proposes 327 the following BGP extended communities specifications for Ethernet 328 flow to extend [RFC5575]: 330 +--------+------------------------+--------------------------+ 331 | type | extended community | encoding | 332 +--------+------------------------+--------------------------+ 333 | TBD1 | VLAN-action | bitmask | 334 | TBD2 | TPID-action | bitmask | 335 +--------+------------------------+--------------------------+ 337 4.1. VLAN-action 339 The VLAN-action extended community, as shown in the diagram below, 340 consists of 6 bytes that include t action Flags, two VLAN IDs, and 341 the associating COS value. The action Flags fields are further 342 divided into two parts which correspond to the first action and the 343 second action respectively, bit 0 to bit 7 give the first action 344 while bit 8 to bit 15 give the second action. The bits of PO, PU, 345 SW, RI and RO in each part represent the action of Pop, Push, Swap, 346 Rewrite inner VLAN and Rewrite outer VLAN respectively. Through this 347 method, more complicated actions also can be represented in a single 348 VLAN-action extened community, such as SwapPop, PushSwap, etc. For 349 example, SwapPop action is the sequence of two actions, the first 350 action is Swap and the second action is Pop. 352 0 7 15 353 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 354 |PO1|PU1|SW1|RI1|RO1|...|PO2|PU2|SW2|RI2|RO2|...| 355 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 356 | VLAN ID1 |COS1 |R1| 357 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 358 | VLAN ID2 |COS2 |R2| 359 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 361 PO1: Pop action. If the PO1 flag is one, it indicates the outmost 362 VLAN should be removed. 364 PU1: Push action. If PU1 is one, it indicates VLAN ID1 will be 365 added, the associated COS is COS1. 367 SW1: Swap action. If the SW1 flag is one, it indicates the outer 368 VLAN and inner VLAN should be swapped. 370 PO2: Pop action. If the PO2 flag is one, it indicates the outmost 371 VLAN should be removed. 373 PU2: Push action. If PU2 is one, it indicates VLAN ID2 will be 374 added, the associated COS is COS2. 376 SW2: Swap action. If the SW2 flag is one, it indicates the outer 377 VLAN and inner VLAN should be swapped. 379 RI1 and RI2: Rewrite inner VLAN action. If the RI flag is one, it 380 indicates the inner VLAN should be replaced by a new VLAN, the new 381 VLAN is VLAN ID1, the associated COS is COS1. If the VLAN ID1 is 0, 382 the action is to only modify the COS value of inner VLAN. 384 RO1 and RO2: Rewrite outer VLAN action. If the RO flag is one, it 385 indicates the outer VLAN should be replaced by a new VLAN, the new 386 VLAN is VLAN ID2, the associated COS is COS2. If the VLAN ID2 is 0, 387 the action is to only modify the COS value of outer VLAN. 389 R1 and R2: Reserved for future use. MUST be sent as zero and ignored 390 on receipt. 392 Giving an example, if the action of PUSH Inner VLAN 10 with COS value 393 5 and Outer VLAN 20 with COS value 6 is needed, the format of the 394 VLAN-action extended community is as follows: 396 0 7 15 397 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 398 |0 |1 |0 |0 |0 |0 |0 |0 |0 |1 |0 |0 |0 |0 |0 |0 | 399 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 400 | 10 |1 |0 |1 |0 | 401 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 402 | 20 |1 |1 |0 |0 | 403 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 405 4.2. TPID-action 407 The TPID-action extended community consists of 6 bytes which includes 408 the fields of action Flags, TPID1 and TPID2. 410 0 15 411 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 412 |TI|TO| Resv | 413 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 414 | TP ID1 | 415 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 416 | TP ID2 | 417 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 419 TI: Mapping inner TP ID action. If the TI flag is one, it indicates 420 the inner TP ID should be replaced by a new TP ID, the new TP ID is 421 TP ID1. 423 TO: Mapping outer TP ID action. If the TO flag is one, it indicates 424 the outer TP ID should be replaced by a new TP ID, the new TP ID is 425 TP ID2. 427 Resv: Reserved for future use. MUST be sent as zero and ignored on 428 receipt. 430 5. IANA Considerations 432 IANA is requested to change the description for SAFI 134 [RFC5575] 433 [RFC5575] to read as follows more general description and to change 434 the reference for it to [this document]: 436 134 VPN dissemination of flow specification rules 438 IANA is requested to allocate 11 new values in the Flow-Spec 439 Component Type registry as follows: 441 +--------+-------------------------------+--------------------------+ 442 | type | RFC or Draft | discription | 443 +--------+-------------------------------+--------------------------+ 444 | 14 |This draft | Ethernet Type | 445 | 15 |This draft | Source MAC | 446 | 16 |This draft | Destination MAC | 447 | 17 |This draft | DSAP in LLC | 448 | 18 |This draft | SSAP in LLC | 449 | 19 |This draft | Control field in LLC | 450 | 20 |This draft | SNAP | 451 | 21 |This draft | VLAN ID | 452 | 22 |This draft | VLAN COS | 453 | 23 |This draft | Inner VLAN ID | 454 | 24 |This draft | Inner VLAN COS | 455 +--------+-------------------------------+--------------------------+ 456 IANA is requested to update the reference for the following 457 assignment in the "BGP Extended Communities Type - extended, 458 transitive" registry: 460 Type value Name Reference 462 ---------- ---------------------------------------- --------- 464 0x080A Flow spec VLAN action [this document] 466 0x080B Flow spec TPID action [this document] 468 6. Security Considerations 470 No new security issues are introduced to the BGP protocol by this 471 specification. 473 7. Acknowledgements 475 The authors wish to acknowledge the important contributions of Hannes 476 Gredler, Xiaohu Xu, Zhenbin Li, Lucy Yong and Feng Dong. 478 8. Contributors 480 Qiandeng Liang 482 Huawei Technologies 484 101 Software Avenue, Yuhuatai District 486 Nanjing 210012 488 China 490 Email: liangqiandeng@huawei.com 492 9. References 494 9.1. Normative References 496 [I-D.ietf-idr-flow-spec-v6] 497 McPherson, D., Raszuk, R., Pithawala, B., 498 akarch@cisco.com, a., and S. Hares, "Dissemination of Flow 499 Specification Rules for IPv6", draft-ietf-idr-flow-spec- 500 v6-09 (work in progress), November 2017. 502 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 503 Requirement Levels", BCP 14, RFC 2119, 504 DOI 10.17487/RFC2119, March 1997, 505 . 507 [RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private 508 LAN Service (VPLS) Using BGP for Auto-Discovery and 509 Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007, 510 . 512 [RFC4762] Lasserre, M., Ed. and V. Kompella, Ed., "Virtual Private 513 LAN Service (VPLS) Using Label Distribution Protocol (LDP) 514 Signaling", RFC 4762, DOI 10.17487/RFC4762, January 2007, 515 . 517 [RFC5575] Marques, P., Sheth, N., Raszuk, R., Greene, B., Mauch, J., 518 and D. McPherson, "Dissemination of Flow Specification 519 Rules", RFC 5575, DOI 10.17487/RFC5575, August 2009, 520 . 522 [RFC6074] Rosen, E., Davie, B., Radoaca, V., and W. Luo, 523 "Provisioning, Auto-Discovery, and Signaling in Layer 2 524 Virtual Private Networks (L2VPNs)", RFC 6074, 525 DOI 10.17487/RFC6074, January 2011, 526 . 528 9.2. Informative References 530 [RFC7432] Sajassi, A., Ed., Aggarwal, R., Bitar, N., Isaac, A., 531 Uttaro, J., Drake, J., and W. Henderickx, "BGP MPLS-Based 532 Ethernet VPN", RFC 7432, DOI 10.17487/RFC7432, February 533 2015, . 535 Authors' Addresses 537 Weiguo Hao 538 Huawei 539 101 Software Avenue, 540 Nanjing 210012 541 China 543 Email: haoweiguo@huawei.com 544 Donald E. Eastlake, 3rd 545 Huawei 546 155 Beaver Street 547 Milford, MA 01757 548 USA 550 Email: d3e3e3@gmail.com 552 James Uttaro 553 AT&T 555 Email: uttaro@att.com 557 Stephane Litkowski 558 Orange Business Service 560 Email: stephane.litkowski@orange.com 562 Shunwan Zhuang 563 Huawei 564 Huawei Bld., No.156 Beiqing Rd. 565 Beijing 100095 566 China 568 Email: zhuangshunwan@huawei.com