idnits 2.17.1 draft-ietf-idr-flow-spec-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 21. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 878. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 889. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 896. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 902. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust 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 (November 20, 2008) is 5629 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 403 -- Looks like a reference, but probably isn't: '139' on line 403 == Missing Reference: 'RFC2434' is mentioned on line 783, but not defined ** Obsolete undefined reference: RFC 2434 (Obsoleted by RFC 5226) == Missing Reference: 'RFC4020' is mentioned on line 782, but not defined ** Obsolete undefined reference: RFC 4020 (Obsoleted by RFC 7120) ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 9 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 Expires: May 24, 2009 R. Raszuk 5 B. Greene 6 Juniper Networks 7 J. Mauch 8 NTT/Verio 9 D. McPherson 10 Arbor Networks 11 November 20, 2008 13 Dissemination of flow specification rules 14 draft-ietf-idr-flow-spec-03 16 Status of this Memo 18 By submitting this Internet-Draft, each author represents that any 19 applicable patent or other IPR claims of which he or she is aware 20 have been or will be disclosed, and any of which he or she becomes 21 aware will be disclosed, in accordance with Section 6 of BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF), its areas, and its working groups. Note that 25 other groups may also distribute working documents as Internet- 26 Drafts. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 The list of current Internet-Drafts can be accessed at 34 http://www.ietf.org/ietf/1id-abstracts.txt. 36 The list of Internet-Draft Shadow Directories can be accessed at 37 http://www.ietf.org/shadow.html. 39 This Internet-Draft will expire on May 24, 2009. 41 Abstract 43 This document defines a new BGP NLRI encoding format that can be used 44 to distribute traffic flow specifications. This allows the routing 45 system to propagate information regarding more-specific components of 46 the traffic aggregate defined by an IP destination prefix. 48 Additionally it defines two applications of that encoding format. 49 One that can be used to automate inter-domain coordination of traffic 50 filtering, such as what is required in order to mitigate 51 (distributed) denial of service attacks. And a second application to 52 traffic filtering in the context of a BGP/MPLS VPN service. 54 The information is carried via the Border Gateway Protocol (BGP), 55 thereby reusing protocol algorithms, operational experience and 56 administrative processes such as inter-provider peering agreements. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 2. Flow specifications . . . . . . . . . . . . . . . . . . . . . 6 62 3. Dissemination of Information . . . . . . . . . . . . . . . . . 7 63 4. Traffic filtering . . . . . . . . . . . . . . . . . . . . . . 13 64 4.1. Order of traffic filtering rules . . . . . . . . . . . . . 14 65 5. Validation procedure . . . . . . . . . . . . . . . . . . . . . 15 66 6. Traffic Filtering Actions . . . . . . . . . . . . . . . . . . 17 67 7. Traffic filtering in RFC2547bis networks . . . . . . . . . . . 19 68 8. Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . 20 69 9. Security considerations . . . . . . . . . . . . . . . . . . . 21 70 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 71 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 24 72 12. Normative References . . . . . . . . . . . . . . . . . . . . . 25 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 26 74 Intellectual Property and Copyright Statements . . . . . . . . . . 28 76 1. Introduction 78 Modern IP routers contain both the capability to forward traffic 79 according to aggregate IP prefixes as well as to classify, shape, 80 limit filter or redirect packets based on administratively defined 81 policies. 83 While forwarding information is, typically, dynamically signaled 84 across the network via routing protocols, there is no agreed upon 85 mechanism to dynamically signal flows across autonomous-systems. 87 For several applications, it may be necessary to exchange control 88 information pertaining to aggregated traffic flow definitions which 89 cannot be expressed using destination address prefixes only. 91 An aggregated traffic flow is considered to be an n-tuple consisting 92 of several matching criteria such as source and destination address 93 prefixes, IP protocol and transport protocol port numbers. 95 The intention of this document is to define a general procedure to 96 encode such flow specification rules as a BGP [RFC4271] NLRI which 97 can be reused for several different control applications. 98 Additionally, we define the required mechanisms to utilize this 99 definition to the problem of immediate concern to the authors: intra 100 and inter provider distribution of traffic filtering rules to filter 101 (Distributed) Denial of Service (DoS) attacks. 103 By expanding routing information with flow specifications, the 104 routing system can take advantage of the ACL/firewall capabilities in 105 the router's forwarding path. Flow specifications can be seen as 106 more specific routing entries to an unicast prefix and are expected 107 to depend upon the existing unicast data information. 109 A flow specification received from a external autonomous-system will 110 need to be validated against unicast routing before being accepted. 111 If the aggregate traffic flow defined by the unicast destination 112 prefix is forwarded to a given BGP peer, then the local system can 113 safely install more specific flow rules which result in different 114 forwarding behavior, as requested by this system. 116 The choice of BGP as the carrier of this control information is also 117 justifiable by the fact that the key issues in terms of complexity 118 are problems which are common to unicast route distribution and have 119 already been solved in the current environment. 121 From an algorithmic perspective, the main problem that presents 122 itself is the loop-free distribution of pairs from 123 one originator to N ingresses. The key, in this particular instance, 124 being a flow specification. 126 From an operational perspective, the utilization of BGP as the 127 carrier for this information, allows a network service provider to 128 reuse both internal route distribution infrastructure (e.g.: route 129 reflector or confederation design) and existing external 130 relationships (e.g.: inter-domain BGP sessions to a customer 131 network). 133 While it is certainly possible to address this problem using other 134 mechanisms, the authors believe that this solution offers the 135 substantial advantage of being an incremental addition to deployed 136 mechanisms. 138 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 139 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 140 document are to be interpreted as described in RFC 2119 [RFC2119]. 142 2. Flow specifications 144 A flow specification is an n-tuple consisting on several matching 145 criteria that can be applied to IP traffic. A given IP packet is 146 said to match the defined flow if it matches all the specified 147 criteria. 149 A given flow may be associated with a set of attributes, depending on 150 the particular application, such attributes may or may not include 151 reachability information (i.e. NEXT_HOP). Well-known or AS-specific 152 community attributes can be used to encode a set of predeterminate 153 actions. 155 A particular application is identified by a specific (AFI, SAFI) pair 156 [RFC4760] and corresponds to a distinct set of RIBs. Those RIBs 157 should be treated independently from each other in order to assure 158 non-interference between distinct applications. 160 BGP itself treats the NLRI as an opaque key to an entry in its 161 databases. Entries that are placed in the Loc-RIB are then 162 associated with a given set of semantics which is application 163 dependent. This is consistent with existing BGP applications. For 164 instance IP unicast routing (AFI=1, SAFI=1) and IP multicast reverse- 165 path information (AFI=1, SAFI=2) are handled by BGP without any 166 particular semantics being associated with them until installed in 167 the Loc-RIB. 169 Standard BGP policy mechanisms, such as UPDATE filtering by NLRI 170 prefix and community matching, SHOULD apply to the newly defined 171 NLRI-type. Network operators can also control propagation of such 172 routing updates by enabling or disabling the exchange of a particular 173 (AFI, SAFI) pair on a given BGP peering session. 175 3. Dissemination of Information 177 We define a "Flow Specification" NLRI type that may include several 178 components such as destination prefix, source prefix, protocol, 179 ports, etc. This NLRI is treated as an opaque bit string prefix by 180 BGP. Each bit string identifies a key to a database entry which a 181 set of attributes can be associated with. 183 This NLRI information is encoded using MP_REACH_NLRI and 184 MP_UNREACH_NLRI attributes as defined in RFC4760 [RFC4760]. Whenever 185 the corresponding application does not require Next Hop information, 186 this shall be encoded as a 0 octet length Next Hop in the 187 MP_REACH_NLRI attribute and ignored on receipt. 189 The NLRI field of the MP_REACH_NLRI and MP_UNREACH_NLRI is encoded as 190 a 1 or 2 octet NLRI length field followed by a variable length NLRI 191 value. The NLRI length is expressed in octets. 193 +------------------------------+ 194 | length (0xnn or 0xfn nn) | 195 +------------------------------+ 196 | NLRI value (variable) | 197 +------------------------------+ 199 flow-spec NLRI 201 If the NLRI length value is smaller than 240 (0xf0 hex), the length 202 field can be encoded as a single octet. Otherwise, it is encoded as 203 a extended length 2 octet value in which the most significant nibble 204 of the first byte is all ones. 206 The Flow Specification NLRI-type consists of several optional 207 subcomponents. A specific packet is considered to match the flow 208 specification when it matches the intersection (AND) of all the 209 components present in the specification. 211 The following component types are defined: 213 Type 1 - Destination Prefix 215 Encoding: 217 Defines the destination prefix to match. Prefixes are encoded 218 as in BGP UPDATE messages, a length in bits is followed by 219 enough octets to contain the prefix information. 221 Type 2 - Source Prefix 223 Encoding: 225 Defines the source prefix to match. 227 Type 3 - IP Protocol 229 Encoding: 231 Contains a set of {operator, value} pairs that are used to 232 match IP protocol value byte in IP packets. 234 The operator byte is encoded as: 236 7 6 5 4 3 2 1 0 237 +---+---+---+---+---+---+---+---+ 238 | e | a | len | 0 |lt |gt |eq | 239 +---+---+---+---+---+---+---+---+ 241 Numeric operator 243 + End of List bit. Set in the last {op, value} pair in the 244 list. 246 + And bit. If unset the previous term is logically ORed with 247 the current one. If set the operation is a logical AND. It 248 should be unset in the first operator byte of a sequence. 249 The AND operator has higher priority than OR for the 250 purposes of evaluating logical expressions. 252 + The length of value field for this operand is given as (1 << 253 len). 255 + Lt - less than comparison between data and value. 257 + gt - greater than comparison between data and value. 259 + eq - equality between data and value. 261 The bits lt, gt, and eq can be combined to produce "less or 262 equal", "greater or equal" and inequality values. 264 Type 4 - Port 266 Encoding: 267 Defines a list of {operation, value} pairs that matches source 268 OR destination TCP/UDP ports. This list is encoded using the 269 numeric operand format defined above. Values are encoded as 1 270 or 2 byte quantities. 272 Type 5 - Destination port 274 Encoding: 276 Defines a list of {operation, value} pairs used to match the 277 destination port of a TCP or UDP packet. Values are encoded as 278 1 or 2 byte quantities. 280 Type 6 - Source port 282 Encoding: 284 Defines a list of {operation, value} pairs used to match the 285 source port of a TCP or UDP packet. Values are encoded as 1 or 286 2 byte quantities. 288 Type 7 - ICMP type 290 Encoding: 292 Defines a list of {operation, value} pairs used to match the 293 type field of an icmp packet. Values are encoded using a 294 single byte. 296 Type 8 - ICMP code 298 Encoding: 300 Defines a list of {operation, value} pairs used to match the 301 code field of an icmp packet. Values are encoded using a 302 single byte. 304 Type 9 - TCP flags 306 Encoding: 308 Bitmask values are encoded using a single byte, using the bit 309 definitions specified in the TCP header format [RFC0793]. 311 This type uses the bitmask operand format, which differs from 312 the numeric operator format in the lower nibble. 314 7 6 5 4 3 2 1 0 315 +---+---+---+---+---+---+---+---+ 316 | e | a | len | 0 | 0 |not| m | 317 +---+---+---+---+---+---+---+---+ 319 + Top nibble: (End of List bit, And bit and Length field), as 320 defined for in the numeric operator format. 322 + Not bit. If set, logical negation of operation. 324 + Match bit. If set this is a bitwise match operation defined 325 as "(data & value) == value"; if unset (data & value) 326 evaluates to true if and of the bits in the value mask are 327 set in the data. 329 Type 10 - Packet length 331 Encoding: 333 Match on the total IP packet length (excluding L2 but including 334 IP header). Values are encoded using as 1 or 2 byte 335 quantities. 337 Type 11 - DSCP 339 Encoding: 341 Defines a list of {operation, value} pairs used to match the IP 342 TOS octet. 344 Type 12 - Fragment 346 Encoding: 348 Uses bitmask operand format defined above. 350 Bitmask values: 352 + Bit 0 - Dont fragment 354 + Bit 1 - Is a fragment 356 + Bit 2 - First fragment 358 + Bit 3 - Last fragment 360 Flow specification components must follow strict type ordering. A 361 given component type may or may not be present in the specification, 362 but if present it MUST precede any component of higher numeric type 363 value. 365 If a given component type within a prefix in unknown, the prefix in 366 question cannot be used for traffic filtering purposes by the 367 receiver. Since a Flow Specification as the semantics of a logical 368 AND of all components, if a component is FALSE by definition it 369 cannot be applied. However for the purposes of BGP route propagation 370 this prefix should still be transmitted since BGP route distribution 371 is independent on NLRI semantics. 373 Flow specification components are to be interpreted as a bit match at 374 a given packet offset. When more than one component in a flow 375 specification tests the same packet offset the behavior is 376 undetermined. 378 The encoding is chosen in order to account for future 379 extensibility. 381 An example of a Flow Specification encoding for: "all packets to 382 10.0.1/24 and TCP port 25". 384 +------------------+----------+----------+ 385 | destination | proto | port | 386 +------------------+----------+----------+ 387 | 0x01 18 0a 00 01 | 03 81 06 | 04 81 19 | 388 +------------------+----------+----------+ 390 Decode for protocol: 392 +-------+----------+------------------------------+ 393 | Value | | | 394 +-------+----------+------------------------------+ 395 | 0x03 | type | | 396 | | | | 397 | 0x81 | operator | end-of-list, value size=1, = | 398 | | | | 399 | 0x06 | value | | 400 +-------+----------+------------------------------+ 402 An example of a Flow Specification encoding for: "all packets to 403 10.0.1/24 from 192/8 and port {range [137, 139] or 8080}". 405 +------------------+----------+-------------------------+ 406 | destination | source | port | 407 +------------------+----------+-------------------------+ 408 | 0x01 18 0a 01 01 | 02 08 c0 | 04 03 89 45 8b 91 1f 90 | 409 +------------------+----------+-------------------------+ 410 Decode for port: 412 +--------+----------+------------------------------+ 413 | Value | | | 414 +--------+----------+------------------------------+ 415 | 0x04 | type | | 416 | | | | 417 | 0x03 | operator | size=1, >= | 418 | | | | 419 | 0x89 | value | 137 | 420 | | | | 421 | 0x45 | operator | &, value size=1, <= | 422 | | | | 423 | 0x8b | value | 139 | 424 | | | | 425 | 0x91 | operator | end-of-list, value-size=2, = | 426 | | | | 427 | 0x1f90 | value | 8080 | 428 +--------+----------+------------------------------+ 430 This constitutes a NLRI with an NLRI length of 16 octets. 432 Implementations wishing to exchange flow specification rules MUST use 433 BGP's Capability Advertisement facility to exchange the Multiprotocol 434 Extension Capability Code (Code 1) as defined in RFC4760 [RFC4760]. 435 The (AFI, SAFI) pair carried in the Multiprotocol Extension 436 capability MUST be the same as the one used to identify a particular 437 application that uses this NLRI-type. 439 4. Traffic filtering 441 Traffic filtering policies have been traditionally considered to be 442 relatively static. 444 The popularity of traffic-based denial of service (DoS) attacks, 445 which often requires the network operator to be able to use traffic 446 filters for detection and mitigation, brings with it requirements 447 that are not fully satisfied by existing tools. 449 Increasingly, DoS mitigation, requires coordination among several 450 Service Providers, in order to be able to identify traffic source(s) 451 and because the volumes of traffic may be such that they will 452 otherwise significantly affect the performance of the network. 454 Several techniques are currently used to control traffic filtering of 455 DoS attacks. Among those, one of the most common is to inject 456 unicast route advertisements corresponding to a destination prefix 457 being attacked. One variant of this technique marks such route 458 advertisements with a community that gets translated into a discard 459 next-hop by the receiving router. Other variants, attract traffic to 460 a particular node that serves as a deterministic drop point. 462 Using unicast routing advertisements to distribute traffic filtering 463 information has the advantage of using the existing infrastructure 464 and inter-as communication channels. This can allow, for instance, 465 for a service provider to accept filtering requests from customers 466 for address space they own. 468 There are several drawbacks, however. An issue that is immediately 469 apparent is the granularity of filtering control: only destination 470 prefixes may be specified. Another area of concern is the fact that 471 filtering information is intermingled with routing information. 473 The mechanism defined in this document is designed to address these 474 limitations. We use the flow specification NLRI defined above to 475 convey information about traffic filtering rules for traffic that 476 should be discarded. 478 This mechanism is designed to, primarily, allow an upstream 479 autonomous system to perform inbound filtering, in their ingress 480 routers of traffic that a given downstream AS wishes to drop. 482 In order to achieve that goal, we define an application specific NLRI 483 identifier (AFI=1, SAFI=133) along with specific semantic rules. 485 BGP routing updates containing this identifier use the flow 486 specification NLRI encoding to convey particular aggregated flows 487 that require special treatment. 489 Flow routing information received via this (afi, safi) pair is 490 subject to the validation procedure detailed bellow. 492 4.1. Order of traffic filtering rules 494 With traffic filtering rules, more than one rule may match a 495 particular traffic flow. Thus it is necessary to define the order at 496 which rules get matched and applied to a particular traffic flow. 497 This ordering function must be such that it must not depend on the 498 arrival order of the flow specifications rules and must be constant 499 in the network. 501 We choose to order traffic filtering rules such that the order of two 502 flow specifications is given by the comparison of NLRI key byte 503 strings as defined by the memcmp() function is the ISO C standard. 505 Given the way that flow specifications are encoded this results in a 506 flow with a less-specific destination IP prefix being considered 507 less-than (and thus match before) a flow specification with a more- 508 specific destination IP prefix. 510 This matches an application model where the user may want to define a 511 restriction that affects an aggregate of traffic and a subsequent 512 rule that applies only to a subset of that. 514 A flow-specification without a destination IP prefix is considered to 515 match after all flow-specifications that contain an IP destination 516 prefix. 518 5. Validation procedure 520 Flow specifications received from a BGP peer and which are accepted 521 in the respective Adj-RIB-In are used as input to the route selection 522 process. Although the forwarding attributes of two routes for the 523 same Flow Specification prefix may be the same, BGP is still required 524 to perform its path selection algorithm in order to select the 525 correct set of attributes to advertise. 527 The first step of the BGP Route Selection procedure (section 9.1.2) 528 is to exclude from the selection procedure routes that are considered 529 non-feasible. In the context of IP routing information this step is 530 used to validate that the NEXT_HOP attribute of a given route is 531 resolvable. 533 The concept can be extended, in the case of Flow Specification NLRI, 534 to allow other validation procedures. 536 A flow specification NLRI must be validated such that it is 537 considered feasible if and only if: 539 a) The originator of the flow specification matches the originator of 540 the best-match unicast route for the destination prefix embedded 541 in the flow specification. 543 b) There are no more-specific unicast routes, when compared with the 544 flow destination prefix, that have been received from a different 545 neighboring AS than the best-match unicast route, which has been 546 determined in step a). 548 By originator of a BGP route, we mean either the BGP originator path 549 attribute, as used by route reflection, or the transport address of 550 the BGP peer, if this path attribute is not present. 552 The underlying concept is that the neighboring AS that advertises the 553 best unicast route for a destination is allowed to advertise flow- 554 spec information that conveys a more or equally specific destination 555 prefix. This, as long as there are no more-specific unicast routes, 556 received from a different neighbor AS, which would be affected by 557 that filtering rule. 559 The neighboring AS is the immediate destination of the traffic 560 described by the Flow Specification. If it requests these flows to 561 be dropped that request can be honored without concern that it 562 represents a denial of service in itself. Supposedly, the traffic is 563 being dropped by the downstream autonomous-system and there is no 564 added value in carrying the traffic to it. 566 BGP implementations MUST also enforce that the AS_PATH attribute of a 567 route received via eBGP contains the neighboring AS in the left-most 568 position of the AS_PATH attribute. While this rule is optional in 569 the BGP specification, it becomes necessary to enforce it for 570 security reasons. 572 6. Traffic Filtering Actions 574 This specification defines a minimum set of filtering actions that it 575 standardizes as BGP extended community values [RFC4360]. This is not 576 ment to be an inclusive list of all the possible actions but only a 577 subset that can be interpreted consistently across the network. 579 Implementations should provide mechanisms that map an arbitrary bgp 580 community value (normal or extended) to filtering actions that 581 require different mappings in different systems in the network. For 582 instance, providing packets with a worse than best-effort per-hop 583 behavior is a functionality that is likely to be implemented 584 differently in different systems and for which no standard behavior 585 is currently known. Rather than attempting to define it here, this 586 can be accomplished by mapping a user defined community value to 587 platform / network specific behavior via user configuration. 589 The default action for a traffic filtering flow specification is to 590 accept IP traffic that matches that particular rule. 592 The following extended community values can be used to specify 593 particular actions. 595 +--------+--------------------+--------------------------+ 596 | type | extended community | encoding | 597 +--------+--------------------+--------------------------+ 598 | 0x8006 | traffic-rate | 2-byte as#, 4-byte float | 599 | | | | 600 | 0x8007 | traffic-action | bitmask | 601 | | | | 602 | 0x8008 | redirect | 6-byte Route Target | 603 +--------+--------------------+--------------------------+ 605 Traffic-rate The traffic-rate extended community is a non-transitive 606 extended community across the Autonomous system boundary and uses 607 following extended community encoding: 609 The first two octets carry the 2 octet id which can be assigned 610 from a 2 byte AS number 612 The remaining 4 octets carry the rate information in IEEE 613 floating point format, units being bytes per second. A 614 traffic-rate of 0 should result on all traffic for the 615 particular flow to be discarded. 617 Traffic-action The traffic-action extended community consists of 6 618 bytes of which only the 2 least significant bits of the 6th byte 619 (from left to right) are currently defined. 621 * Terminal action (bit 0). When this bit is set the traffic 622 filtering engine will apply any subsequent filtering rules (as 623 defined by the ordering procedure). If not set the evaluation 624 of the traffic filter stops when this rule is applied. 626 * Sample (bit 1). Enables traffic sampling and logging for this 627 flow specification. 629 Redirect The redirect extended community allows the traffic to be 630 redirected to a VRF routing instance that list the specified 631 route-target in its import policy. If several local instances 632 match this criteria, the choice between them is a local matter 633 (for example, the instance with the lowest Route Distinguisher 634 value can be elected). The traffic marking extended community 635 instruct a system to modify the DSCP bits of a transiting IP 636 packet to the corresponding value. This extended community is 637 encoded as a sequence of 5 zero bytes followed by the DSCP value. 639 7. Traffic filtering in RFC2547bis networks 641 Provider-based layer 3 VPN networks, such as the ones using an BGP/ 642 MPLS IP VPN [RFC4364] control plane, have different traffic filtering 643 requirements than internet service providers. 645 In these environments, the VPN customer network often has traffic 646 filtering capabilities towards their external network connections 647 (e.g. firewall facing public network connection). Less common is the 648 presence of traffic filtering capabilities between different VPN 649 attachment sites. In an any-to-any connectivity model, which is the 650 default, this means that site to site traffic is unfiltered. 652 In circumstances where a security threat does get propagated inside 653 the VPN customer network, there may not be readily available 654 mechanisms to provide mitigation via traffic filter. 656 This document proposes an additional BGP NLRI type (afi=1, safi=134) 657 value, which can be used to propagate traffic filtering information 658 in a BGP/MPLS VPN environment. 660 The NLRI format for this address family consists of a fixed length 661 Route Distinguisher field (8 bytes) followed by a flow specification, 662 following the encoded defined in this document. The NLRI length 663 field shall includes the both 8 bytes of the Route Distinguisher as 664 well as the subsequent flow specification. 666 Propagation of this NLRI is controlled by matching Route Target 667 extended communities associated with the BGP path advertisement with 668 the VRF import policy, using the same mechanism as described in "BGP/ 669 MPLS IP VPNs" [RFC4364] . 671 Flow specification rules received via this NLRI apply only to traffic 672 that belongs to the VRF(s) in which it is imported. By default, 673 traffic received from a remote PE is switched via an mpls forwarding 674 decision and is not subject to filtering. 676 Contrary to the behavior specified for the non-VPN NLRI, flow rules 677 are accepted by default, when received from remote PE routers. 679 8. Monitoring 681 Traffic filtering applications require monitoring and traffic 682 statistics facilities. While this is an implementation specific 683 choice, implementations SHOULD provide: 685 o A mechanism to log the packet header of filtered traffic, 687 o A mechanism to count the number of matches for a given Flow 688 Specification rule. 690 9. Security considerations 692 Inter-provider routing is based on a web of trust. Neighboring 693 autonomous-systems are trusted to advertise valid reachability 694 information. If this trust model is violated, a neighboring 695 autonomous system may cause a denial of service attack by advertising 696 reachability information for a given prefix for which it does not 697 provide service. 699 As long as traffic filtering rules are restricted to match the 700 corresponding unicast routing paths for the relevant prefixes, the 701 security characteristics of this proposal are equivalent to the 702 existing security properties of BGP unicast routing. 704 Where it not the case, this would open the door to further denial of 705 service attacks. 707 10. IANA Considerations 709 A flow specification consists of a sequence of flow components, which 710 are identified by a an 8-bit component type. Types must be assigned 711 and interpreted uniquely. The current specification defines types 1 712 though 12, with the value 0 being reserved. 714 For the purpose of this work IANA has allocated values for two SAFIs: 715 SAFI 133 for IPv4 and SAFI 134 for VPNv4 dissemination of flow 716 specification rules. 718 The following traffic filtering flow specification rules are to be 719 allocated by IANA from BGP Extended Communities Type - Experimental 720 Use registry. Authors recommend the following type values: 722 0x8006 - Flow spec traffic-rate 724 0x8007 - Flow spec traffic-action 726 0x8008 - Flow spec redirect 728 Authors would like to ask IANA to create and maintain a new registry 729 entitled: "Flow Spec Component Type". Authors recommend to allocate 730 the following component types: 732 Type 1 - Destination Prefix 734 Type 2 - Source Prefix 736 Type 3 - IP Protocol 738 Type 4 - Port 740 Type 5 - Destination port 742 Type 6 - Source port 744 Type 7 - ICMP type 746 Type 8 - ICMP code 748 Type 9 - TCP flags 750 Type 10 - Packet length 752 Type 11 - DSCP 753 Type 12 - Fragment 755 In order to manage the limited number space and accommodate several 756 usages the following policies defined by RFC 5226 [RFC5226] are used: 758 +--------------+-------------------------------+ 759 | Range | Policy | 760 +--------------+-------------------------------+ 761 | 0 | Invalid value | 762 | | | 763 | [1 .. 12] | Defined by this specification | 764 | | | 765 | [13 .. 127] | Specification Required | 766 | | | 767 | [128 .. 255] | Private Use | 768 +--------------+-------------------------------+ 770 The specification of a particular "flow component type" must clearly 771 identify what is the criteria used to match packets forwarded by the 772 router. This criteria should be meaningful across router hops and 773 not depend on values that change hop-by-hop such as ttl or layer-2 774 encapsulation. 776 The "Traffic-action" extended community defined in this document has 777 6 unused bits which can be used to convey additional meaning. These 778 values should be assigned via IETF Consensus rules only. 780 Future assignment are to be made using either the Standards Action 781 process defined in [RFC2434], the Early IANA Allocation process 782 defined in [RFC4020], or the "First Come First Served" policy defined 783 in [RFC2434]. 785 11. Acknowledgments 787 The authors would like to thank Yakov Rekhter, Dennis Ferguson and 788 Chris Morrow for their comments. 790 Chaitanya Kodeboyina helped design the flow validation procedure. 792 Steven Lin and Jim Washburn ironed out all the details necessary to 793 produce a working implementation. 795 12. Normative References 797 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 798 RFC 793, September 1981. 800 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 801 Requirement Levels", BCP 14, RFC 2119, March 1997. 803 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 804 Protocol 4 (BGP-4)", RFC 4271, January 2006. 806 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 807 "Multiprotocol Extensions for BGP-4", RFC 4760, 808 January 2007. 810 [RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended 811 Communities Attribute", RFC 4360, February 2006. 813 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 814 Networks (VPNs)", RFC 4364, February 2006. 816 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 817 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 818 May 2008. 820 Authors' Addresses 822 Pedro Marques 823 Juniper Networks 824 1194 N. Mathilda Ave. 825 Sunnyvale, CA 94089 826 US 828 Email: roque@juniper.net 830 Nischal Sheth 831 Juniper Networks 832 1194 N. Mathilda Ave. 833 Sunnyvale, CA 94089 834 US 836 Email: nsheth@juniper.net 838 Robert Raszuk 839 Juniper Networks 840 1194 N. Mathilda Ave. 841 Sunnyvale, CA 94089 842 US 844 Email: raszuk@juniper.net 846 Barry Greene 847 Juniper Networks 848 1194 N. Mathilda Ave. 849 Sunnyvale, CA 94089 850 US 852 Email: bgreene@juniper.net 854 Jared Mauch 855 NTT/Verio 856 8285 Reese Lane 857 Ann Arbor, MI 48103-9753 858 US 859 Danny McPherson 860 Arbor Networks 862 Email: danny@arbor.net 864 Full Copyright Statement 866 Copyright (C) The IETF Trust (2008). 868 This document is subject to the rights, licenses and restrictions 869 contained in BCP 78, and except as set forth therein, the authors 870 retain all their rights. 872 This document and the information contained herein are provided on an 873 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 874 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 875 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 876 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 877 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 878 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 880 Intellectual Property 882 The IETF takes no position regarding the validity or scope of any 883 Intellectual Property Rights or other rights that might be claimed to 884 pertain to the implementation or use of the technology described in 885 this document or the extent to which any license under such rights 886 might or might not be available; nor does it represent that it has 887 made any independent effort to identify any such rights. Information 888 on the procedures with respect to rights in RFC documents can be 889 found in BCP 78 and BCP 79. 891 Copies of IPR disclosures made to the IETF Secretariat and any 892 assurances of licenses to be made available, or the result of an 893 attempt made to obtain a general license or permission for the use of 894 such proprietary rights by implementers or users of this 895 specification can be obtained from the IETF on-line IPR repository at 896 http://www.ietf.org/ipr. 898 The IETF invites any interested party to bring to its attention any 899 copyrights, patents or patent applications, or other proprietary 900 rights that may cover technology that may be required to implement 901 this standard. Please address the information to the IETF at 902 ietf-ipr@ietf.org.