idnits 2.17.1 draft-ietf-idr-flow-spec-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? -- It seems you're using the 'non-IETF stream' Licence Notice instead Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (January 18, 2009) is 5570 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: '137' on line 435 -- Looks like a reference, but probably isn't: '139' on line 435 ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 IDR Working Group P. Marques 3 Internet-Draft N. Sheth 4 Intended status: Standards Track R. Raszuk 5 Expires: July 22, 2009 B. Greene 6 Juniper Networks 7 J. Mauch 8 NTT/Verio 9 D. McPherson 10 Arbor Networks 11 January 18, 2009 13 Dissemination of flow specification rules 14 draft-ietf-idr-flow-spec-04 16 Status of this Memo 18 This Internet-Draft is submitted to IETF in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF), its areas, and its working groups. Note that 23 other groups may also distribute working documents as Internet- 24 Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt. 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 This Internet-Draft will expire on July 22, 2009. 39 Copyright Notice 41 Copyright (c) 2009 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. 51 Abstract 53 This document defines a new BGP NLRI encoding format that can be used 54 to distribute traffic flow specifications. This allows the routing 55 system to propagate information regarding more-specific components of 56 the traffic aggregate defined by an IP destination prefix. 58 Additionally it defines two applications of that encoding format. 59 One that can be used to automate inter-domain coordination of traffic 60 filtering, such as what is required in order to mitigate 61 (distributed) denial of service attacks. And a second application to 62 traffic filtering in the context of a BGP/MPLS VPN service. 64 The information is carried via the Border Gateway Protocol (BGP), 65 thereby reusing protocol algorithms, operational experience and 66 administrative processes such as inter-provider peering agreements. 68 Table of Contents 70 1. Definitions of Terms Used in this Memo . . . . . . . . . . . . 4 71 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 72 3. Flow specifications . . . . . . . . . . . . . . . . . . . . . 6 73 4. Dissemination of Information . . . . . . . . . . . . . . . . . 6 74 5. Traffic filtering . . . . . . . . . . . . . . . . . . . . . . 12 75 5.1. Order of traffic filtering rules . . . . . . . . . . . . . 13 76 6. Validation procedure . . . . . . . . . . . . . . . . . . . . . 13 77 7. Traffic Filtering Actions . . . . . . . . . . . . . . . . . . 14 78 8. Traffic filtering in RFC2547bis networks . . . . . . . . . . . 16 79 9. Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . 17 80 10. Security considerations . . . . . . . . . . . . . . . . . . . 17 81 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 82 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 19 83 13. Normative References . . . . . . . . . . . . . . . . . . . . . 20 84 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 86 1. Definitions of Terms Used in this Memo 88 NLRI - Network Layer Reachability Information 90 RIB - Routing Information Base 92 Loc-RIB - Local RIB 94 AS - Autonomous System Number 96 VRF - Virtual Routing and Forwarding instance 98 PE - Provider Edge router 100 2. Introduction 102 Modern IP routers contain both the capability to forward traffic 103 according to aggregate IP prefixes as well as to classify, shape, 104 limit filter or redirect packets based on administratively defined 105 policies. 107 While forwarding information is, typically, dynamically signaled 108 across the network via routing protocols, there is no agreed upon 109 mechanism to dynamically signal flows across autonomous-systems. 111 For several applications, it may be necessary to exchange control 112 information pertaining to aggregated traffic flow definitions which 113 cannot be expressed using destination address prefixes only. 115 An aggregated traffic flow is considered to be an n-tuple consisting 116 of several matching criteria such as source and destination address 117 prefixes, IP protocol and transport protocol port numbers. 119 The intention of this document is to define a general procedure to 120 encode such flow specification rules as a BGP [RFC4271] NLRI which 121 can be reused for several different control applications. 122 Additionally, we define the required mechanisms to utilize this 123 definition to the problem of immediate concern to the authors: intra 124 and inter provider distribution of traffic filtering rules to filter 125 (Distributed) Denial of Service (DoS) attacks. 127 By expanding routing information with flow specifications, the 128 routing system can take advantage of the ACL/firewall capabilities in 129 the router's forwarding path. Flow specifications can be seen as 130 more specific routing entries to an unicast prefix and are expected 131 to depend upon the existing unicast data information. 133 A flow specification received from a external autonomous-system will 134 need to be validated against unicast routing before being accepted. 135 If the aggregate traffic flow defined by the unicast destination 136 prefix is forwarded to a given BGP peer, then the local system can 137 safely install more specific flow rules which result in different 138 forwarding behavior, as requested by this system. 140 The choice of BGP as the carrier of this control information is also 141 justifiable by the fact that the key issues in terms of complexity 142 are problems which are common to unicast route distribution and have 143 already been solved in the current environment. 145 From an algorithmic perspective, the main problem that presents 146 itself is the loop-free distribution of pairs from 147 one originator to N ingresses. The key, in this particular instance, 148 being a flow specification. 150 From an operational perspective, the utilization of BGP as the 151 carrier for this information, allows a network service provider to 152 reuse both internal route distribution infrastructure (e.g.: route 153 reflector or confederation design) and existing external 154 relationships (e.g.: inter-domain BGP sessions to a customer 155 network). 157 While it is certainly possible to address this problem using other 158 mechanisms, the authors believe that this solution offers the 159 substantial advantage of being an incremental addition to deployed 160 mechanisms. 162 At the current deployments the information distributed by the flow- 163 spec extension is originated both manually as well as automatically 164 by systems which are able to detect malicious flows. When automated 165 systems are used care should be taken to their correctness and rate 166 of advertisement of flow routes. 168 This specification defines required protocol extensions to address 169 most common applications of IPv4 unicast and VPNv4 unicast filtering. 170 The same mechanism can be reused and new match criteria added to 171 address similar filtering needs for other BGP address families (for 172 example IPv6 unicast). Authors believe that those would be best to 173 be addressed in a separate document. 175 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 176 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 177 document are to be interpreted as described in RFC 2119 [RFC2119]. 179 3. Flow specifications 181 A flow specification is an n-tuple consisting on several matching 182 criteria that can be applied to IP traffic. A given IP packet is 183 said to match the defined flow if it matches all the specified 184 criteria. 186 A given flow may be associated with a set of attributes, depending on 187 the particular application, such attributes may or may not include 188 reachability information (i.e. NEXT_HOP). Well-known or AS-specific 189 community attributes can be used to encode a set of predetermined 190 actions. 192 A particular application is identified by a specific (AFI, SAFI) pair 193 [RFC4760] and corresponds to a distinct set of RIBs. Those RIBs 194 should be treated independently from each other in order to assure 195 non-interference between distinct applications. 197 BGP itself treats the NLRI as an opaque key to an entry in its 198 databases. Entries that are placed in the Loc-RIB are then 199 associated with a given set of semantics which is application 200 dependent. This is consistent with existing BGP applications. For 201 instance IP unicast routing (AFI=1, SAFI=1) and IP multicast reverse- 202 path information (AFI=1, SAFI=2) are handled by BGP without any 203 particular semantics being associated with them until installed in 204 the Loc-RIB. 206 Standard BGP policy mechanisms, such as UPDATE filtering by NLRI 207 prefix and community matching, SHOULD apply to the newly defined 208 NLRI-type. Network operators can also control propagation of such 209 routing updates by enabling or disabling the exchange of a particular 210 (AFI, SAFI) pair on a given BGP peering session. 212 4. Dissemination of Information 214 We define a "Flow Specification" NLRI type that may include several 215 components such as destination prefix, source prefix, protocol, 216 ports, etc. This NLRI is treated as an opaque bit string prefix by 217 BGP. Each bit string identifies a key to a database entry which a 218 set of attributes can be associated with. 220 This NLRI information is encoded using MP_REACH_NLRI and 221 MP_UNREACH_NLRI attributes as defined in RFC4760 [RFC4760]. Whenever 222 the corresponding application does not require Next Hop information, 223 this shall be encoded as a 0 octet length Next Hop in the 224 MP_REACH_NLRI attribute and ignored on receipt. 226 The NLRI field of the MP_REACH_NLRI and MP_UNREACH_NLRI is encoded as 227 a 1 or 2 octet NLRI length field followed by a variable length NLRI 228 value. The NLRI length is expressed in octets. 230 +------------------------------+ 231 | length (0xnn or 0xfn nn) | 232 +------------------------------+ 233 | NLRI value (variable) | 234 +------------------------------+ 236 flow-spec NLRI 238 If the NLRI length value is smaller than 240 (0xf0 hex), the length 239 field can be encoded as a single octet. Otherwise, it is encoded as 240 a extended length 2 octet value in which the most significant nibble 241 of the first byte is all ones. 243 The Flow Specification NLRI-type consists of several optional 244 subcomponents. A specific packet is considered to match the flow 245 specification when it matches the intersection (AND) of all the 246 components present in the specification. 248 The following component types are defined: 250 Type 1 - Destination Prefix 252 Encoding: 254 Defines the destination prefix to match. Prefixes are encoded 255 as in BGP UPDATE messages, a length in bits is followed by 256 enough octets to contain the prefix information. 258 Type 2 - Source Prefix 260 Encoding: 262 Defines the source prefix to match. 264 Type 3 - IP Protocol 266 Encoding: 268 Contains a set of {operator, value} pairs that are used to 269 match IP protocol value byte in IP packets. 271 The operator byte is encoded as: 273 7 6 5 4 3 2 1 0 274 +---+---+---+---+---+---+---+---+ 275 | e | a | len | 0 |lt |gt |eq | 276 +---+---+---+---+---+---+---+---+ 278 Numeric operator 280 * End of List bit. Set in the last {op, value} pair in the list. 282 * And bit. If unset the previous term is logically ORed with the 283 current one. If set the operation is a logical AND. It should 284 be unset in the first operator byte of a sequence. The AND 285 operator has higher priority than OR for the purposes of 286 evaluating logical expressions. 288 * The length of value field for this operand is given as (1 << 289 len). 291 * Lt - less than comparison between data and value. 293 * gt - greater than comparison between data and value. 295 * eq - equality between data and value. 297 * The bits lt, gt, and eq can be combined to produce "less or 298 equal", "greater or equal" and inequality values. 300 Type 4 - Port 302 Encoding: 304 Defines a list of {operation, value} pairs that matches source 305 OR destination TCP/UDP ports. This list is encoded using the 306 numeric operand format defined above. Values are encoded as 1 307 or 2 byte quantities. 309 Type 5 - Destination port 311 Encoding: 313 Defines a list of {operation, value} pairs used to match the 314 destination port of a TCP or UDP packet. Values are encoded as 315 1 or 2 byte quantities. 317 Type 6 - Source port 319 Encoding: 320 Defines a list of {operation, value} pairs used to match the 321 source port of a TCP or UDP packet. Values are encoded as 1 or 322 2 byte quantities. 324 Type 7 - ICMP type 326 Encoding: 328 Defines a list of {operation, value} pairs used to match the 329 type field of an icmp packet. Values are encoded using a 330 single byte. 332 Type 8 - ICMP code 334 Encoding: 336 Defines a list of {operation, value} pairs used to match the 337 code field of an icmp packet. Values are encoded using a 338 single byte. 340 Type 9 - TCP flags 342 Encoding: 344 Bitmask values are encoded using a single byte, using the bit 345 definitions specified in the TCP header format [RFC0793]. 347 This type uses the bitmask operand format, which differs from 348 the numeric operator format in the lower nibble. 350 7 6 5 4 3 2 1 0 351 +---+---+---+---+---+---+---+---+ 352 | e | a | len | 0 | 0 |not| m | 353 +---+---+---+---+---+---+---+---+ 355 * Top nibble: (End of List bit, And bit and Length field), as 356 defined for in the numeric operator format. 358 * Not bit. If set, logical negation of operation. 360 * Match bit. If set this is a bitwise match operation defined as 361 "(data & value) == value"; if unset (data & value) evaluates to 362 true if any of the bits in the value mask are set in the data. 364 Type 10 - Packet length 365 Encoding: 367 Match on the total IP packet length (excluding L2 but including 368 IP header). Values are encoded using as 1 or 2 byte 369 quantities. 371 Type 11 - DSCP 373 Encoding: 375 Defines a list of {operation, value} pairs used to match the IP 376 TOS octet. 378 Type 12 - Fragment 380 Encoding: 382 Uses bitmask operand format defined above. 384 Bitmask values: 386 + Bit 0 - Dont fragment 388 + Bit 1 - Is a fragment 390 + Bit 2 - First fragment 392 + Bit 3 - Last fragment 394 Flow specification components must follow strict type ordering. A 395 given component type may or may not be present in the specification, 396 but if present it MUST precede any component of higher numeric type 397 value. 399 If a given component type within a prefix in unknown, the prefix in 400 question cannot be used for traffic filtering purposes by the 401 receiver. Since a Flow Specification as the semantics of a logical 402 AND of all components, if a component is FALSE by definition it 403 cannot be applied. However for the purposes of BGP route propagation 404 this prefix should still be transmitted since BGP route distribution 405 is independent on NLRI semantics. 407 Flow specification components are to be interpreted as a bit match at 408 a given packet offset. When more than one component in a flow 409 specification tests the same packet offset the behavior is 410 undetermined. 412 The encoding is chosen in order to account for future 413 extensibility. 415 An example of a Flow Specification encoding for: "all packets to 416 10.0.1/24 and TCP port 25". 418 +------------------+----------+----------+ 419 | destination | proto | port | 420 +------------------+----------+----------+ 421 | 0x01 18 0a 00 01 | 03 81 06 | 04 81 19 | 422 +------------------+----------+----------+ 424 Decode for protocol: 426 +-------+----------+------------------------------+ 427 | Value | | | 428 +-------+----------+------------------------------+ 429 | 0x03 | type | | 430 | 0x81 | operator | end-of-list, value size=1, = | 431 | 0x06 | value | | 432 +-------+----------+------------------------------+ 434 An example of a Flow Specification encoding for: "all packets to 435 10.0.1/24 from 192/8 and port {range [137, 139] or 8080}". 437 +------------------+----------+-------------------------+ 438 | destination | source | port | 439 +------------------+----------+-------------------------+ 440 | 0x01 18 0a 01 01 | 02 08 c0 | 04 03 89 45 8b 91 1f 90 | 441 +------------------+----------+-------------------------+ 443 Decode for port: 445 +--------+----------+------------------------------+ 446 | Value | | | 447 +--------+----------+------------------------------+ 448 | 0x04 | type | | 449 | 0x03 | operator | size=1, >= | 450 | 0x89 | value | 137 | 451 | 0x45 | operator | &, value size=1, <= | 452 | 0x8b | value | 139 | 453 | 0x91 | operator | end-of-list, value-size=2, = | 454 | 0x1f90 | value | 8080 | 455 +--------+----------+------------------------------+ 457 This constitutes a NLRI with an NLRI length of 16 octets. 459 Implementations wishing to exchange flow specification rules MUST use 460 BGP's Capability Advertisement facility to exchange the Multiprotocol 461 Extension Capability Code (Code 1) as defined in RFC4760 [RFC4760]. 462 The (AFI, SAFI) pair carried in the Multiprotocol Extension 463 capability MUST be the same as the one used to identify a particular 464 application that uses this NLRI-type. 466 5. Traffic filtering 468 Traffic filtering policies have been traditionally considered to be 469 relatively static. 471 The popularity of traffic-based denial of service (DoS) attacks, 472 which often requires the network operator to be able to use traffic 473 filters for detection and mitigation, brings with it requirements 474 that are not fully satisfied by existing tools. 476 Increasingly, DoS mitigation, requires coordination among several 477 Service Providers, in order to be able to identify traffic source(s) 478 and because the volumes of traffic may be such that they will 479 otherwise significantly affect the performance of the network. 481 Several techniques are currently used to control traffic filtering of 482 DoS attacks. Among those, one of the most common is to inject 483 unicast route advertisements corresponding to a destination prefix 484 being attacked. One variant of this technique marks such route 485 advertisements with a community that gets translated into a discard 486 next-hop by the receiving router. Other variants, attract traffic to 487 a particular node that serves as a deterministic drop point. 489 Using unicast routing advertisements to distribute traffic filtering 490 information has the advantage of using the existing infrastructure 491 and inter-as communication channels. This can allow, for instance, 492 for a service provider to accept filtering requests from customers 493 for address space they own. 495 There are several drawbacks, however. An issue that is immediately 496 apparent is the granularity of filtering control: only destination 497 prefixes may be specified. Another area of concern is the fact that 498 filtering information is intermingled with routing information. 500 The mechanism defined in this document is designed to address these 501 limitations. We use the flow specification NLRI defined above to 502 convey information about traffic filtering rules for traffic that 503 should be discarded. 505 This mechanism is designed to, primarily, allow an upstream 506 autonomous system to perform inbound filtering, in their ingress 507 routers of traffic that a given downstream AS wishes to drop. 509 In order to achieve that goal, we define an application specific NLRI 510 identifier (AFI=1, SAFI=133) along with specific semantic rules. 512 BGP routing updates containing this identifier use the flow 513 specification NLRI encoding to convey particular aggregated flows 514 that require special treatment. 516 Flow routing information received via this (afi, safi) pair is 517 subject to the validation procedure detailed bellow. 519 5.1. Order of traffic filtering rules 521 With traffic filtering rules, more than one rule may match a 522 particular traffic flow. Thus it is necessary to define the order at 523 which rules get matched and applied to a particular traffic flow. 524 This ordering function must be such that it must not depend on the 525 arrival order of the flow specifications rules and must be constant 526 in the network. 528 We choose to order traffic filtering rules such that the order of two 529 flow specifications is given by the comparison of NLRI key byte 530 strings as defined by the memcmp() function is the ISO C standard. 532 Given the way that flow specifications are encoded this results in a 533 flow with a less-specific destination IP prefix being considered 534 less-than (and thus match before) a flow specification with a more- 535 specific destination IP prefix. 537 This matches an application model where the user may want to define a 538 restriction that affects an aggregate of traffic and a subsequent 539 rule that applies only to a subset of that. 541 A flow-specification without a destination IP prefix is considered to 542 match after all flow-specifications that contain an IP destination 543 prefix. 545 6. Validation procedure 547 Flow specifications received from a BGP peer and which are accepted 548 in the respective Adj-RIB-In are used as input to the route selection 549 process. Although the forwarding attributes of two routes for the 550 same Flow Specification prefix may be the same, BGP is still required 551 to perform its path selection algorithm in order to select the 552 correct set of attributes to advertise. 554 The first step of the BGP Route Selection procedure (section 9.1.2 of 555 [RFC4271]) is to exclude from the selection procedure routes that are 556 considered non-feasible. In the context of IP routing information 557 this step is used to validate that the NEXT_HOP attribute of a given 558 route is resolvable. 560 The concept can be extended, in the case of Flow Specification NLRI, 561 to allow other validation procedures. 563 A flow specification NLRI must be validated such that it is 564 considered feasible if and only if: 566 a) The originator of the flow specification matches the originator of 567 the best-match unicast route for the destination prefix embedded 568 in the flow specification. 570 b) There are no more-specific unicast routes, when compared with the 571 flow destination prefix, that have been received from a different 572 neighboring AS than the best-match unicast route, which has been 573 determined in step a). 575 By originator of a BGP route, we mean either the BGP originator path 576 attribute, as used by route reflection, or the transport address of 577 the BGP peer, if this path attribute is not present. 579 The underlying concept is that the neighboring AS that advertises the 580 best unicast route for a destination is allowed to advertise flow- 581 spec information that conveys a more or equally specific destination 582 prefix. This, as long as there are no more-specific unicast routes, 583 received from a different neighbor AS, which would be affected by 584 that filtering rule. 586 The neighboring AS is the immediate destination of the traffic 587 described by the Flow Specification. If it requests these flows to 588 be dropped that request can be honored without concern that it 589 represents a denial of service in itself. Supposedly, the traffic is 590 being dropped by the downstream autonomous-system and there is no 591 added value in carrying the traffic to it. 593 BGP implementations MUST also enforce that the AS_PATH attribute of a 594 route received via eBGP contains the neighboring AS in the left-most 595 position of the AS_PATH attribute. While this rule is optional in 596 the BGP specification, it becomes necessary to enforce it for 597 security reasons. 599 7. Traffic Filtering Actions 601 This specification defines a minimum set of filtering actions that it 602 standardizes as BGP extended community values [RFC4360]. This is not 603 meant to be an inclusive list of all the possible actions but only a 604 subset that can be interpreted consistently across the network. 606 Implementations should provide mechanisms that map an arbitrary bgp 607 community value (normal or extended) to filtering actions that 608 require different mappings in different systems in the network. For 609 instance, providing packets with a worse than best-effort per-hop 610 behavior is a functionality that is likely to be implemented 611 differently in different systems and for which no standard behavior 612 is currently known. Rather than attempting to define it here, this 613 can be accomplished by mapping a user defined community value to 614 platform / network specific behavior via user configuration. 616 The default action for a traffic filtering flow specification is to 617 accept IP traffic that matches that particular rule. 619 The following extended community values can be used to specify 620 particular actions. 622 +--------+--------------------+--------------------------+ 623 | type | extended community | encoding | 624 +--------+--------------------+--------------------------+ 625 | 0x8006 | traffic-rate | 2-byte as#, 4-byte float | 626 | 0x8007 | traffic-action | bitmask | 627 | 0x8008 | redirect | 6-byte Route Target | 628 +--------+--------------------+--------------------------+ 630 Traffic-rate The traffic-rate extended community is a non-transitive 631 extended community across the Autonomous system boundary and uses 632 following extended community encoding: 634 The first two octets carry the 2 octet id which can be assigned 635 from a 2 byte AS number. When 4 byte AS number is locally 636 present 2 least significant bytes of such AS number can be 637 used. 639 The remaining 4 octets carry the rate information in IEEE 640 floating point format, units being bytes per second. A 641 traffic-rate of 0 should result on all traffic for the 642 particular flow to be discarded. 644 Traffic-action The traffic-action extended community consists of 6 645 bytes of which only the 2 least significant bits of the 6th byte 646 (from left to right) are currently defined. 648 * Terminal action (bit 0). When this bit is set the traffic 649 filtering engine will apply any subsequent filtering rules (as 650 defined by the ordering procedure). If not set the evaluation 651 of the traffic filter stops when this rule is applied. 653 * Sample (bit 1). Enables traffic sampling and logging for this 654 flow specification. 656 Redirect The redirect extended community allows the traffic to be 657 redirected to a VRF routing instance that list the specified 658 route-target in its import policy. If several local instances 659 match this criteria, the choice between them is a local matter 660 (for example, the instance with the lowest Route Distinguisher 661 value can be elected). The traffic marking extended community 662 instruct a system to modify the DSCP bits of a transiting IP 663 packet to the corresponding value. This extended community is 664 encoded as a sequence of 5 zero bytes followed by the DSCP value. 666 8. Traffic filtering in RFC2547bis networks 668 Provider-based layer 3 VPN networks, such as the ones using an BGP/ 669 MPLS IP VPN [RFC4364] control plane, have different traffic filtering 670 requirements than internet service providers. 672 In these environments, the VPN customer network often has traffic 673 filtering capabilities towards their external network connections 674 (e.g. firewall facing public network connection). Less common is the 675 presence of traffic filtering capabilities between different VPN 676 attachment sites. In an any-to-any connectivity model, which is the 677 default, this means that site to site traffic is unfiltered. 679 In circumstances where a security threat does get propagated inside 680 the VPN customer network, there may not be readily available 681 mechanisms to provide mitigation via traffic filter. 683 This document proposes an additional BGP NLRI type (afi=1, safi=134) 684 value, which can be used to propagate traffic filtering information 685 in a BGP/MPLS VPN environment. 687 The NLRI format for this address family consists of a fixed length 688 Route Distinguisher field (8 bytes) followed by a flow specification, 689 following the encoded defined in this document. The NLRI length 690 field shall includes the both 8 bytes of the Route Distinguisher as 691 well as the subsequent flow specification. 693 Propagation of this NLRI is controlled by matching Route Target 694 extended communities associated with the BGP path advertisement with 695 the VRF import policy, using the same mechanism as described in "BGP/ 696 MPLS IP VPNs" [RFC4364] . 698 Flow specification rules received via this NLRI apply only to traffic 699 that belongs to the VRF(s) in which it is imported. By default, 700 traffic received from a remote PE is switched via an mpls forwarding 701 decision and is not subject to filtering. 703 Contrary to the behavior specified for the non-VPN NLRI, flow rules 704 are accepted by default, when received from remote PE routers. 706 9. Monitoring 708 Traffic filtering applications require monitoring and traffic 709 statistics facilities. While this is an implementation specific 710 choice, implementations SHOULD provide: 712 o A mechanism to log the packet header of filtered traffic, 714 o A mechanism to count the number of matches for a given Flow 715 Specification rule. 717 10. Security considerations 719 Inter-provider routing is based on a web of trust. Neighboring 720 autonomous-systems are trusted to advertise valid reachability 721 information. If this trust model is violated, a neighboring 722 autonomous system may cause a denial of service attack by advertising 723 reachability information for a given prefix for which it does not 724 provide service. 726 As long as traffic filtering rules are restricted to match the 727 corresponding unicast routing paths for the relevant prefixes, the 728 security characteristics of this proposal are equivalent to the 729 existing security properties of BGP unicast routing. 731 Where it not the case, this would open the door to further denial of 732 service attacks. 734 Enabling firewall like capabilities in routers without centralized 735 management could make certain failures harder to diagnose. For 736 example, with the extensions it is possible to allow TCP packets to 737 pass between a pair of addresses but not ICMP packets. It would also 738 be possible to permit packets smaller than 900 or greater than 1000 739 bytes to pass between a pair of addresses, but not packets whose 740 length is in the range 900 &mdash 1000. The Internet has become 741 sufficiently aware of firewalls that such behavior is less likely to 742 be confusing than it was a few years ago and there are no new 743 capabilities introduced by these extensions, just an increased 744 likelihood that such capabilities will be used. 746 11. IANA Considerations 748 A flow specification consists of a sequence of flow components, which 749 are identified by a an 8-bit component type. Types must be assigned 750 and interpreted uniquely. The current specification defines types 1 751 though 12, with the value 0 being reserved. 753 For the purpose of this work IANA has allocated values for two SAFIs: 754 SAFI 133 for IPv4 and SAFI 134 for VPNv4 dissemination of flow 755 specification rules. 757 The following traffic filtering flow specification rules are to be 758 allocated by IANA from BGP Extended Communities Type - Experimental 759 Use registry. Authors recommend the following type values: 761 0x8006 - Flow spec traffic-rate 763 0x8007 - Flow spec traffic-action 765 0x8008 - Flow spec redirect 767 Authors would like to ask IANA to create and maintain a new registry 768 entitled: "Flow Spec Component Type". Authors recommend to allocate 769 the following component types: 771 Type 1 - Destination Prefix 773 Type 2 - Source Prefix 775 Type 3 - IP Protocol 777 Type 4 - Port 779 Type 5 - Destination port 781 Type 6 - Source port 783 Type 7 - ICMP type 785 Type 8 - ICMP code 787 Type 9 - TCP flags 789 Type 10 - Packet length 790 Type 11 - DSCP 792 Type 12 - Fragment 794 In order to manage the limited number space and accommodate several 795 usages the following policies defined by RFC 5226 [RFC5226] are used: 797 +--------------+-------------------------------+ 798 | Range | Policy | 799 +--------------+-------------------------------+ 800 | 0 | Invalid value | 801 | [1 .. 12] | Defined by this specification | 802 | [13 .. 127] | Specification Required | 803 | [128 .. 255] | Private Use | 804 +--------------+-------------------------------+ 806 The specification of a particular "flow component type" must clearly 807 identify what is the criteria used to match packets forwarded by the 808 router. This criteria should be meaningful across router hops and 809 not depend on values that change hop-by-hop such as ttl or layer-2 810 encapsulation. 812 The "Traffic-action" extended community defined in this document has 813 6 unused bits which can be used to convey additional meaning. 814 Authors would like to ask IANA to create and maintain a new registry 815 entitled: "Traffic Action Fields". These values should be assigned 816 via IETF Consensus rules only. Authors recommend to allocate the 817 following traffic action fields: 819 0 Terminal Action 821 1 Sample 823 2-47 Unassigned 825 12. Acknowledgments 827 The authors would like to thank Yakov Rekhter, Dennis Ferguson, Chris 828 Morrow and Charlie Kaufman for their comments. 830 Chaitanya Kodeboyina helped design the flow validation procedure. 832 Steven Lin and Jim Washburn ironed out all the details necessary to 833 produce a working implementation. 835 13. Normative References 837 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 838 RFC 793, September 1981. 840 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 841 Requirement Levels", BCP 14, RFC 2119, March 1997. 843 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 844 Protocol 4 (BGP-4)", RFC 4271, January 2006. 846 [RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended 847 Communities Attribute", RFC 4360, February 2006. 849 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 850 Networks (VPNs)", RFC 4364, February 2006. 852 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 853 "Multiprotocol Extensions for BGP-4", RFC 4760, 854 January 2007. 856 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 857 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 858 May 2008. 860 Authors' Addresses 862 Pedro Marques 863 Juniper Networks 864 1194 N. Mathilda Ave. 865 Sunnyvale, CA 94089 866 US 868 Email: roque@juniper.net 870 Nischal Sheth 871 Juniper Networks 872 1194 N. Mathilda Ave. 873 Sunnyvale, CA 94089 874 US 876 Email: nsheth@juniper.net 877 Robert Raszuk 878 Juniper Networks 879 1194 N. Mathilda Ave. 880 Sunnyvale, CA 94089 881 US 883 Email: raszuk@juniper.net 885 Barry Greene 886 Juniper Networks 887 1194 N. Mathilda Ave. 888 Sunnyvale, CA 94089 889 US 891 Email: bgreene@juniper.net 893 Jared Mauch 894 NTT/Verio 895 8285 Reese Lane 896 Ann Arbor, MI 48103-9753 897 US 899 Email: jared@puck.nether.net 901 Danny McPherson 902 Arbor Networks 904 Email: danny@arbor.net