idnits 2.17.1 draft-ietf-bess-nsh-bgp-control-plane-07.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 document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 26, 2019) is 1879 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) == Outdated reference: A later version (-22) exists of draft-ietf-idr-tunnel-encaps-11 ** Obsolete normative reference: RFC 5575 (Obsoleted by RFC 8955) == Outdated reference: A later version (-07) exists of draft-ietf-mpls-sfc-05 == Outdated reference: A later version (-04) exists of draft-ietf-mpls-sfc-encapsulation-02 Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 BESS Working Group A. Farrel 3 Internet-Draft Old Dog Consulting 4 Intended status: Standards Track J. Drake 5 Expires: August 30, 2019 E. Rosen 6 Juniper Networks 7 J. Uttaro 8 AT&T 9 L. Jalil 10 Verizon 11 February 26, 2019 13 BGP Control Plane for NSH SFC 14 draft-ietf-bess-nsh-bgp-control-plane-07 16 Abstract 18 This document describes the use of BGP as a control plane for 19 networks that support Service Function Chaining (SFC). The document 20 introduces a new BGP address family called the SFC AFI/SAFI with two 21 route types. One route type is originated by a node to advertise 22 that it hosts a particular instance of a specified service function. 23 This route type also provides "instructions" on how to send a packet 24 to the hosting node in a way that indicates that the service function 25 has to be applied to the packet. The other route type is used by a 26 Controller to advertise the paths of "chains" of service functions, 27 and to give a unique designator to each such path so that they can be 28 used in conjunction with the Network Service Header. 30 This document adopts the SFC architecture described in RFC 7665. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at https://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on August 30, 2019. 49 Copyright Notice 51 Copyright (c) 2019 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (https://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 67 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 68 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 69 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 70 2.1. Functional Overview . . . . . . . . . . . . . . . . . . . 5 71 2.2. Control Plane Overview . . . . . . . . . . . . . . . . . 7 72 3. BGP SFC Routes . . . . . . . . . . . . . . . . . . . . . . . 9 73 3.1. Service Function Instance Route (SFIR) . . . . . . . . . 10 74 3.1.1. SFI Pool Identifier Extended Community . . . . . . . 11 75 3.1.2. MPLS Mixed Swapping/Stacking Extended Community . . . 12 76 3.2. Service Function Path Route (SFPR) . . . . . . . . . . . 13 77 3.2.1. The SFP Attribute . . . . . . . . . . . . . . . . . . 13 78 3.2.2. General Rules For The SFP Attribute . . . . . . . . . 18 79 4. Mode of Operation . . . . . . . . . . . . . . . . . . . . . . 19 80 4.1. Route Targets . . . . . . . . . . . . . . . . . . . . . . 19 81 4.2. Service Function Instance Routes . . . . . . . . . . . . 19 82 4.3. Service Function Path Routes . . . . . . . . . . . . . . 20 83 4.4. Classifier Operation . . . . . . . . . . . . . . . . . . 22 84 4.5. Service Function Forwarder Operation . . . . . . . . . . 22 85 4.5.1. Processing With 'Gaps' in the SI Sequence . . . . . . 23 86 5. Selection in Service Function Paths . . . . . . . . . . . . . 24 87 6. Looping, Jumping, and Branching . . . . . . . . . . . . . . . 26 88 6.1. Protocol Control of Looping, Jumping, and Branching . . . 26 89 6.2. Implications for Forwarding State . . . . . . . . . . . . 27 90 7. Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . 28 91 7.1. Preserving Entropy . . . . . . . . . . . . . . . . . . . 28 92 7.2. Correlating Service Function Path Instances . . . . . . . 28 93 7.3. Considerations for Stateful Service Functions . . . . . . 29 94 7.4. VPN Considerations and Private Service Functions . . . . 30 95 7.5. Flow Spec for SFC Classifiers . . . . . . . . . . . . . . 30 96 7.6. Choice of Data Plane SPI/SI Representation . . . . . . . 32 97 7.6.1. MPLS Representation of the SPI/SI . . . . . . . . . . 33 98 7.7. MPLS Label Swapping/Stacking Operation . . . . . . . . . 33 99 7.8. Support for MPLS-Encapsulated NSH Packets . . . . . . . . 33 100 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 34 101 8.1. Example Explicit SFP With No Choices . . . . . . . . . . 35 102 8.2. Example SFP With Choice of SFIs . . . . . . . . . . . . . 36 103 8.3. Example SFP With Open Choice of SFIs . . . . . . . . . . 37 104 8.4. Example SFP With Choice of SFTs . . . . . . . . . . . . . 37 105 8.5. Example Correlated Bidirectional SFPs . . . . . . . . . . 38 106 8.6. Example Correlated Asymmetrical Bidirectional SFPs . . . 38 107 8.7. Example Looping in an SFP . . . . . . . . . . . . . . . . 39 108 8.8. Example Branching in an SFP . . . . . . . . . . . . . . . 40 109 8.9. Examples of SFPs with Stateful Service Functions . . . . 40 110 8.9.1. Forward and Reverse Choice Made at the SFF . . . . . 41 111 8.9.2. Parallel End-to-End SFPs with Shared SFF . . . . . . 42 112 8.9.3. Parallel End-to-End SFPs with Separate SFFs . . . . . 43 113 8.9.4. Parallel SFPs Downstream of the Choice . . . . . . . 45 114 9. Security Considerations . . . . . . . . . . . . . . . . . . . 48 115 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 49 116 10.1. New BGP AF/SAFI . . . . . . . . . . . . . . . . . . . . 49 117 10.2. New BGP Path Attribute . . . . . . . . . . . . . . . . . 49 118 10.3. New SFP Attribute TLVs Type Registry . . . . . . . . . . 49 119 10.4. New SFP Association Type Registry . . . . . . . . . . . 50 120 10.5. New Service Function Type Registry . . . . . . . . . . . 50 121 10.6. New Generic Transitive Experimental Use Extended 122 Community Sub-Types . . . . . . . . . . . . . . . . . . 51 123 10.7. New BGP Transitive Extended Community Types . . . . . . 51 124 10.8. SPI/SI Representation . . . . . . . . . . . . . . . . . 52 125 11. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 52 126 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 52 127 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 52 128 13.1. Normative References . . . . . . . . . . . . . . . . . . 52 129 13.2. Informative References . . . . . . . . . . . . . . . . . 53 130 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 54 132 1. Introduction 134 As described in [RFC7498], the delivery of end-to-end services can 135 require a packet to pass through a series of Service Functions (SFs) 136 (e.g., classifiers, firewalls, TCP accelerators, and server load 137 balancers) in a specified order: this is termed "Service Function 138 Chaining" (SFC). There are a number of issues associated with 139 deploying and maintaining service function chaining in production 140 networks, which are described below. 142 Conventionally, if a packet needs to travel through a particular 143 service chain, the nodes hosting the service functions of that chain 144 are placed in the network topology in such a way that the packet 145 cannot reach its ultimate destination without first passing through 146 all the service functions in the proper order. This need to place 147 the service functions at particular topological locations limits the 148 ability to adapt a service function chain to changes in network 149 topology (e.g., link or node failures), network utilization, or 150 offered service load. These topological restrictions on where the 151 service functions can be placed raise the following issues: 153 1. The process of configuring or modifying a service function chain 154 is operationally complex and may require changes to the network 155 topology. 157 2. Alternate or redundant service functions may need to be co- 158 located with the primary service functions. 160 3. When there is more than one path between source and destination, 161 forwarding may be asymmetric and it may be difficult to support 162 bidirectional service function chains using simple routing 163 methodologies and protocols without adding mechanisms for traffic 164 steering or traffic engineering. 166 In order to address these issues, the SFC architecture describes 167 Service Function Chains that are built in their own overlay network 168 (the service function overlay network), coexisting with other overlay 169 networks, over a common underlay network [RFC7665]. A Service 170 Function Chain is a sequence of Service Functions through which 171 packet flows that satisfy specified criteria will pass. 173 This document describes the use of BGP as a control plane for 174 networks that support Service Function Chaining (SFC). The document 175 introduces a new BGP address family called the SFC AFI/SAFI with two 176 route types. One route type is originated by a node to advertise 177 that it hosts a particular instance of a specified service function. 178 This route type also provides "instructions" on how to send a packet 179 to the hosting node in a way that indicates that the service function 180 has to be applied to the packet. The other route type is used by a 181 Controller to advertise the paths of "chains" of service functions, 182 and to give a unique designator to each such path so that they can be 183 used in conjunction with the Network Service Header. 185 This document adopts the SFC architecture described in [RFC7665]. 187 1.1. Requirements Language 189 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 190 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 191 "OPTIONAL" in this document are to be interpreted as described in BCP 192 14 [RFC2119] [RFC8174] when, and only when, they appear in all 193 capitals, as shown here. 195 1.2. Terminology 197 This document uses the following terms from [RFC7665]: 199 o Bidirectional Service Function Chain 201 o Classifier 203 o Service Function (SF) 205 o Service Function Chain (SFC) 207 o Service Function Forwarder (SFF) 209 o Service Function Instance (SFI) 211 o Service Function Path (SFP) 213 o SFC branching 215 Additionally, this document uses the following terms from [RFC8300]: 217 o Network Service Header (NSH) 219 o Service Index (SI) 221 o Service Path Identifier (SPI) 223 This document introduces the following terms: 225 o Service Function Instance Route (SFIR) 227 o Service Function Overlay Network 229 o Service Function Path Route (SFPR) 231 o Service Function Type (SFT) 233 2. Overview 235 2.1. Functional Overview 237 In [RFC8300] a Service Function Chain (SFC) is an ordered list of 238 Service Functions (SFs). A Service Function Path (SFP) is an 239 indication of which instances of SFs are acceptable to be traversed 240 in an instantiation of an SFC in a service function overlay network. 241 The Service Path Identifier (SPI) is a 24-bit number that identifies 242 a specific SFP, and a Service Index (SI) is an 8-bit number that 243 identifies a specific point in that path. In the context of a 244 particular SFP (identified by an SPI), an SI represents a particular 245 Service Function, and indicates the order of that SF in the SFP. 247 In fact, each SI is mapped to one or more SFs that are implemented by 248 one or more Service Function Instances (SFIs) that support those 249 specified SFs. Thus an SI may represent a choice of SFIs of one or 250 more Service Function Types. By deploying multiple SFIs for a single 251 SF, one can provide load balancing and redundancy. 253 A special Service Function, called a Classifier, is located at each 254 ingress point to a service function overlay network. It assigns the 255 packets of a given packet flow to a specific Service Function Path. 256 This may be done by comparing specific fields in a packet's header 257 with local policy, which may be customer/network/service specific. 258 The classifier picks an SFP and sets the SPI accordingly, it then 259 sets the SI to the value of the SI for the first hop in the SFP, and 260 then prepends a Network Services Header (NSH) [RFC8300] containing 261 the assigned SPI/SI to that packet. Note that the Classifier and the 262 node that hosts the first Service Function in a Service Function Path 263 need not be located at the same point in the service function overlay 264 network. 266 Note that the presence of the NSH can make it difficult for nodes in 267 the underlay network to locate the fields in the original packet that 268 would normally be used to constrain equal cost multipath (ECMP) 269 forwarding. Therefore, it is recommended, as described in 270 Section 7.1, that the node prepending the NSH also provide some form 271 of entropy indicator that can be used in the underlay network. 273 The Service Function Forwarder (SFF) receives a packet from the 274 previous node in a Service Function Path, removes the packet's link 275 layer or tunnel encapsulation and hands the packet and the NSH to the 276 Service Function Instance for processing. The SFI has no knowledge 277 of the SFP. 279 When the SFF receives the packet and the NSH back from the SFI it 280 must select the next SFI along the path using the SPI and SI in the 281 NSH and potentially choosing between multiple SFIs (possibly of 282 different Service Function Types) as described in Section 5. In the 283 normal case the SPI remains unchanged and the SI will have been 284 decremented to indicate the next SF along the path. But other 285 possibilities exist if the SF makes other changes to the NSH through 286 a process of re-classification: 288 o The SI in the NSH may indicate: 290 * A previous SF in the path: known as "looping" (see Section 6). 292 * An SF further down the path: known as "jumping" (see also 293 Section 6). 295 o The SPI and the SI may point to an SF on a different SFP: known as 296 "branching" (see also Section 6). 298 Such modifications are limited to within the same service function 299 overlay network. That is, an SPI is known within the scope of 300 service function overlay network. Furthermore, the new SI value is 301 interpreted in the context of the SFP identified by the SPI. 303 An unknown or invalid SPI SHALL be treated as an error and the SFF 304 MUST drop the packet. Such errors SHOULD be logged, and such logs 305 MUST be subject to rate limits. 307 An SFF receiving an SI that is unknown in the context of the SPI MAY 308 reduce the value to the next meaningful SI value in the SFP indicated 309 by the SPI. If no such value exists or if the SFF does not support 310 this function it MUST drop the packet and SHOULD log the event: such 311 logs MUST be subject to rate limits. 313 The SFF then selects an SFI that provides the SF denoted by the SPI/ 314 SI, and forwards the packet to the SFF that supports that SFI. 316 2.2. Control Plane Overview 318 To accomplish the function described in Section 2.1, this document 319 introduces a new BGP AFI/SAFI (values to be assigned by IANA) for 320 "SFC Routes". Two SFC Route Types are defined by this document: the 321 Service Function Instance Route (SFIR), and the Service Function Path 322 Route (SFPR). As detailed in Section 3, the route type is indicated 323 by a sub-field in the NLRI. 325 o The SFIR is advertised by the node hosting the service function 326 instance. The SFIR describes a particular instance of a 327 particular Service Function and the way to forward a packet to it 328 through the underlay network, i.e., IP address and encapsulation 329 information. 331 o The SFPRs are originated by Controllers. One SFPR is originated 332 for each Service Function Path. The SFPR specifies: 334 A. the SPI of the path 335 B. the sequence of SFTs and/or SFIs of which the path consists 337 C. for each such SFT or SFI, the SI that represents it in the 338 identified path. 340 This approach assumes that there is an underlay network that provides 341 connectivity between SFFs and Controllers, and that the SFFs are 342 grouped to form one or more service function overlay networks through 343 which SFPs are built. We assume BGP connectivity between the 344 Controllers and all SFFs within each service function overlay 345 network. 347 In addition, we also introduce the Service Function Type (SFT) that 348 is the category of SF that is supported by an SFF (such as 349 "firewall"). An IANA registry of Service Function Types is 350 introduced in Section 10. An SFF may support SFs of multiple 351 different SFTs, and may support multiple SFIs of each SF. 353 When choosing the next SFI in a path, the SFF uses the SPI and SI as 354 well as the SFT to choose among the SFIs, applying, for example, a 355 load balancing algorithm or direct knowledge of the underlay network 356 topology as described in Section 4. 358 The SFF then encapsulates the packet using the encapsulation 359 specified by the SFIR of the selected SFI and forwards the packet. 360 See Figure 1. 362 Thus the SFF can be seen as a portal in the underlay network through 363 which a particular SFI is reached. 365 Packets 366 | | | 367 | | | 368 | | | 369 ------------ 370 | | 371 | Classifier | 372 | | 373 ------------ 374 | 375 | 376 ------- ------- 377 | | Tunnel | | 378 | SFF |=============| SFF |=========== ......... 379 | | | | # : SFT : 380 | | -+---+- # : ----- : 381 | | / \ # : | SFI | : 382 | | ....../.......\...... # : --+-- : 383 | | : / \ : # ....|.... 384 | | : -+--- ---+- : # | 385 | | : | SFI | | SFI | : # ---+--- 386 | | : ----- ----- : ====| |--- 387 | | : : | SFF |--- Dests 388 | | : ----- : ====| |--- 389 | | : | SFI | : # ------- 390 | | : --+-- : # 391 | | : SFT | : # 392 | | ..........|.......... # 393 | | | # 394 | | | # 395 | | ---+--- # 396 | | | | # 397 | |=============| SFF |=========== 398 ------- | | 399 ------- 401 Figure 1: The SFC Architecture Reference Model 403 3. BGP SFC Routes 405 This document defines a new AFI/SAFI for BGP, known as "SFC", with an 406 NLRI that is described in this section. 408 The format of the SFC NLRI is shown in Figure 2. 410 +---------------------------------------+ 411 | Route Type (2 octets) | 412 +---------------------------------------+ 413 | Length (2 octets) | 414 +---------------------------------------+ 415 | Route Type specific (variable) | 416 +---------------------------------------+ 418 Figure 2: The Format of the SFC NLRI 420 The Route Type field determines the encoding of the rest of the route 421 type specific SFC NLRI. 423 The Length field indicates the length in octets of the route type 424 specific field of the SFC NLRI. 426 This document defines the following Route Types: 428 1. Service Function Instance Route (SFIR) 430 2. Service Function Path Route (SFPR) 432 A Service Function Instance Route (SFIR) is used to identify an SFI. 433 A Service Function Path Route (SFPR) defines a sequence of Service 434 Functions (each of which has at least one instance advertised in an 435 SFIR) that form an SFP. 437 The detailed encoding and procedures for these Route Types are 438 described in subsequent sections. 440 The SFC NLRI is carried in BGP [RFC4271] using BGP Multiprotocol 441 Extensions [RFC4760] with an Address Family Identifier (AFI) of TBD1 442 and a Subsequent Address Family Identifier (SAFI) of TBD2. The NLRI 443 field in the MP_REACH_NLRI/MP_UNREACH_NLRI attribute contains the SFC 444 NLRI, encoded as specified above. 446 In order for two BGP speakers to exchange SFC NLRIs, they must use 447 BGP Capabilities Advertisements to ensure that they both are capable 448 of properly processing such NLRIs. This is done as specified in 449 [RFC4760], by using capability code 1 (Multiprotocol BGP) with an AFI 450 of TBD1 and a SAFI of TBD2. 452 3.1. Service Function Instance Route (SFIR) 454 Figure 3 shows the Route Type specific NLRI of the SFIR. 456 +--------------------------------------------+ 457 | Route Distinguisher (RD) (8 octets) | 458 +--------------------------------------------+ 459 | Service Function Type (2 octets) | 460 +--------------------------------------------+ 462 Figure 3: SFIR Route Type specific NLRI 464 Per [RFC4364] the RD field comprises a two byte Type field and a six 465 byte Value field. Two SFIs of the same SFT must be associated with 466 different RDs, where the association of an SFI with an RD is 467 determined by provisioning. If two SFIRs are originated from 468 different administrative domains, they must have different RDs. In 469 particular, SFIRs from different VPNs (for different service function 470 overlay networks) must have different RDs, and those RDs must be 471 different from any non-VPN SFIRs. 473 The Service Function Type identifies a service function, e.g., 474 classifier, firewall, load balancer, etc. There may be several SFIs 475 that can perform a given Service Function. Each node hosting an SFI 476 must originate an SFIR for each type of SF that it hosts, and it may 477 advertise an SFIR for each instance of each type of SF. The SFIR 478 representing a given SFI will contain an NLRI with RD field set to an 479 RD as specified above, and with SFT field set to identify that SFI's 480 Service Function Type. The values for the SFT field are taken from a 481 registry administered by IANA (see Section 10). A BGP Update 482 containing one or more SFIRs will also include a Tunnel Encapsulation 483 attribute [I-D.ietf-idr-tunnel-encaps]. If a data packet needs to be 484 sent to an SFI identified in one of the SFIRs, it will be 485 encapsulated as specified by the Tunnel Encapsulation attribute, and 486 then transmitted through the underlay network. 488 3.1.1. SFI Pool Identifier Extended Community 490 This document defines a new transitive extended community of type 491 TBD6 with Sub-Type 0x00 called the SFI Pool Identifier extended 492 community. It can be included in SFIR advertisements, and is used to 493 indicate the identity of a pool of SFIRs to which an SFIR belongs. 494 Since an SFIR may be a member of multiple pools, multiple of these 495 extended communities may be present on a single SFIR advertisement. 497 SFIR pools allow SFIRs to be grouped for any purpose. Possible uses 498 include control plane scalability and stability. 500 The SFI Pool Identifier extended community is encoded in 8 octets as 501 shown in Figure 4. 503 +--------------------------------------------+ 504 | Type = 0x80 (1 octet) | 505 +--------------------------------------------+ 506 | Sub-Type = TBD6 (1 octet) | 507 +--------------------------------------------+ 508 | SFI Pool Identifier Value (6 octets) | 509 +--------------------------------------------+ 511 Figure 4: The SFI Pool Identifier Extended Community 513 The SFI Pool Identifier Value is encoded in a 6 octet field in 514 network byte order, and is a globally unique value. 516 3.1.2. MPLS Mixed Swapping/Stacking Extended Community 518 This document defines a new transitive extended community of type 519 TBD7 with Sub-Type 0x00 called the MPLS Mixed Swapping/Stacking 520 Labels. The community is encoded as shown in Figure 5. It contains 521 a pair of MPLS labels: an SFC Context Label and an SF Label as 522 described in [I-D.ietf-mpls-sfc]. Each label is 20 bits encoded in a 523 3-octet (24 bit) field with 4 trailing bits that MUST be set to zero. 525 +--------------------------------------------+ 526 | Type = 0x80 (1 octet) | 527 +--------------------------------------------| 528 | Sub-Type = TBD7 (1 octet) | 529 +--------------------------------------------| 530 | SFC Context Label (3 octets) | 531 +--------------------------------------------| 532 | SF Label (3 octets) | 533 +--------------------------------------------+ 535 Figure 5: The MPLS Mixed Swapping/Stacking Extended Community 537 Note that it is assumed that each SFF has one or more globally unique 538 SFC Context Labels and that the context label space and the SPI 539 address space are disjoint. 541 If an SFF supports SFP Traversal with an MPLS Label Stack it MUST 542 include this extended community with the SFIRs that it advertises. 544 See Section 7.7 for a description of how this extended community is 545 used. 547 3.2. Service Function Path Route (SFPR) 549 Figure 6 shows the Route Type specific NLRI of the SFPR. 551 +-----------------------------------------------+ 552 | Route Distinguisher (RD) (8 octets) | 553 +-----------------------------------------------+ 554 | Service Path Identifier (SPI) (3 octets) | 555 +-----------------------------------------------+ 557 Figure 6: SFPR Route Type Specific NLRI 559 Per [RFC4364] the RD field comprises a two byte Type field and a six 560 byte Value field. All SFPs must be associated with different RDs. 561 The association of an SFP with an RD is determined by provisioning. 562 If two SFPRs are originated from different Controllers they must have 563 different RDs. Additionally, SFPRs from different VPNs (i.e., in 564 different service function overlay networks) must have different RDs, 565 and those RDs must be different from any non-VPN SFPRs. 567 The Service Path Identifier is defined in [RFC8300] and is the value 568 to be placed in the Service Path Identifier field of the NSH header 569 of any packet sent on this Service Function Path. It is expected 570 that one or more Controllers will originate these routes in order to 571 configure a service function overlay network. 573 The SFP is described in a new BGP Path attribute, the SFP attribute. 574 Section 3.2.1 shows the format of that attribute. 576 3.2.1. The SFP Attribute 578 [RFC4271] defines the BGP Path attribute. This document introduces a 579 new Path attribute called the SFP attribute with value TBD3 to be 580 assigned by IANA. The first SFP attribute MUST be processed and 581 subsequent instances MUST be ignored. 583 The common fields of the SFP attribute are set as follows: 585 o Optional bit is set to 1 to indicate that this is an optional 586 attribute. 588 o The Transitive bit is set to 1 to indicate that this is a 589 transitive attribute. 591 o The Extended Length bit is set according to the length of the SFP 592 attribute as defined in [RFC4271]. 594 o The Attribute Type Code is set to TBD3. 596 The content of the SFP attribute is a series of Type-Length-Variable 597 (TLV) constructs. Each TLV may include sub-TLVs. All TLVs and sub- 598 TLVs have a common format that is: 600 o Type: A single octet indicating the type of the SFP attribute TLV. 601 Values are taken from the registry described in Section 10.3. 603 o Length: A two octet field indicating the length of the data 604 following the Length field counted in octets. 606 o Value: The contents of the TLV. 608 The formats of the TLVs defined in this document are shown in the 609 following sections. The presence rules and meanings are as follows. 611 o The SFP attribute contains a sequence of zero or more Association 612 TLVs. That is, the Association TLV is optional. Each Association 613 TLV provides an association between this SFPR and another SFPR. 614 Each associated SFPR is indicated using the RD with which it is 615 advertised (we say the SFPR-RD to avoid ambiguity). 617 o The SFP attribute contains a sequence of one or more Hop TLVs. 618 Each Hop TLV contains all of the information about a single hop in 619 the SFP. 621 o Each Hop TLV contains an SI value and a sequence of one or more 622 SFT TLVs. Each SFT TLV contains an SFI reference for each 623 instance of an SF that is allowed at this hop of the SFP for the 624 specific SFT. Each SFI is indicated using the RD with which it is 625 advertised (we say the SFIR-RD to avoid ambiguity). 627 3.2.1.1. The Association TLV 629 The Association TLV is an optional TLV in the SFP attribute. It may 630 be present multiple times. Each occurrence provides an association 631 with another SFP as advertised in another SFPR. The format of the 632 Association TLV is shown in Figure 7 633 +--------------------------------------------+ 634 | Type = 1 (1 octet) | 635 +--------------------------------------------| 636 | Length (2 octets) | 637 +--------------------------------------------| 638 | Association Type (1 octet) | 639 +--------------------------------------------| 640 | Associated SFPR-RD (8 octets) | 641 +--------------------------------------------| 642 | Associated SPI (3 octets) | 643 +--------------------------------------------+ 645 Figure 7: The Format of the Association TLV 647 The fields are as follows: 649 Type is set to 1 to indicate an Association TLV. 651 Length indicates the length in octets of the Association Type and 652 Associated SFPR-RD fields. The value of the Length field is 12. 654 The Association Type field indicate the type of association. The 655 values are tracked in an IANA registry (see Section 10.4). Only 656 one value is defined in this document: type 1 indicates 657 association of two unidirectional SFPs to form a bidirectional 658 SFP. An SFP attribute SHOULD NOT contain more than one 659 Association TLV with Association Type 1: if more than one is 660 present, the first one MUST be processed and subsequent instances 661 MUST be ignored. Note that documents that define new Association 662 Types must also define the presence rules for Association TLVs of 663 the new type. 665 The Associated SFPR-RD contains the RD of the associated SFP as 666 advertised in an SFPR. 668 The Associated SPI contains the SPI of the associated SFP as 669 advertised in an SFPR. 671 Association TLVs with unknown Association Type values SHOULD be 672 ignored. Association TLVs that contain an Associated SFPR-RD value 673 equal to the RD of the SFPR in which they are contained SHOULD be 674 ignored. If the Associated SPI is not equal to the SPI advertised in 675 the SFPR indicated by the Associated SFPR-RD then the Association TLV 676 SHOULD be ignored. 678 Note that when two SFPRs reference each other using the Association 679 TLV, one SFPR advertisement will be received before the other. 681 Therefore, processing of an association MUST NOT be rejected simply 682 because the Associated SFPR-RD is unknown. 684 Further discussion of correlation of SFPRs is provided in 685 Section 7.2. 687 3.2.1.2. The Hop TLV 689 There is one Hop TLV in the SFP attribute for each hop in the SFP. 690 The format of the Hop TLV is shown in Figure 8. At least one Hop TLV 691 must be present in an SFP attribute. 693 +--------------------------------------------+ 694 | Type = 2 (1 octet) | 695 +--------------------------------------------| 696 | Length (2 octets) | 697 +--------------------------------------------| 698 | Service Index (1 octet) | 699 +--------------------------------------------| 700 | Hop Details (variable) | 701 +--------------------------------------------+ 703 Figure 8: The Format of the Hop TLV 705 The fields are as follows: 707 Type is set to 2 to indicate a Hop TLV. 709 Length indicates the length in octets of the Service Index and Hop 710 Details fields. 712 The Service Index is defined in [RFC8300] and is the value found 713 in the Service Index field of the NSH header that an SFF will use 714 to lookup to which next SFI a packet should be sent. 716 The Hop Details field consists of a sequence of one or more sub- 717 TLVs. 719 Each hop of the SFP may demand that a specific type of SF is 720 executed, and that type is indicated in sub-TLVs of the Hop TLV. At 721 least one sub-TLV MUST be present. This provides a list of which 722 types of SF are acceptable at a specific hop, and for each type it 723 allows a degree of control to be imposed on the choice of SFIs of 724 that particular type. 726 3.2.1.3. The SFT TLV 728 The SFT TLV MAY be included in the list of sub-TLVs of the Hop TLV. 729 The format of the SFT TLV is shown in Figure 9. The TLV contains a 730 list of SFIR-RD values each taken from the advertisement of an SFI. 731 Together they form a list of acceptable SFIs of the indicated type. 733 +--------------------------------------------+ 734 | Type = 3 (1 octet) | 735 +--------------------------------------------| 736 | Length (2 octets) | 737 +--------------------------------------------| 738 | Service Function Type (2 octets) | 739 +--------------------------------------------| 740 | SFIR-RD List (variable) | 741 +--------------------------------------------+ 743 Figure 9: The Format of the SFT TLV 745 The fields are as follows: 747 Type is set to 3 to indicate an SFT TLV. 749 Length indicates the length in octets of the Service Function Type 750 and SFIR-RD List fields. 752 The Service Function Type value indicates the category (type) of 753 SF that is to be executed at this hop. The types are as 754 advertised for the SFs supported by the SFFs SFT values in the 755 range 1-31 are Special Purpose SFT values and have meanings 756 defined by the documents that describe them - the value 'Change 757 Sequence' is defined in Section 6.1 of this document. 759 The hop description is further qualified beyond the specification 760 of the SFTs by listing, for each SFT in each hop, the SFIs that 761 may be used at the hop. The SFIs are identified using the SFIR- 762 RDs from the advertisements of the SFIs in the SFIRs. Note that 763 if the list contains one or more SFI Pool Identifiers, then for 764 each the SFIR-RD list is effectively expanded to include the SFIR- 765 RD of each SFIR advertised with that SFI Pool Identifier. An 766 SFIR-RD of value zero has special meaning as described in 767 Section 5. Each entry in the list is eight octets long, and the 768 number of entries in the list can be deduced from the value of the 769 Length field. 771 3.2.1.4. MPLS Swapping/Stacking TLV 773 The MPLS Swapping/Stacking TLV (Type value 4) is a zero length sub- 774 TLV that is optionally present in the Hop TLV and is used when the 775 data representation is MPLS (see Section 7.6). When present it 776 indicates to the Classifier imposing an MPLS label stack that the 777 current hop is to use an {SFC Context Label, SF label} rather than an 778 {SPI, SF} label pair. See Section 7.7 for more details. 780 3.2.1.5. SFP Traversal With MPLS Label Stack TLV 782 The SFP Traversal With MPLS Label Stack TLV (Type value 5) is a zero 783 length sub-TLV that can be carried in the SFP Attribute and indicates 784 to the Classifier and the SFFs on the SFP that an MPLS labels stack 785 with label swapping/stacking is to be used for packets traversing the 786 SFP. All of the SFF specified at each the SFP's hops must have 787 advertised an MPLS Mixed Swapping/Stacking Extended Community (see 788 Section 3.1.2) for the SFP to be considered usable. 790 3.2.2. General Rules For The SFP Attribute 792 It is possible for the same SFI, as described by an SFIR, to be used 793 in multiple SFPRs. 795 When two SFPRs have the same SPI but different SFPR-RDs there can be 796 three cases: 798 o Two or more Controllers are originating SFPRs for the same SFP. 799 In this case the content of the SFPRs is identical and the 800 duplication is to ensure receipt and to provide Controller 801 redundancy. 803 o There is a transition in content of the advertised SFP and the 804 advertisements may originate from one or more Controllers. In 805 this case the content of the SFPRs will be different. 807 o The reuse of an SPI may result from a configuration error. 809 In all cases, there is no way for the receiving SFF to know which 810 SFPR to process, and the SFPRs could be received in any order. At 811 any point in time, when multiple SFPRs have the same SPI but 812 different SFPR-RDs, the SFF MUST use the SFPR with the numerically 813 lowest SFPR-RD. The SFF SHOULD log this occurrence to assist with 814 debugging. 816 Furthermore, a Controller that wants to change the content of an SFP 817 is RECOMMENDED to use a new SPI and so create a new SFP onto which 818 the Classifiers can transition packet flows before the SFPR for the 819 old SFP is withdrawn. This avoids any race conditions with SFPR 820 advertisements. 822 Additionally, a Controller SHOULD NOT re-use an SPI after it has 823 withdrawn the SFPR that used it until at least a configurable amount 824 of time has passed. This timer SHOULD have a default of one hour. 826 4. Mode of Operation 828 This document describes the use of BGP as a control plane to create 829 and manage a service function overlay network. 831 4.1. Route Targets 833 The main feature introduced by this document is the ability to create 834 multiple service function overlay networks through the use of Route 835 Targets (RTs) [RFC4364]. 837 Every BGP UPDATE containing an SFIR or SFPR carries one or more RTs. 838 The RT carried by a particular SFIR or SFPR is determined by the 839 provisioning of the route's originator. 841 Every node in a service function overlay network is configured with 842 one or more import RTs. Thus, each SFF will import only the SFPRs 843 with matching RTs allowing the construction of multiple service 844 function overlay networks or the instantiation of Service Function 845 Chains within an L3VPN or EVPN instance (see Section 7.4). An SFF 846 that has a presence in multiple service function overlay networks 847 (i.e., imports more than one RT) may find it helpful to maintain 848 separate forwarding state for each overlay network. 850 4.2. Service Function Instance Routes 852 The SFIR (see Section 3.1) is used to advertise the existence and 853 location of a specific Service Function Instance and consists of: 855 o The RT as just described. 857 o A Service Function Type (SFT) that is the type of service function 858 that is provided (such as "firewall"). 860 o A Route Distinguisher (RD) that is unique to a specific instance 861 of a service function. 863 4.3. Service Function Path Routes 865 The SFPR (see Section 3.2) describes a specific path of a Service 866 Function Chain. The SFPR contains the Service Path Identifier (SPI) 867 used to identify the SFP in the NSH in the data plane. It also 868 contains a sequence of Service Indexes (SIs). Each SI identifies a 869 hop in the SFP, and each hop is a choice between one of more SFIs. 871 As described in this document, each Service Function Path Route is 872 identified in the service function overlay network by an RD and an 873 SPI. The SPI is unique within a single VPN instance supported by the 874 underlay network. 876 The SFPR advertisement comprises: 878 o An RT as described in Section 4.1. 880 o A tuple that identifies the SFPR 882 * An RD that identifies an advertisement of an SFPR. 884 * The SPI that uniquely identifies this path within the VPN 885 instance distinguished by the RD. This SPI also appears in the 886 NSH. 888 o A series of Service Indexes. Each SI is used in the context of a 889 particular SPI and identifies one or more SFs (distinguished by 890 their SFTs) and for each SF a set of SFIs that instantiate the SF. 891 The values of the SI indicate the order in which the SFs are to be 892 executed in the SFP that is represented by the SPI. 894 o The SI is used in the NSH to identify the entries in the SFP. 895 Note that the SI values have meaning only relative to a specific 896 path. They have no semantic other than to indicate the order of 897 Service Functions within the path and are assumed to be 898 monotonically decreasing from the start to the end of the path 899 [RFC8300]. 901 o Each Service Index is associated with a set of one or more Service 902 Function Instances that can be used to provide the indexed Service 903 Function within the path. Each member of the set comprises: 905 * The RD used in an SFIR advertisement of the SFI. 907 * The SFT that indicates the type of function as used in the same 908 SFIR advertisement of the SFI. 910 This may be summarized as follows where the notations "SFPR-RD" and 911 "SFIR-RD" are used to distinguish the two different RDs: 913 RT, {SFPR-RD, SPI}, m * {SI, {n * {SFT, p * SFIR-RD} } } 915 Where: 917 RT: Route Target 919 SFPR-RD: The Route Descriptor of the Service Function Path Route 920 advertisement 922 SPI: Service Path Identifier used in the NSH 924 m: The number of hops in the Service Function Path 926 n: The number of choices of Service Function Type for a specific 927 hop 929 p: The number of choices of Service Function Instance for given 930 Service Function Type in a specific hop 932 SI: Service Index used in the NSH to indicate a specific hop 934 SFT: The Service Function Type used in the same advertisement of 935 the Service Function Instance Route 937 SFIR-RD: The Route Descriptor used in an advertisement of the 938 Service Function Instance Route 940 Note that the values of SI are from the set {255, ..., 1} and are 941 monotonically decreasing within the SFP. SIs MUST appear in order 942 within the SFPR (i.e., monotonically decreasing) and MUST NOT appear 943 more than once. Gaps MAY appear in the sequence as described in 944 Section 4.5.1. Malformed SFPRs MUST be discarded and MUST cause any 945 previous instance of the SFPR (same SFPR-RD and SPI) to be discarded. 947 Note that if the SFIR-RD list in an SFT TLV contains one or more SFI 948 Pool identifiers, then in the above expression, 'p' is the sum of the 949 number of individual SFIR-RD values and the sum for each SFI Pool 950 Identifier of the number of SFIRs advertised with that SFI Pool 951 Identifier. I.e., the list of SFIR-RD values is effectively expanded 952 to include the SFIR-RD of each SFIR advertised with each SFI Pool 953 Identifier in the SFIR-RD list. 955 The choice of SFI is explained further in Section 5. Note that an 956 SFIR-RD value of zero has special meaning as described in that 957 Section. 959 4.4. Classifier Operation 961 As shown in Figure 1, the Classifier is a special Service Function 962 that is used to assign packets to an SFP. 964 The Classifier is responsible for determining to which packet flow a 965 packet belongs (usually by inspecting the packet header), imposing an 966 NSH, and initializing the NSH with the SPI of the selected SFP and 967 the SI of its first hop. 969 The Classifier may also provide an entropy indicator as described in 970 Section 7.1. 972 4.5. Service Function Forwarder Operation 974 Each packet sent to an SFF is transmitted encapsulated in an NSH. 975 The NSH includes an SPI and SI: the SPI indicates the SFPR 976 advertisement that announced the Service Function Path; the tuple 977 SPI/SI indicates a specific hop in a specific path and maps to the 978 RD/SFT of a particular SFIR advertisement. 980 When an SFF gets an SFPR advertisement it will first determine 981 whether to import the route by examining the RT. If the SFPR is 982 imported the SFF then determines whether it is on the SFP by looking 983 for its own SFIR-RDs in the SFPR. For each occurrence in the SFP, 984 the SFF creates forwarding state for incoming packets and forwarding 985 state for outgoing packets that have been processed by the specified 986 SFI. 988 The SFF creates local forwarding state for packets that it receives 989 from other SFFs. This state makes the association between the SPI/SI 990 in the NSH of the received packet and one or more specific local SFIs 991 as identified by the SFIR-RD/SFT. If there are multiple local SFIs 992 that match this is because a single advertisement was made for a set 993 of equivalent SFIs and the SFF may use local policy (such as load 994 balancing) to determine to which SFI to forward a received packet. 996 The SFF also creates next hop forwarding state for packets received 997 back from the local SFI that need to be forwarded to the next hop in 998 the SFP. There may be a choice of next hops as described in 999 Section 4.3. The SFF could install forwarding state for all 1000 potential next hops, or it could choose to only install forwarding 1001 state to a subset of the potential next hops. If a choice is made 1002 then it will be as described in Section 5. 1004 The installed forwarding state may change over time reacting to 1005 changes in the underlay network and the availability of particular 1006 SFIs. 1008 Note that SFFs only create and store forwarding state for the SFPs on 1009 which they are included. They do not retain state for all SFPs 1010 advertised. 1012 An SFF may also install forwarding state to support looping, jumping, 1013 and branching. The protocol mechanism for explicit control of 1014 looping, jumping, and branching uses a specific reserved SFT value 1015 at a given hop of an SFPR and is described in Section 6.1. 1017 4.5.1. Processing With 'Gaps' in the SI Sequence 1019 The behavior of an SF as described in [RFC8300] is to decrement the 1020 value of the SI field in the NSH by one before returning a packet to 1021 the local SFF for further processing. This means that there is a 1022 good reason to assume that the SFP is composed of a series of SFs 1023 each indicated by an SI value one less than the previous. 1025 However, there is an advantage to having non-successive SIs in an 1026 SPI. Consider the case where an SPI needs to be modified by the 1027 insertion or removal of an SF. In the latter case this would lead to 1028 a "gap" in the sequence of SIs, and in the former case, this could 1029 only be achieved if a gap already existed into which the new SF with 1030 its new SI value could be inserted. Otherwise, all "downstream" SFs 1031 would need to be renumbered. 1033 Now, of course, such renumbering could be performed, but would lead 1034 to a significant disruption to the SFC as all the SFFs along the SFP 1035 were "reprogrammed". Thus, to achieve dynamic modification of an SFP 1036 (and even, in-service modification) it is desirable to be able to 1037 make these modifications without changing the SIs of the elements 1038 that were present before the modification. This will produce much 1039 more consistent/predictable behavior during the convergence period 1040 where otherwise the change would need to be fully propagated. 1042 Another approach says that any change to an SFP simply creates a new 1043 SFP that can be assigned a new SPI. All that would be needed would 1044 be to give a new instruction to the Classifier and traffic would be 1045 switched to the new SFP that contains the new set of SFs. This 1046 approach is practical, but neglects to consider that the SFP may be 1047 referenced by other SFPs (through "branch" instructions) and used by 1048 many Classifiers. In those cases the corresponding configuration 1049 resulting from a change in SPI may have wide ripples and give scope 1050 for errors that are hard to trace. 1052 Therefore, while this document requires that the SI values in an SFP 1053 are monotonic decreasing, it makes no assumption that the SI values 1054 are sequential. Configuration tools may apply that rule, but they 1055 are not required to. To support this, an SFF SHOULD process as 1056 follows when it receives a packet: 1058 o If the SI indicates a known entry in the SFP, the SFF MUST process 1059 the packet as normal, looking up the SI and determining to which 1060 local SFI to deliver the packet. 1062 o If the SI does not match an entry in the SFP, the SFF MUST reduce 1063 the SI value to the next (smaller) value present in the SFP and 1064 process the packet using that SI. 1066 o If there is no smaller SI (i.e., if the end of the SFP has been 1067 reached) the SFF MUST treat the SI value as invalid as described 1068 in [RFC8300]. 1070 SFF implementations MAY choose to only support contiguous SI values 1071 in an SFP. Such an implementation will not support receiving an SI 1072 value that is not present in the SFP and will discard the packets as 1073 described in [RFC8300]. 1075 5. Selection in Service Function Paths 1077 As described in Section 2 the SPI/SI in the NSH passed back from an 1078 SFI to the SFF may leave the SFF with a choice of next hop SFTs, and 1079 a choice of SFIs for each SFT. That is, the SPI indicates an SFPR, 1080 and the SI indicates an entry in that SFPR. Each entry in an SFPR is 1081 a set of one or more SFT/SFIR-RD pairs. The SFF must choose one of 1082 these, identify the SFF that supports the chosen SFI, and send the 1083 packet to that next hop SFF. 1085 The choice may offered for load balancing across multiple SFIs, or 1086 for discrimination between different actions necessary at a specific 1087 hop in the SFP. Different SFT values may exist at a given hop in an 1088 SFP to support several cases: 1090 o There may be multiple instances of similar service functions that 1091 are distinguished by different SFT values. For example, firewalls 1092 made by vendor A and vendor B may need to be identified by 1093 different SFT values because, while they have similar 1094 functionality, their behavior is not identical. Then, some SFPs 1095 may limit the choice of SF at a given hop by specifying the SFT 1096 for vendor A, but other SFPs might not need to control which 1097 vendor's SF is used and so can indicate that either SFT can be 1098 used. 1100 o There may be an obvious branch needed in an SFP such as the 1101 processing after a firewall where admitted packets continue along 1102 the SFP, but suspect packets are diverted to a "penalty box". In 1103 this case, the next hop in the SFP will be indicated with two 1104 different SFT values. 1106 In the typical case, the SFF chooses a next hop SFF by looking at the 1107 set of all SFFs that support the SFs identified by the SI (that set 1108 having been advertised in individual SFIR advertisements), finding 1109 the one or more that are "nearest" in the underlay network, and 1110 choosing between next hop SFFs using its own load-balancing 1111 algorithm. 1113 An SFI may influence this choice process by passing additional 1114 information back along with the packet and NSH. This information may 1115 influence local policy at the SFF to cause it to favor a next hop SFF 1116 (perhaps selecting one that is not nearest in the underlay), or to 1117 influence the load-balancing algorithm. 1119 This selection applies to the normal case, but also applies in the 1120 case of looping, jumping, and branching (see Section 6). 1122 Suppose an SFF in a particular service overlay network (identified by 1123 a particular import RT, RT-z) needs to forward an NSH-encapsulated 1124 packet whose SPI is SPI-x and whose SI is SI-y. It does the 1125 following: 1127 1. It looks for an installed SFPR that carries RT-z and that has 1128 SPI-x in its NLRI. If there is none, then such packets cannot be 1129 forwarded. 1131 2. From the SFP attribute of that SFPR, it finds the Hop TLV with SI 1132 value set to SI-y. If there is no such Hop TLV, then such 1133 packets cannot be forwarded. 1135 3. It then finds the "relevant" set of SFIRs by going through the 1136 list of SFT TLVs contained in the Hop TLV as follows: 1138 A. An SFIR is relevant if it carries RT-z, the SFT in its NLRI 1139 matches the SFT value in one of the SFT TLVs, and the RD 1140 value in its NLRI matches an entry in the list of SFIR-RDs in 1141 that SFT TLV. 1143 B. If an entry in the SFIR-RD list of an SFT TLV contains the 1144 value zero, then an SFIR is relevant if it carries RT-z and 1145 the SFT in its NLRI matches the SFT value in that SFT TLV. 1146 I.e., any SFIR in the service function overlay network 1147 defined by RT-z and with the correct SFT is relevant. 1149 Each of the relevant SFIRs identifies a single SFI, and contains a 1150 Tunnel Encapsulation attribute that specifies how to send a packet to 1151 that SFI. For a particular packet, the SFF chooses a particular SFI 1152 from the set of relevant SFIRs. This choice is made according to 1153 local policy. 1155 A typical policy might be to figure out the set of SFIs that are 1156 closest, and to load balance among them. But this is not the only 1157 possible policy. 1159 6. Looping, Jumping, and Branching 1161 As described in Section 2 an SFI or an SFF may cause a packet to 1162 "loop back" to a previous SF on a path in order that a sequence of 1163 functions may be re-executed. This is simply achieved by replacing 1164 the SI in the NSH with a higher value instead of decreasing it as 1165 would normally be the case to determine the next hop in the path. 1167 Section 2 also describes how an SFI or an SFF may cause a packets to 1168 "jump forward" to an SF on a path that is not the immediate next SF 1169 in the SFP. This is simply achieved by replacing the SI in the NSH 1170 with a lower value than would be achieved by decreasing it by the 1171 normal amount. 1173 A more complex option to move packets from one SFP to another is 1174 described in [RFC8300] and Section 2 where it is termed "branching". 1175 This mechanism allows an SFI or SFF to make a choice of downstream 1176 treatments for packets based on local policy and output of the local 1177 SF. Branching is achieved by changing the SPI in the NSH to indicate 1178 the new path and setting the SI to indicate the point in the path at 1179 which the packets should enter. 1181 Note that the NSH does not include a marker to indicate whether a 1182 specific packet has been around a loop before. Therefore, the use of 1183 NSH metadata may be required in order to prevent infinite loops. 1185 6.1. Protocol Control of Looping, Jumping, and Branching 1187 If the SFT value in an SFT TLV in an SFPR has the Special Purpose SFT 1188 value "Change Sequence" (see Section 10) then this is an indication 1189 that the SFF may make a loop, jump, or branch according to local 1190 policy and information returned by the local SFI. 1192 In this case, the SPI and SI of the next hop is encoded in the eight 1193 bytes of an entry in the SFIR-RD list as follows: 1195 3 bytes SPI 1197 2 bytes SI 1198 3 bytes Reserved (SHOULD be set to zero and ignored) 1200 If the SI in this encoding is not part of the SFPR indicated by the 1201 SPI in this encoding, then this is an explicit error that SHOULD be 1202 detected by the SFF when it parses the SFPR. The SFPR SHOULD NOT 1203 cause any forwarding state to be installed in the SFF and packets 1204 received with the SPI that indicates this SFPR SHOULD be silently 1205 discarded. 1207 If the SPI in this encoding is unknown, the SFF SHOULD NOT install 1208 any forwarding state for this SFPR, but MAY hold the SFPR pending 1209 receipt of another SFPR that does use the encoded SPI. 1211 If the SPI matches the current SPI for the path, this is a loop or 1212 jump. In this case, if the SI is greater than to the current SI it 1213 is a loop. If the SPI matches and the SI is less than the next SI, 1214 it is a jump. 1216 If the SPI indicates anther path, this is a branch and the SI 1217 indicates the point at which to enter that path. 1219 The Change Sequence SFT is just another SFT that may appear in a set 1220 of SFI/SFT tuples within an SI and is selected as described in 1221 Section 5. 1223 Note that Special Purpose SFTs MUST NOT be advertised in SFIRs. 1225 6.2. Implications for Forwarding State 1227 Support for looping and jumping requires that the SFF has forwarding 1228 state established to an SFF that provides access to an instance of 1229 the appropriate SF. This means that the SFF must have seen the 1230 relevant SFIR advertisements and known that it needed to create the 1231 forwarding state. This is a matter of local configuration and 1232 implementation: for example, an implementation could be configured to 1233 install forwarding state for specific looping/jumping. 1235 Support for branching requires that the SFF has forwarding state 1236 established to an SFF that provides access to an instance of the 1237 appropriate entry SF on the other SFP. This means that the SFF must 1238 have seen the relevant SFIR and SFPR advertisements and known that it 1239 needed to create the forwarding state. This is a matter of local 1240 configuration and implementation: for example, an implementation 1241 could be configured to install forwarding state for specific 1242 branching (identified by SPI and SI). 1244 7. Advanced Topics 1246 This section highlights several advanced topics introduced elsewhere 1247 in this document. 1249 7.1. Preserving Entropy 1251 Forwarding decisions in the underlay network in the presence of equal 1252 cost multipath (ECMP) are usually made by inspecting key invariant 1253 fields in a packet header so that all packets from the same packet 1254 flow receive the same forwarding treatment. However, when an NSH is 1255 included in a packet, those key fields may be inaccessible. For 1256 example, the fields may be too far inside the packet for a forwarding 1257 engine to quickly find them and extract their values, or the node 1258 performing the examination may be unaware of the format and meaning 1259 of the NSH and so unable to parse far enough into the packet. 1261 Various mechanisms exist within forwarding technologies to include an 1262 "entropy indicator" within a forwarded packet. For example, in MPLS 1263 there is the entropy label [RFC6790], while for encapsulations in UDP 1264 the source port field is often used to carry an entropy indicator 1265 (such as for MPLS in UDP [RFC7510]). 1267 Implementations of this specification are RECOMMENDED to include an 1268 entropy indicator within the packet's underlay network header, and 1269 SHOULD preserve any entropy indicator from a received packet for use 1270 on the same packet when it is forwarded along the path but MAY choose 1271 to generate a new entropy indicator so long as the method used is 1272 constant for all packets. Note that preserving per packet entropy 1273 may require that the entropy indicator is passed to and returned by 1274 the SFI to prevent the SFF from having to maintain per-packet state. 1276 7.2. Correlating Service Function Path Instances 1278 It is often useful to create bidirectional SFPs to enable packet 1279 flows to traverse the same set of SFs, but in the reverse order. 1280 However, packets on SFPs in the data plane (per [RFC8300]) do not 1281 contain a direction indicator, so each direction must use a different 1282 SPI. 1284 As described in Section 3.2.1.1 an SFPR can contain one or more 1285 correlators encoded in Association TLVs. If the Association Type 1286 indicates "Bidirectional SFP" then the SFP advertised in the SFPR is 1287 one direction of a bidirectional pair of SFPs where the other in the 1288 pair is advertised in the SFPR with RD as carried in the Associated 1289 SFPR-RD field of the Association TLV. The SPI carried in the 1290 Associated SPI field of the Association TLV provides a cross-check 1291 and should match the SPI advertised in the SFPR with RD as carried in 1292 the Associated SFPR-RD field of the Association TLV. 1294 As noted in Section 3.2.1.1 SFPRs reference each other one SFPR 1295 advertisement will be received before the other. Therefore 1296 processing of an association will require that the first SFPR is not 1297 rejected simply because the Associated SFPR-RD it carries is unknown. 1298 However, the SFP defined by the first SFPR is valid and SHOULD be 1299 available for use as a unidirectional SFP even in the absence of an 1300 advertisement of its partner. 1302 Furthermore, in error cases where SFPR-a associates with SFPR-b, but 1303 SFPR-b associates with SFPR-c such that a bidirectional pair of SFPs 1304 cannot be formed, the individual SFPs are still valid and SHOULD be 1305 available for use as unidirectional SFPs. An implementation SHOULD 1306 log this situation because it represents a Controller error. 1308 Usage of a bidirectional SFP may be programmed into the Classifiers 1309 by the Controller. Alternatively, a Classifier may look at incoming 1310 packets on a bidirectional packet flow, extract the SPI from the 1311 received NSH, and look up the SFPR to find the reverse direction SFP 1312 to use when it sends packets. 1314 See Section 8 for an example of how this works. 1316 7.3. Considerations for Stateful Service Functions 1318 Some service functions are stateful. That means that they build and 1319 maintain state derived from configuration or from the packet flows 1320 that they handle. In such cases it can be important or necessary 1321 that all packets from a flow continue to traverse the same instance 1322 of a service function so that the state can be leveraged and does not 1323 need to be regenerated. 1325 In the case of bidirectional SFPs, it may be necessary to traverse 1326 the same instances of a stateful service function in both directions. 1327 A firewall is a good example of such a service function. 1329 This issue becomes a concern where there are multiple parallel 1330 instances of a service function and a determination of which one to 1331 use could normally be left to the SFF as a load-balancing or local 1332 policy choice. 1334 For the forward direction SFP, the concern is that the same choice of 1335 service function is made for all packets of a flow under normal 1336 network conditions. It may be possible to guarantee that the load 1337 balancing functions applied in the SFFs are stable and repeatable, 1338 but a controller that constructs SFPs might not want to trust to 1339 this. The controller can, in these cases, build a number of more 1340 specific SFPs each traversing a specific instance of the stateful 1341 SFs. In this case, the load balancing choice can be left up to the 1342 Classifier. Thus the Classifier selects which instance of a stateful 1343 SF is used by a particular flow by selecting the SFP that the flow 1344 uses. 1346 For bidirectional SFPs where the same instance of a stateful SF must 1347 be traversed in both directions, it is not enough to leave the choice 1348 of service function instance as a local choice even if the load 1349 balancing is stable because coordination would be required between 1350 the decision points in the forward and reverse directions and this 1351 may be hard to achieve in all cases except where it is the same SFF 1352 that makes the choice in both directions. 1354 Note that this approach necessarily increases the amount of SFP state 1355 in the network (i.e., there are more SFPs). It is possible to 1356 mitigate this effect by careful construction of SFPs built from a 1357 concatenation of other SFPs. 1359 Section 8.9 includes some simple examples of SFPs for stateful 1360 service functions. 1362 7.4. VPN Considerations and Private Service Functions 1364 Likely deployments include reserving specific instances of Service 1365 Functions for specific customers or allowing customers to deploy 1366 their own Service Functions within the network. Building Service 1367 Functions in such environments requires that suitable identifiers are 1368 used to ensure that SFFs distinguish which SFIs can be used and which 1369 cannot. 1371 This problem is similar to how VPNs are supported and is solved in a 1372 similar way. The RT field is used to indicate a set of Service 1373 Functions from which all choices must be made. 1375 7.5. Flow Spec for SFC Classifiers 1377 [RFC5575] defines a set of BGP routes that can be used to identify 1378 the packets in a given flow using fields in the header of each 1379 packet, and a set of actions, encoded as extended communities, that 1380 can be used to disposition those packets. This document enables the 1381 use of RFC 5575 mechanisms by SFC Classifiers by defining a new 1382 action extended community called "Flow Spec for SFC classifiers" 1383 identified by the value TBD4. Note that other action extended 1384 communities may also be present. 1386 This extended community is encoded as an 8-octet value, as shown in 1387 Figure 10: 1389 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1390 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1391 | Type=0x80 | Sub-Type=TBD4 | SPI | 1392 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1393 | SPI (cont.) | SI | SFT | 1394 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1396 Figure 10: The Format of the Flow Spec for SFC Classifiers Extended 1397 Community 1399 The extended community contains the Service Path Identifier (SPI), 1400 Service Index (SI), and Service Function Type (SFT) as defined 1401 elsewhere in this document. Thus, each action extended community 1402 defines the entry point (not necessarily the first hop) into a 1403 specific service function path. This allows, for example, different 1404 flows to enter the same service function path at different points. 1406 Note that a given Flow Spec update according to [RFC5575] may include 1407 multiple of these action extended communities, and that if a given 1408 action extended community does not contain an installed SFPR with the 1409 specified {SPI, SI, SFT} it MUST NOT be used for dispositioning the 1410 packets of the specified flow. 1412 The normal case of packet classification for SFC will see a packet 1413 enter the SFP at its first hop. In this case the SI in the extended 1414 community is superfluous and the SFT may also be unnecessary. To 1415 allow these cases to be handled, a special meaning is assigned to a 1416 Service Index of zero (not a valid value) and an SFT of zero (a 1417 reserved value in the registry - see Section 10.5). 1419 o If an SFC Classifiers Extended Community is received with SI = 0 1420 then it means that the first hop of the SFP indicated by the SPI 1421 MUST be used. 1423 o If an SFC Classifiers Extended Community is received with SFT = 0 1424 then there are two sub-cases: 1426 * If there is a choice of SFT in the hop indicated by the value 1427 of the SI (including SI = 0) then SFT = 0 means there is a free 1428 choice according to local policy of which SFT to use). 1430 * If there is no choice of SFT in the hop indicated by the value 1431 of SI, then SFT = 0 means that the value of the SFT at that hop 1432 as indicated in the SPFR for the indicated SPI MUST be used. 1434 7.6. Choice of Data Plane SPI/SI Representation 1436 This document ties together the control and data planes of an SFC 1437 overlay network through the use of the SPI/SI which is nominally 1438 carried in the NSH of a given packet. However, in order to handle 1439 situations in which the NSH is not ubiquitously deployed, it is also 1440 possible to use alternative data plane representations of the SPI/SI 1441 by carrying the identical semantics in other protocol fields such as 1442 MPLS labels [I-D.ietf-mpls-sfc]. 1444 This document defines a new sub-TLV for the Tunnel Encapsulation 1445 attribute, the SPI/SI Representation sub-TLV of type TBD5. This sub- 1446 TLV MAY be present in each Tunnel TLV contained in a Tunnel 1447 Encapsulation attribute when the attribute is carried by an SFIR. 1448 The value field of this sub-TLV is a two octet field of flags, each 1449 of which describes how the originating SFF expects to see the SPI/SI 1450 represented in the data plane for packets carried in the tunnels 1451 described by the Tunnel TLV. 1453 The following bits are defined by this document: 1455 Bit 0: If this bit is set the NSH is to be used to carry the SPI/SI 1456 in the data plane. 1458 Bit 1: If this bit is set two labels in an MPLS label stack are to 1459 be used as described in Section 7.6.1. 1461 If a given Tunnel TLV does not contain an SPI/SI Representation sub- 1462 TLV then it MUST be processed as if such a sub-TLV is present with 1463 Bit 0 set and no other bits set. That is, the absence of the sub-TLV 1464 SHALL be interpreted to mean that the NSH is to be used. 1466 If a given Tunnel TLV contains an SPI/SI Representation sub-TLV with 1467 value field that has no flag set then the tunnel indicated by the 1468 Tunnel TLV MUST NOT be used for forwarding SFC packets. If a given 1469 Tunnel TLV contains an SPI/SI Representation sub-TLV with both bit 0 1470 and bit 1 set then the tunnel indicated by the Tunnel TLV MUST NOT be 1471 used for forwarding SFC packets. The meaning and rules for presence 1472 of other bits is to be defined in future documents, but 1473 implementations of this specification MUST set other bits to zero and 1474 ignore them on receipt. 1476 If a given Tunnel TLV contains more than one SPI/SI Representation 1477 sub-TLV then the first one MUST be considered and subsequent 1478 instances MUST be ignored. 1480 Note that the MPLS representation of the logical NSH may be used even 1481 if the tunnel is not an MPLS tunnel. Conversely, MPLS tunnels may be 1482 used to carry other encodings of the logical NSH (specifically, the 1483 NSH itself). It is a requirement that both ends of a tunnel over the 1484 underlay network know that the tunnel is used for SFC and know what 1485 form of NSH representation is used. The signaling mechanism 1486 described here allows coordination of this information. 1488 7.6.1. MPLS Representation of the SPI/SI 1490 If bit 1 is set in the in the SPI/SI Representation sub-TLV then 1491 labels in the MPLS label stack are used to indicate SFC forwarding 1492 and processing instructions to achieve the semantics of a logical 1493 NSH. The label stack is encoded as shown in [I-D.ietf-mpls-sfc]. 1495 7.7. MPLS Label Swapping/Stacking Operation 1497 When a classifier constructs an MPLS label stack for an SFP it starts 1498 with that SFP' last hop. If the last hop requires an {SPI, SI} label 1499 pair for label swapping, it pushes the SI (set to the SI value of the 1500 last hop) and the SFP's SPI onto the MPLS label stack. If the last 1501 hop requires a {context label, SFI label} label pair for label 1502 stacking it selects a specific SFIR and pushes that SFIR's SFI label 1503 and context label onto the MPLS label stack. 1505 The classifier then moves sequentially back through the SFP one hop 1506 at a time. For each hop, if the hop requires an {SPI, SI]} and there 1507 is an {SPI, SI} at the top of the MPLS label stack, the SI is set to 1508 the SI value of the current hop. If there is not an {SPI, SI} at the 1509 top of the MPLS label stack, it pushes the SI (set to the SI value of 1510 the current hop) and the SFP's SPI onto the MPLS label stack. 1512 If the hop requires a {context label, SFI label}, it selects a 1513 specific SFIR and pushes that SFIR's SFI label and context label onto 1514 the MPLS label stack. 1516 7.8. Support for MPLS-Encapsulated NSH Packets 1518 [I-D.ietf-mpls-sfc-encapsulation] describes how to transport SFC 1519 packets using the NSH over an MPLS transport network. Signaling MPLS 1520 encapsulation of SFC packets using the NSH is also supported by this 1521 document by using the "BGP Tunnel Encapsulation Attribute Sub-TLV" 1522 with the codepoint 10 (representing "MPLS Label Stack") from the "BGP 1523 Tunnel Encapsulation Attribute Sub-TLVs" registry defined in 1525 [I-D.ietf-idr-tunnel-encaps], and also using the "SFP Traversal With 1526 MPLS Label Stack TLV" and the "SPI/SI Representation sub-TLV" with 1527 bit 0 set and bit 1 cleared. 1529 In this case the MPLS label stack constructed by the SFF to forward a 1530 packet to the next SFF on the SFP will consist of the labels needed 1531 to reach that SFF, and if label stacking is used it will also include 1532 the labels advertised in the MPLS Label Stack sub-TLV and the labels 1533 remaining in the stack needed to traverse the remainder of the SFP. 1535 8. Examples 1537 Assume we have a service function overlay network with four SFFs 1538 (SFF1, SFF3, SFF3, and SFF4). The SFFs have addresses in the 1539 underlay network as follows: 1541 SFF1 192.0.2.1 1542 SFF2 192.0.2.2 1543 SFF3 192.0.2.3 1544 SFF4 192.0.2.4 1546 Each SFF provides access to some SFIs from the four Service Function 1547 Types SFT=41, SFT=42, SFT=43, and SFT=44 as follows: 1549 SFF1 SFT=41 and SFT=42 1550 SFF2 SFT=41 and SFT=43 1551 SFF3 SFT=42 and SFT=44 1552 SFF4 SFT=43 and SFT=44 1554 The service function network also contains a Controller with address 1555 198.51.100.1. 1557 This example service function overlay network is shown in Figure 11. 1559 -------------- 1560 | Controller | 1561 | 198.51.100.1 | ------ ------ ------ ------ 1562 -------------- | SFI | | SFI | | SFI | | SFI | 1563 |SFT=41| |SFT=42| |SFT=41| |SFT=43| 1564 ------ ------ ------ ------ 1565 \ / \ / 1566 --------- --------- 1567 ---------- | SFF1 | | SFF2 | 1568 Packet --> | | |192.0.2.1| |192.0.2.2| 1569 Flows --> |Classifier| --------- --------- -->Dest 1570 | | --> 1571 ---------- --------- --------- 1572 | SFF3 | | SFF4 | 1573 |192.0.2.3| |192.0.2.4| 1574 --------- --------- 1575 / \ / \ 1576 ------ ------ ------ ------ 1577 | SFI | | SFI | | SFI | | SFI | 1578 |SFT=42| |SFT=44| |SFT=43| |SFT=44| 1579 ------ ------ ------ ------ 1581 Figure 11: Example Service Function Overlay Network 1583 The SFFs advertise routes to the SFIs they support. So we see the 1584 following SFIRs: 1586 RD = 192.0.2.1,1, SFT = 41 1587 RD = 192.0.2.1,2, SFT = 42 1588 RD = 192.0.2.2,1, SFT = 41 1589 RD = 192.0.2.2,2, SFT = 43 1590 RD = 192.0.2.3,7, SFT = 42 1591 RD = 192.0.2.3,8, SFT = 44 1592 RD = 192.0.2.4,5, SFT = 43 1593 RD = 192.0.2.4,6, SFT = 44 1595 Note that the addressing used for communicating between SFFs is taken 1596 from the Tunnel Encapsulation attribute of the SFIR and not from the 1597 SFIR-RD. 1599 8.1. Example Explicit SFP With No Choices 1601 Consider the following SFPR. 1603 SFP1: RD = 198.51.100.1,101, SPI = 15, 1604 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1605 [SI = 250, SFT = 43, RD = 192.0.2.2,2] 1607 The Service Function Path consists of an SF of type 41 located at 1608 SFF1 followed by an SF of type 43 located at SFF2. This path is 1609 fully explicit and each SFF is offered no choice in forwarding packet 1610 along the path. 1612 SFF1 will receive packets on the path from the Classifier and will 1613 identify the path from the SPI (15). The initial SI will be 255 and 1614 so SFF1 will deliver the packets to the SFI for SFT 41. 1616 When the packets are returned to SFF1 by the SFI the SI will be 1617 decreased to 250 for the next hop. SFF1 has no flexibility in the 1618 choice of SFF to support the next hop SFI and will forward the packet 1619 to SFF2 which will send the packets to the SFI that supports SFT 43 1620 before forwarding the packets to their destinations. 1622 8.2. Example SFP With Choice of SFIs 1624 SFP2: RD = 198.51.100.1,102, SPI = 16, 1625 [SI = 255, SFT = 41, RD = 192.0.2.1,], 1626 [SI = 250, SFT = 43, {RD = 192.0.2.2,2, 1627 RD = 192.0.2.4,5 } ] 1629 In this example the path also consists of an SF of type 41 located at 1630 SFF1 and this is followed by an SF of type 43, but in this case the 1631 SI = 250 contains a choice between the SFI located at SFF2 and the 1632 SFI located at SFF4. 1634 SFF1 will receive packets on the path from the Classifier and will 1635 identify the path from the SPI (16). The initial SI will be 255 and 1636 so SFF1 will deliver the packets to the SFI for SFT 41. 1638 When the packets are returned to SFF1 by the SFI the SI will be 1639 decreased to 250 for the next hop. SFF1 now has a choice of next hop 1640 SFF to execute the next hop in the path. It can either forward 1641 packets to SFF2 or SFF4 to execute a function of type 43. It uses 1642 its local load balancing algorithm to make this choice. The chosen 1643 SFF will send the packets to the SFI that supports SFT 43 before 1644 forwarding the packets to their destinations. 1646 8.3. Example SFP With Open Choice of SFIs 1648 SFP3: RD = 198.51.100.1,103, SPI = 17, 1649 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1650 [SI = 250, SFT = 44, RD = 0] 1652 In this example the path also consists of an SF of type 41 located at 1653 SFF1 and this is followed by an SI with an RD of zero and SF of type 1654 44. This means that a choice can be made between any SFF that 1655 supports an SFI of type 44. 1657 SFF1 will receive packets on the path from the Classifier and will 1658 identify the path from the SPI (17). The initial SI will be 255 and 1659 so SFF1 will deliver the packets to the SFI for SFT 41. 1661 When the packets are returned to SFF1 by the SFI the SI will be 1662 decreased to 250 for the next hop. SFF1 now has a free choice of 1663 next hop SFF to execute the next hop in the path selecting between 1664 all SFFs that support SFs of type 44. Looking at the SFIRs it has 1665 received, SFF1 knows that SF type 44 is supported by SFF3 and SFF4. 1666 SFF1 uses its local load balancing algorithm to make this choice. 1667 The chosen SFF will send the packets to the SFI that supports SFT 44 1668 before forwarding the packets to their destinations. 1670 8.4. Example SFP With Choice of SFTs 1672 SFP4: RD = 198.51.100.1,104, SPI = 18, 1673 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1674 [SI = 250, {SFT = 43, RD = 192.0.2.2,2, 1675 SFT = 44, RD = 192.0.2.3,8 } ] 1677 This example provides a choice of SF type in the second hop in the 1678 path. The SI of 250 indicates a choice between SF type 43 located 1679 through SF2 and SF type 44 located at SF3. 1681 SFF1 will receive packets on the path from the Classifier and will 1682 identify the path from the SPI (18). The initial SI will be 255 and 1683 so SFF1 will deliver the packets to the SFI for SFT 41. 1685 When the packets are returned to SFF1 by the SFI the SI will be 1686 decreased to 250 for the next hop. SFF1 now has a free choice of 1687 next hop SFF to execute the next hop in the path selecting between 1688 all SFF2 that support an SF of type 43 and SFF3 that supports an SF 1689 of type 44. These may be completely different functions that are to 1690 be executed dependent on specific conditions, or may be similar 1691 functions identified with different type identifiers (such as 1692 firewalls from different vendors). SFF1 uses its local policy and 1693 load balancing algorithm to make this choice, and may use additional 1694 information passed back from the local SFI to help inform its 1695 selection. The chosen SFF will send the packets to the SFI that 1696 supports the chose SFT before forwarding the packets to their 1697 destinations. 1699 8.5. Example Correlated Bidirectional SFPs 1701 SFP5: RD = 198.51.100.1,105, SPI = 19, 1702 Assoc-Type = 1, Assoc-RD = 198.51.100.1,106, Assoc-SPI = 20, 1703 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1704 [SI = 250, SFT = 43, RD = 192.0.2.2,2] 1706 SFP6: RD = 198.51.100.1,106, SPI = 20, 1707 Assoc-Type = 1, Assoc-RD = 198.51.100.1,105, Assoc-SPI = 19, 1708 [SI = 254, SFT = 43, RD = 192.0.2.2,2], 1709 [SI = 249, SFT = 41, RD = 192.0.2.1,1] 1711 This example demonstrates correlation of two SFPs to form a 1712 bidirectional SFP as described in Section 7.2. 1714 Two SFPRs are advertised by the Controller. They have different SPIs 1715 (19 and 20) so they are known to be separate SFPs, but they both have 1716 Association TLVs with Association Type set to 1 indicating 1717 bidirectional SFPs. Each has an Associated SFPR-RD fields containing 1718 the value of the other SFPR-RD to correlated the two SFPs as a 1719 bidirectional pair. 1721 As can be seen from the SFPRs in this example, the paths are 1722 symmetric: the hops in SFP5 appear in the reverse order in SFP6. 1724 8.6. Example Correlated Asymmetrical Bidirectional SFPs 1725 SFP7: RD = 198.51.100.1,107, SPI = 21, 1726 Assoc-Type = 1, Assoc-RD = 198.51.100.1,108, Assoc-SPI = 22, 1727 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1728 [SI = 250, SFT = 43, RD = 192.0.2.2,2] 1730 SFP8: RD = 198.51.100.1,108, SPI = 22, 1731 Assoc-Type = 1, Assoc-RD = 198.51.100.1,107, Assoc-SPI = 21, 1732 [SI = 254, SFT = 44, RD = 192.0.2.4,6], 1733 [SI = 249, SFT = 41, RD = 192.0.2.1,1] 1735 Asymmetric bidirectional SFPs can also be created. This example 1736 shows a pair of SFPs with distinct SPIs (21 and 22) that are 1737 correlated in the same way as in the example in Section 8.5. 1739 However, unlike in that example, the SFPs are different in each 1740 direction. Both paths include a hop of SF type 41, but SFP7 includes 1741 a hop of SF type 43 supported at SFF2 while SFP8 includes a hop of SF 1742 type 44 supported at SFF4. 1744 8.7. Example Looping in an SFP 1746 SFP9: RD = 198.51.100.1,109, SPI = 23, 1747 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1748 [SI = 250, SFT = 44, RD = 192.0.2.4,5], 1749 [SI = 245, SFT = 1, RD = {SPI=23, SI=255, Rsv=0}], 1750 [SI = 245, SFT = 42, RD = 192.0.2.3,7] 1752 Looping and jumping are described in Section 6. This example shows 1753 an SFP that contains an explicit loop-back instruction that is 1754 presented as a choice within an SFP hop. 1756 The first two hops in the path (SI = 255 and SI = 250) are normal. 1757 That is, the packets will be delivered to SFF1 and SFF4 in turn for 1758 execution of SFs of type 41 and 44 respectively. 1760 The third hop (SI = 245) presents SFF4 with a choice of next hop. It 1761 can either forward the packets to SFF3 for an SF of type 42 (the 1762 second choice), or it can loop back. 1764 The loop-back entry in the SFPR for SI = 245 is indicated by the 1765 special purpose SFT value 1 ("Change Sequence"). Within this hop, 1766 the RD is interpreted as encoding the SPI and SI of the next hop (see 1767 Section 6.1. In this case the SPI is 23 which indicates that this is 1768 loop or branch: i.e., the next hop is on the same SFP. The SI is set 1769 to 255: this is a higher number than the current SI (245) indicating 1770 a loop. 1772 SFF4 must make a choice between these two next hops. Either the 1773 packets will be forwarded to SFF3 with the NSH SI decreased to 245 or 1774 looped back to SFF1 with the NSH SI reset to 255. This choice will 1775 be made according to local policy, information passed back by the 1776 local SFI, and details in the packets' metadata that are used to 1777 prevent infinite looping. 1779 8.8. Example Branching in an SFP 1781 SFP10: RD = 198.51.100.1,110, SPI = 24, 1782 [SI = 254, SFT = 42, RD = 192.0.2.3,7], 1783 [SI = 249, SFT = 43, RD = 192.0.2.2,2] 1785 SFP11: RD = 198.51.100.1,111, SPI = 25, 1786 [SI = 255, SFT = 41, RD = 192.0.2.1,1], 1787 [SI = 250, SFT = 1, RD = {SPI=24, SI=254, Rsv=0}] 1789 Branching follows a similar procedure to that for looping (and 1790 jumping) as shown in Section 8.7 however there are two SFPs involved. 1792 SFP10 shows a normal path with packets forwarded to SFF3 and SFF2 for 1793 execution of service functions of type 42 and 43 respectively. 1795 SFP11 starts as normal (SFF1 for an SF of type 41), but then SFF1 1796 processes the next hop in the path and finds a "Change Sequence" 1797 Special Purpose SFT. The SFIR-RD field includes an SPI of 24 which 1798 indicates SFP10, not the current SFP. The SI in the SFIR-RD is 254, 1799 so SFF1 knows that it must set the SPI/SI in the NSH to 24/254 and 1800 send the packets to the appropriate SFF as advertised in the SFPR for 1801 SFP10 (that is, SFF3). 1803 8.9. Examples of SFPs with Stateful Service Functions 1805 This section provides some examples to demonstrate establishing SFPs 1806 when there is a choice of service functions at a particular hop, and 1807 where consistency of choice is required in both directions. The 1808 scenarios that give rise to this requirement are discussed in 1809 Section 7.3. 1811 8.9.1. Forward and Reverse Choice Made at the SFF 1813 Consider the topology shown in Figure 12. There are three SFFs 1814 arranged neatly in a line, and the middle one (SFF2) supports three 1815 SFIs all of SFT 42. These three instances can be used by SFF2 to 1816 load balance so that no one instance is swamped. 1818 ------ ------ ------ ------ ------ 1819 | SFI | | SFIa | | SFIb | | SFIc | | SFI | 1820 |SFT=41| |SFT=42| |SFT=42| |SFT=42| |SFT=43| 1821 ------ ------\ ------ /------ ------ 1822 \ \ | / / 1823 --------- --------- --------- 1824 ---------- | SFF1 | | SFF2 | | SFF3 | 1825 --> | |..|192.0.2.1|...|192.0.2.2|...|192.0.2.3|--> 1826 --> |Classifier| --------- --------- --------- 1827 | | 1828 ---------- 1830 Figure 12: Example Where Choice is Made at the SFF 1832 This leads to the following SFIRs being advertised. 1834 RD = 192.0.2.1,11, SFT = 41 1835 RD = 192.0.2.2,11, SFT = 42 (for SFIa) 1836 RD = 192.0.2.2,12, SFT = 42 (for SFIb) 1837 RD = 192.0.2.2,13, SFT = 42 (for SFIc) 1838 RD = 192.0.2.3,11, SFT = 43 1840 The controller can create a single forward SFP giving SFF2 the choice 1841 of which SFI to use to provide function of SFT 42 as follows. The 1842 load-balancing choice between the three available SFIs is assumed to 1843 be within the capabilities of the SFF and if the SFs are stateful it 1844 is assumed that the SFF knows this and arranges load balancing in a 1845 stable, flow-dependent way. 1847 SFP12: RD = 198.51.100.1,112, SPI = 26, 1848 Assoc-Type = 1, Assoc-RD = 198.51.100.1,113, Assoc-SPI = 27, 1849 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1850 [SI = 254, SFT = 42, {RD = 192.0.2.2,11, 1851 192.0.2.2,12, 1852 192.0.2.2,13 }], 1853 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1855 The reverse SFP in this case may also be created as shown below using 1856 association with the forward SFP and giving the load-balancing choice 1857 to SFF2. This is safe, even in the case that the SFs of type 42 are 1858 stateful because SFF2 is doing the load balancing in both directions 1859 and can apply the same algorithm to ensure that packets associated 1860 with the same flow use the same SFI regardless of the direction of 1861 travel. 1863 SFP13: RD = 198.51.100.1,113, SPI = 27, 1864 Assoc-Type = 1, Assoc-RD = 198.51.100.1,112, Assoc-SPI = 26, 1865 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 1866 [SI = 254, SFT = 42, {RD = 192.0.2.2,11, 1867 192.0.2.2,12, 1868 192.0.2.2,13 }], 1869 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 1871 8.9.2. Parallel End-to-End SFPs with Shared SFF 1873 The mechanism described in Section 8.9.1 might not be desirable 1874 because of the functional assumptions it places on SFF2 to be able to 1875 load balance with suitable flow identification, stability, and 1876 equality in both directions. Instead, it may be desirable to place 1877 the responsibility for flow classification in the Classifier and let 1878 it determine load balancing with the implied choice of SFIs. 1880 Consider the network graph as shown in Figure 12 and with the same 1881 set of SFIRs as listed in Section 8.9.1. In this case the controller 1882 could specify three forward SFPs with their corresponding associated 1883 reverse SFPs. Each bidirectional pair of SFPs uses a different SFI 1884 for the SF of type 42. The controller can instruct the Classifier 1885 how to place traffic on the three bidirectional SFPs, or can treat 1886 them as a group leaving the Classifier responsible for balancing the 1887 load. 1889 SFP14: RD = 198.51.100.1,114, SPI = 28, 1890 Assoc-Type = 1, Assoc-RD = 198.51.100.1,117, Assoc-SPI = 31, 1891 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1892 [SI = 254, SFT = 42, RD = 192.0.2.2,11], 1893 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1895 SFP15: RD = 198.51.100.1,115, SPI = 29, 1896 Assoc-Type = 1, Assoc-RD = 198.51.100.1,118, Assoc-SPI = 32, 1897 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1898 [SI = 254, SFT = 42, RD = 192.0.2.2,12], 1899 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1901 SFP16: RD = 198.51.100.1,116, SPI = 30, 1902 Assoc-Type = 1, Assoc-RD = 198.51.100.1,119, Assoc-SPI = 33, 1903 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1904 [SI = 254, SFT = 42, RD = 192.0.2.2,13], 1905 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1907 SFP17: RD = 198.51.100.1,117, SPI = 31, 1908 Assoc-Type = 1, Assoc-RD = 198.51.100.1,114, Assoc-SPI = 28, 1909 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 1910 [SI = 254, SFT = 42, RD = 192.0.2.2,11], 1911 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 1913 SFP18: RD = 198.51.100.1,118, SPI = 32, 1914 Assoc-Type = 1, Assoc-RD = 198.51.100.1,115, Assoc-SPI = 29, 1915 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 1916 [SI = 254, SFT = 42, RD = 192.0.2.2,12], 1917 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 1919 SFP19: RD = 198.51.100.1,119, SPI = 33, 1920 Assoc-Type = 1, Assoc-RD = 198.51.100.1,116, Assoc-SPI = 30, 1921 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 1922 [SI = 254, SFT = 42, RD = 192.0.2.2,13], 1923 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 1925 8.9.3. Parallel End-to-End SFPs with Separate SFFs 1927 While the examples in Section 8.9.1 and Section 8.9.2 place the 1928 choice of SFI as subtended from the same SFF, it is also possible 1929 that the SFIs are each subtended from a different SFF as shown in 1930 Figure 13. In this case it is harder to coordinate the choices for 1931 forward and reverse paths without some form of coordination between 1932 SFF1 and SFF3. Therefore it would be normal to consider end-to-end 1933 parallel SFPs as described in Section 8.9.2. 1935 ------ 1936 | SFIa | 1937 |SFT=42| 1938 ------ 1939 ------ | 1940 | SFI | --------- 1941 |SFT=41| | SFF5 | 1942 ------ ..|192.0.2.5|.. 1943 | ..: --------- :.. 1944 ---------.: :.--------- 1945 ---------- | SFF1 | --------- | SFF3 | 1946 --> | |..|192.0.2.1|....| SFF6 |....|192.0.2.3| --> 1947 --> |Classifier| ---------: |192.0.2.6| :--------- 1948 | | : --------- : | 1949 ---------- : | : ------ 1950 : ------ : | SFI | 1951 :.. | SFIb | ..: |SFT=43| 1952 :.. |SFT=42| ..: ------ 1953 : ------ : 1954 :.---------.: 1955 | SFF7 | 1956 |192.0.2.7| 1957 --------- 1958 | 1959 ------ 1960 | SFIc | 1961 |SFT=42| 1962 ------ 1964 Figure 13: Second Example With Parallel End-to-End SFPs 1966 In this case, five SFIRs are advertised as follows: 1968 RD = 192.0.2.1,11, SFT = 41 1969 RD = 192.0.2.5,11, SFT = 42 (for SFIa) 1970 RD = 192.0.2.6,11, SFT = 42 (for SFIb) 1971 RD = 192.0.2.7,11, SFT = 42 (for SFIc) 1972 RD = 192.0.2.3,11, SFT = 43 1974 In this case the controller could specify three forward SFPs with 1975 their corresponding associated reverse SFPs. Each bidirectional pair 1976 of SFPs uses a different SFF and SFI for middle hop (for an SF of 1977 type 42). The controller can instruct the Classifier how to place 1978 traffic on the three bidirectional SFPs, or can treat them as a group 1979 leaving the Classifier responsible for balancing the load. 1981 SFP20: RD = 198.51.100.1,120, SPI = 34, 1982 Assoc-Type = 1, Assoc-RD = 198.51.100.1,123, Assoc-SPI = 37, 1983 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1984 [SI = 254, SFT = 42, RD = 192.0.2.5,11], 1985 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1987 SFP21: RD = 198.51.100.1,121, SPI = 35, 1988 Assoc-Type = 1, Assoc-RD = 198.51.100.1,124, Assoc-SPI = 38, 1989 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1990 [SI = 254, SFT = 42, RD = 192.0.2.6,11], 1991 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1993 SFP22: RD = 198.51.100.1,122, SPI = 36, 1994 Assoc-Type = 1, Assoc-RD = 198.51.100.1,125, Assoc-SPI = 39, 1995 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 1996 [SI = 254, SFT = 42, RD = 192.0.2.7,11], 1997 [SI = 253, SFT = 43, RD = 192.0.2.3,11] 1999 SFP23: RD = 198.51.100.1,123, SPI = 37, 2000 Assoc-Type = 1, Assoc-RD = 198.51.100.1,120, Assoc-SPI = 34, 2001 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 2002 [SI = 254, SFT = 42, RD = 192.0.2.5,11], 2003 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 2005 SFP24: RD = 198.51.100.1,124, SPI = 38, 2006 Assoc-Type = 1, Assoc-RD = 198.51.100.1,121, Assoc-SPI = 35, 2007 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 2008 [SI = 254, SFT = 42, RD = 192.0.2.6,11], 2009 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 2011 SFP25: RD = 198.51.100.1,125, SPI = 39, 2012 Assoc-Type = 1, Assoc-RD = 198.51.100.1,122, Assoc-SPI = 36, 2013 [SI = 255, SFT = 43, RD = 192.0.2.3,11], 2014 [SI = 254, SFT = 42, RD = 192.0.2.7,11], 2015 [SI = 253, SFT = 41, RD = 192.0.2.1,11] 2017 8.9.4. Parallel SFPs Downstream of the Choice 2019 The mechanism of parallel SFPs demonstrated in Section 8.9.3 is 2020 perfectly functional and may be practical in many environments. 2021 However, there may be scaling concerns because of the large amount of 2022 state (knowledge of SFPs, i.e., SFPR advertisements retained) if 2023 there is a very large amount of choice of SFIs (for example, tens of 2024 instances of the same stateful SF), or if there are multiple choices 2025 of stateful SF along a path. This situation may be mitigated using 2026 SFP fragments that are combined to form the end to end SFPs. 2028 The example presented here is necessarily simplistic, but should 2029 convey the basic principle. The example presented in Figure 14 is 2030 similar to that in Section 8.9.3 but with an additional first hop. 2032 ------ 2033 | SFIa | 2034 |SFT=43| 2035 ------ 2036 ------ ------ | 2037 | SFI | | SFI | --------- 2038 |SFT=41| |SFT=42| | SFF5 | 2039 ------ ------ ..|192.0.2.5|.. 2040 | | ..: --------- :.. 2041 --------- ---------.: :.--------- 2042 ------ | SFF1 | | SFF2 | --------- | SFF3 | 2043 -->|Class-|.|192.0.2.1|.|192.0.2.2|....| SFF6 |....|192.0.2.3|--> 2044 -->| ifier| --------- ---------: |192.0.2.6| :--------- 2045 ------ : --------- : | 2046 : | : ------ 2047 : ------ : | SFI | 2048 :.. | SFIb | ..: |SFT=44| 2049 :.. |SFT=43| ..: ------ 2050 : ------ : 2051 :.---------.: 2052 | SFF7 | 2053 |192.0.2.7| 2054 --------- 2055 | 2056 ------ 2057 | SFIc | 2058 |SFT=43| 2059 ------ 2061 Figure 14: Example With Parallel SFPs Downstream of Choice 2063 The six SFIs are advertised as follows: 2065 RD = 192.0.2.1,11, SFT = 41 2066 RD = 192.0.2.2,11, SFT = 42 2067 RD = 192.0.2.5,11, SFT = 43 (for SFIa) 2068 RD = 192.0.2.6,11, SFT = 43 (for SFIb) 2069 RD = 192.0.2.7,11, SFT = 43 (for SFIc) 2070 RD = 192.0.2.3,11, SFT = 44 2072 SFF2 is the point at which a load balancing choice must be made. So 2073 "tail-end" SFPs are constructed as follows. Each takes in a 2074 different SFF that provides access to an SF of type 43. 2076 SFP26: RD = 198.51.100.1,126, SPI = 40, 2077 Assoc-Type = 1, Assoc-RD = 198.51.100.1,130, Assoc-SPI = 44, 2078 [SI = 255, SFT = 43, RD = 192.0.2.5,11], 2079 [SI = 254, SFT = 44, RD = 192.0.2.3,11] 2081 SFP27: RD = 198.51.100.1,127, SPI = 41, 2082 Assoc-Type = 1, Assoc-RD = 198.51.100.1,131, Assoc-SPI = 45, 2083 [SI = 255, SFT = 43, RD = 192.0.2.6,11], 2084 [SI = 254, SFT = 44, RD = 192.0.2.3,11] 2086 SFP28: RD = 198.51.100.1,128, SPI = 42, 2087 Assoc-Type = 1, Assoc-RD = 198.51.100.1,132, Assoc-SPI = 46, 2088 [SI = 255, SFT = 43, RD = 192.0.2.7,11], 2089 [SI = 254, SFT = 44, RD = 192.0.2.3,11] 2091 Now an end-to-end SFP with load balancing choice can be constructed 2092 as follows. The choice made by SFF2 is expressed in terms of 2093 entering one of the three "tail end" SFPs. 2095 SFP29: RD = 198.51.100.1,129, SPI = 43, 2096 [SI = 255, SFT = 41, RD = 192.0.2.1,11], 2097 [SI = 254, SFT = 42, RD = 192.0.2.2,11], 2098 [SI = 253, {SFT = 1, RD = {SPI=40, SI=255, Rsv=0}, 2099 RD = {SPI=41, SI=255, Rsv=0}, 2100 RD = {SPI=42, SI=255, Rsv=0} } ] 2102 Now, despite the load balancing choice being made other than at the 2103 initial classifier, it is possible for the reverse SFPs to be well- 2104 constructed without any ambiguity. The three reverse paths appear as 2105 follows. 2107 SFP30: RD = 198.51.100.1,130, SPI = 44, 2108 Assoc-Type = 1, Assoc-RD = 198.51.100.1,126, Assoc-SPI = 40, 2109 [SI = 255, SFT = 44, RD = 192.0.2.4,11], 2110 [SI = 254, SFT = 43, RD = 192.0.2.5,11], 2111 [SI = 253, SFT = 42, RD = 192.0.2.2,11], 2112 [SI = 252, SFT = 41, RD = 192.0.2.1,11] 2114 SFP31: RD = 198.51.100.1,131, SPI = 45, 2115 Assoc-Type = 1, Assoc-RD = 198.51.100.1,127, Assoc-SPI = 41, 2116 [SI = 255, SFT = 44, RD = 192.0.2.4,11], 2117 [SI = 254, SFT = 43, RD = 192.0.2.6,11], 2118 [SI = 253, SFT = 42, RD = 192.0.2.2,11], 2119 [SI = 252, SFT = 41, RD = 192.0.2.1,11] 2121 SFP32: RD = 198.51.100.1,132, SPI = 46, 2122 Assoc-Type = 1, Assoc-RD = 198.51.100.1,128, Assoc-SPI = 42, 2123 [SI = 255, SFT = 44, RD = 192.0.2.4,11], 2124 [SI = 254, SFT = 43, RD = 192.0.2.7,11], 2125 [SI = 253, SFT = 42, RD = 192.0.2.2,11], 2126 [SI = 252, SFT = 41, RD = 192.0.2.1,11] 2128 9. Security Considerations 2130 This document inherits all the security considerations discussed in 2131 the documents that specify BGP, the documents that specify BGP 2132 Multiprotocol Extensions, and the documents that define the 2133 attributes that are carried by BGP UPDATEs of the SFC AFI/SAFI. For 2134 more information look in [RFC4271], [RFC4760], and 2135 [I-D.ietf-idr-tunnel-encaps]. 2137 Service Function Chaining provides a significant attack opportunity: 2138 packets can be diverted from their normal paths through the network, 2139 can be made to execute unexpected functions, and the functions that 2140 are instantiated in software can be subverted. However, this 2141 specification does not change the existence of Service Function 2142 Chaining and security issues specific to Service Function Chaining 2143 are covered in [RFC7665] and [RFC8300]. 2145 This document defines a control plane for Service Function Chaining. 2146 Clearly, this provides an attack vector for a Service Function 2147 Chaining system as an attack on this control plane could be used to 2148 make the system misbehave. Thus, the security of the BGP system is 2149 critically important to the security of the whole Service Function 2150 Chaining system. 2152 10. IANA Considerations 2154 10.1. New BGP AF/SAFI 2156 IANA maintains a registry of "Address Family Numbers". IANA is 2157 requested to assign a new Address Family Number from the "Standards 2158 Action" range called "BGP SFC" (TBD1 in this document) with this 2159 document as a reference. 2161 IANA maintains a registry of "Subsequent Address Family Identifiers 2162 (SAFI) Parameters". IANA is requested to assign a new SAFI value 2163 from the "Standards Action" range called "BGP SFC" (TBD2 in this 2164 document) with this document as a reference. 2166 10.2. New BGP Path Attribute 2168 IANA maintains a registry of "Border Gateway Protocol (BGP) 2169 Parameters" with a subregistry of "BGP Path Attributes". IANA is 2170 requested to assign a new Path attribute called "SFP attribute" (TBD3 2171 in this document) with this document as a reference. 2173 10.3. New SFP Attribute TLVs Type Registry 2175 IANA maintains a registry of "Border Gateway Protocol (BGP) 2176 Parameters". IANA is request to create a new subregistry called the 2177 "SFP Attribute TLVs" registry. 2179 Valid values are in the range 0 to 65535. 2181 o Values 0 and 65535 are to be marked "Reserved, not to be 2182 allocated". 2184 o Values 1 through 65524 are to be assigned according to the "First 2185 Come First Served" policy [RFC8126]. 2187 This document should be given as a reference for this registry. 2189 The new registry should track: 2191 o Type 2193 o Name 2195 o Reference Document or Contact 2197 o Registration Date 2199 The registry should initially be populated as follows: 2201 Type | Name | Reference | Date 2202 ------+-------------------------+---------------+--------------- 2203 1 | Association TLV | [This.I-D] | Date-to-be-set 2204 2 | Hop TLV | [This.I-D] | Date-to-be-set 2205 3 | SFT TLV | [This.I-D] | Date-to-be-set 2206 4 | MPLS Swapping/Stacking | [This.I-D] | Date-to-be-set 2207 5 | SFP Traversal With MPLS | [This.I-D] | Date-to-be-set 2209 10.4. New SFP Association Type Registry 2211 IANA maintains a registry of "Border Gateway Protocol (BGP) 2212 Parameters". IANA is request to create a new subregistry called the 2213 "SFP Association Type" registry. 2215 Valid values are in the range 0 to 65535. 2217 o Values 0 and 65535 are to be marked "Reserved, not to be 2218 allocated". 2220 o Values 1 through 65524 are to be assigned according to the "First 2221 Come First Served" policy [RFC8126]. 2223 This document should be given as a reference for this registry. 2225 The new registry should track: 2227 o Association Type 2229 o Name 2231 o Reference Document or Contact 2233 o Registration Date 2235 The registry should initially be populated as follows: 2237 Association Type | Name | Reference | Date 2238 -----------------+--------------------+------------+--------------- 2239 1 | Bidirectional SFP | [This.I-D] | Date-to-be-set 2241 10.5. New Service Function Type Registry 2243 IANA is request to create a new top-level registry called "Service 2244 Function Chaining Service Function Types". 2246 Valid values are in the range 0 to 65535. 2248 o Values 0 and 65535 are to be marked "Reserved, not to be 2249 allocated". 2251 o Values 1 through 31 are to be assigned by "Standards Action" 2252 [RFC8126] and are referred to as the Special Purpose SFT values. 2254 o Other values (32 through 65534) are to be assigned according to 2255 the "First Come First Served" policy [RFC8126]. 2257 This document should be given as a reference for this registry. 2259 The new registry should track: 2261 o Value 2263 o Name 2265 o Reference Document or Contact 2267 o Registration Date 2269 The registry should initially be populated as follows: 2271 Value | Name | Reference | Date 2272 ------+-----------------------+---------------+--------------- 2273 1 | Change Sequence | [This.I-D] | Date-to-be-set 2275 10.6. New Generic Transitive Experimental Use Extended Community Sub- 2276 Types 2278 IANA maintains a registry of "Border Gateway Protocol (BGP) 2279 Parameters" with a subregistry of "Generic Transitive Experimental 2280 Use Extended Community Sub-Type". IANA is requested to assign a new 2281 sub-type as follows: 2283 "Flow Spec for SFC Classifiers" (TBD4 in this document) with this 2284 document as the reference. 2286 10.7. New BGP Transitive Extended Community Types 2288 IANA maintains a registry of "Border Gateway Protocol (BGP) 2289 Parameters" with a subregistry of "BGP Transitive Extended Community 2290 Types". IANA is requested to assign new types as follows: 2292 "SFI Pool Identifier" (TBD6 in this document) with this document 2293 as the reference. 2295 "MPLS Label Stack Mixed Swapping/Stacking Labels" (TBD7 in this 2296 document) with this document as the reference. 2298 10.8. SPI/SI Representation 2300 IANA is requested to assign a codepoint from the "BGP Tunnel 2301 Encapsulation Attribute Sub-TLVs" registry for the "SPI/SI 2302 Representation Sub-TLV" (TBD5 in this document) with this document 2303 being the reference. 2305 11. Contributors 2307 Stuart Mackie 2308 Juniper Networks 2310 Email: wsmackie@juinper.net 2312 Keyur Patel 2313 Arrcus, Inc. 2315 Email: keyur@arrcus.com 2317 Avinash Lingala 2318 AT&T 2320 Email: ar977m@att.com 2322 12. Acknowledgements 2324 Thanks to Tony Przygienda, Jeff Haas, and Andy Malis for helpful 2325 comments, and to Joel Halpern for discussions that improved this 2326 document. Yuanlong Jiang provided a useful review and caught some 2327 important issues. 2329 Andy Malis contributed text that formed the basis of Section 7.8. 2331 13. References 2333 13.1. Normative References 2335 [I-D.ietf-idr-tunnel-encaps] 2336 Rosen, E., Patel, K., and G. Velde, "The BGP Tunnel 2337 Encapsulation Attribute", draft-ietf-idr-tunnel-encaps-11 2338 (work in progress), February 2019. 2340 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2341 Requirement Levels", BCP 14, RFC 2119, 2342 DOI 10.17487/RFC2119, March 1997, 2343 . 2345 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 2346 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 2347 DOI 10.17487/RFC4271, January 2006, 2348 . 2350 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 2351 Networks (VPNs)", RFC 4364, DOI 10.17487/RFC4364, February 2352 2006, . 2354 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 2355 "Multiprotocol Extensions for BGP-4", RFC 4760, 2356 DOI 10.17487/RFC4760, January 2007, 2357 . 2359 [RFC5575] Marques, P., Sheth, N., Raszuk, R., Greene, B., Mauch, J., 2360 and D. McPherson, "Dissemination of Flow Specification 2361 Rules", RFC 5575, DOI 10.17487/RFC5575, August 2009, 2362 . 2364 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2365 Writing an IANA Considerations Section in RFCs", BCP 26, 2366 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2367 . 2369 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2370 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2371 May 2017, . 2373 [RFC8300] Quinn, P., Ed., Elzur, U., Ed., and C. Pignataro, Ed., 2374 "Network Service Header (NSH)", RFC 8300, 2375 DOI 10.17487/RFC8300, January 2018, 2376 . 2378 13.2. Informative References 2380 [I-D.ietf-mpls-sfc] 2381 Farrel, A., Bryant, S., and J. Drake, "An MPLS-Based 2382 Forwarding Plane for Service Function Chaining", draft- 2383 ietf-mpls-sfc-05 (work in progress), February 2019. 2385 [I-D.ietf-mpls-sfc-encapsulation] 2386 Malis, A., Bryant, S., Halpern, J., and W. Henderickx, 2387 "MPLS Encapsulation For The SFC NSH", draft-ietf-mpls-sfc- 2388 encapsulation-02 (work in progress), December 2018. 2390 [RFC6790] Kompella, K., Drake, J., Amante, S., Henderickx, W., and 2391 L. Yong, "The Use of Entropy Labels in MPLS Forwarding", 2392 RFC 6790, DOI 10.17487/RFC6790, November 2012, 2393 . 2395 [RFC7498] Quinn, P., Ed. and T. Nadeau, Ed., "Problem Statement for 2396 Service Function Chaining", RFC 7498, 2397 DOI 10.17487/RFC7498, April 2015, 2398 . 2400 [RFC7510] Xu, X., Sheth, N., Yong, L., Callon, R., and D. Black, 2401 "Encapsulating MPLS in UDP", RFC 7510, 2402 DOI 10.17487/RFC7510, April 2015, 2403 . 2405 [RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function 2406 Chaining (SFC) Architecture", RFC 7665, 2407 DOI 10.17487/RFC7665, October 2015, 2408 . 2410 Authors' Addresses 2412 Adrian Farrel 2413 Old Dog Consulting 2415 Email: adrian@olddog.co.uk 2417 John Drake 2418 Juniper Networks 2420 Email: jdrake@juniper.net 2422 Eric Rosen 2423 Juniper Networks 2425 Email: erosen52@gmail.com 2426 Jim Uttaro 2427 AT&T 2429 Email: ju1738@att.com 2431 Luay Jalil 2432 Verizon 2434 Email: luay.jalil@verizon.com