idnits 2.17.1 draft-ietf-sfc-hierarchical-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 29, 2017) is 2465 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'Virus' is mentioned on line 956, but not defined == Missing Reference: 'Monitor' is mentioned on line 968, but not defined == Missing Reference: 'CF' is mentioned on line 983, but not defined == Outdated reference: A later version (-08) exists of draft-ietf-sfc-control-plane-06 == Outdated reference: A later version (-28) exists of draft-ietf-sfc-nsh-05 == Outdated reference: A later version (-06) exists of draft-ietf-sfc-dc-use-cases-02 Summary: 0 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Service Function Chaining D. Dolson 3 Internet-Draft Sandvine 4 Intended status: Informational S. Homma 5 Expires: December 31, 2017 NTT 6 D. Lopez 7 Telefonica I+D 8 M. Boucadair 9 Orange 10 D. Liu 11 Alibaba Group 12 T. Ao 13 ZTE Corporation 14 V. Vu 15 Soongsil University 16 June 29, 2017 18 Hierarchical Service Function Chaining (hSFC) 19 draft-ietf-sfc-hierarchical-03 21 Abstract 23 Hierarchical Service Function Chaining (hSFC) is a network 24 architecture allowing an organization to decompose a large-scale 25 network into multiple domains of administration. 27 The goals of hSFC are to make a large-scale network easier to reason 28 about, simpler to control and to support independent functional 29 groups within large network operators. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at http://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on December 31, 2017. 48 Copyright Notice 50 Copyright (c) 2017 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (http://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 2. Hierarchical Service Function Chaining (hSFC) . . . . . . . . 4 67 2.1. Top Level . . . . . . . . . . . . . . . . . . . . . . . . 4 68 2.2. Lower Levels . . . . . . . . . . . . . . . . . . . . . . 5 69 3. Internal Boundary Node (IBN) . . . . . . . . . . . . . . . . 7 70 3.1. IBN Path Configuration . . . . . . . . . . . . . . . . . 8 71 3.1.1. Flow-Stateful IBN . . . . . . . . . . . . . . . . . . 8 72 3.1.2. Encoding Upper-Level Paths in Metadata . . . . . . . 10 73 3.1.3. Using Unique Paths per Upper-Level Path . . . . . . . 11 74 3.1.4. Nesting Upper-Level NSH within Lower-Level NSH . . . 11 75 3.1.5. Stateful / Metadata Hybrid . . . . . . . . . . . . . 12 76 3.2. Gluing Levels Together . . . . . . . . . . . . . . . . . 14 77 3.3. Decrementing Service Index . . . . . . . . . . . . . . . 14 78 3.4. Managing TTL . . . . . . . . . . . . . . . . . . . . . . 14 79 4. Sub-domain Classifier . . . . . . . . . . . . . . . . . . . . 15 80 5. Control Plane Elements . . . . . . . . . . . . . . . . . . . 15 81 6. Extension for Adapting to NSH-Unaware Service Functions . . . 16 82 6.1. Purpose . . . . . . . . . . . . . . . . . . . . . . . . . 17 83 6.2. Requirements for IBN . . . . . . . . . . . . . . . . . . 18 84 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 85 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 86 9. Security Considerations . . . . . . . . . . . . . . . . . . . 19 87 9.1. Control Plane . . . . . . . . . . . . . . . . . . . . . . 20 88 9.2. Infinite Forwarding Loops . . . . . . . . . . . . . . . . 20 89 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 90 10.1. Normative References . . . . . . . . . . . . . . . . . . 20 91 10.2. Informative References . . . . . . . . . . . . . . . . . 20 92 Appendix A. Examples of Hierarchical Service Function Chaining . 21 93 A.1. Reducing the Number of Service Function Paths . . . . . . 21 94 A.2. Managing a Distributed Data-Center Network . . . . . . . 23 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 97 1. Introduction 99 Service Function Chaining (SFC) is a technique for prescribing 100 differentiated traffic forwarding policies within an SFC-enabled 101 domain. SFC is described in detail in the SFC architecture document 102 [RFC7665], and is not repeated here. 104 This document focuses on the difficult problem of implementing SFC 105 across a large, geographically dispersed network, potentially 106 comprised of millions of hosts and thousands of network forwarding 107 elements, and which may involve multiple operational teams (with 108 varying functional responsibilities). We recognize that some Service 109 Functions (SFs) require bidirectional traffic for transport-layer 110 sessions (e.g., NATs, firewalls). We assume that some Service 111 Function Paths (SFPs) need to be selected on the basis of 112 application-specific data visible to the network, with transport- 113 layer coordinate (typically, 5-tuple) stickiness to specific SF 114 instances. 116 Difficult problems are often made easier by decomposing them in a 117 hierarchical (nested) manner. So instead of considering a single SFC 118 Control Plane ([I-D.ietf-sfc-control-plane]) that can manage (create, 119 withdraw, supervise, etc.) complete SFPs from one end of the network 120 to the other, we decompose the network into smaller domains operated 121 by as many SFC control plane components. Coordination between such 122 components is further discussed in the document. Each sub-domain may 123 support a subset of the network applications or a subset of the 124 users. Decomposing a network into multiple SFC-enabled domains 125 should permit end-to-end visibility of SFs and SFPs. Also, 126 decomposing should be done with care to ease monitoring and 127 troubleshooting of the network and services as a whole. The criteria 128 for decomposition a domain into multiple SFC-enabled sub-domains are 129 beyond the scope of this document. These criteria are deployment- 130 specific. 132 An example of simplifying a network by using multiple SFC-enabled 133 domains is further discussed in [I-D.ietf-sfc-dc-use-cases]. 135 We assume the SFC-aware nodes use NSH [I-D.ietf-sfc-nsh] or a similar 136 labeling mechanism. Sample examples are described in Appendix A. 138 The "domains" discussed in this document are assumed to be under 139 control of a single organization, such that there is a strong trust 140 relationship between the domains. The intention of creating multiple 141 domains is to improve the ability to operate a network. It is 142 outside of the scope of the document to consider domains operated by 143 different organizations. 145 2. Hierarchical Service Function Chaining (hSFC) 147 A hierarchy has multiple levels: the top-most level encompasses the 148 entire network domain to be managed, and lower levels encompass 149 portions of the network. These levels are discussed in the following 150 sub-sections. 152 2.1. Top Level 154 Considering the example depicted in Figure 1, a top-level network 155 domain includes SFC data plane components distributed over a wide 156 area, including: 158 o Classifiers (CFs), 160 o Service Function Forwarders (SFFs) and 162 o Sub-domains. 164 For the sake of clarity, components of the underlay network are not 165 shown; an underlay network is assumed to provide connectivity between 166 SFC data plane components. 168 Top-level SFPs carry packets from classifiers through a set of SFFs 169 and sub-domains, with the operations within sub-domains being opaque 170 to the higher levels. 172 We expect the system to include a top-level control plane having 173 responsibility for configuring forwarding policies and traffic 174 classification rules (see [I-D.ietf-sfc-control-plane]). The top- 175 level Service Chaining control plane manages end-to-end service 176 chains and associated service function paths from network edge points 177 to sub-domains and configures top-level classifiers at a coarse level 178 (e.g., based on source or destination host) to forward traffic along 179 paths that will transit across appropriate sub-domains. 181 Figure 1 shows one possible service chain passing from edge, through 182 two sub-domains, to network egress. The top-level control plane does 183 not configure traffic classification rules or forwarding policies 184 within the sub-domains. 186 At this network-wide level, the number of SFPs required is a linear 187 function of the number of ways in which a packet is required to 188 traverse different sub-domains and egress the network. Note that the 189 various paths which may be followed within a sub-domain are not 190 represented by distinct network-wide SFPs; specific policies at the 191 ingress nodes of each sub-domain bind flows to sub-domain paths. 193 Packets are classified at the edge of the network to select the paths 194 by which sub-domains are to be traversed. At the ingress of each 195 sub-domain, packets are reclassified to paths directing them to the 196 required SFs of the sub-domain. At the egress of each sub-domain, 197 packets are returned to the top-level paths. Contrast this with an 198 approach requiring the top-level classifier to select paths to 199 specify all of the SFs in each sub-domain. 201 It should be assumed that some SFs require bidirectional symmetry of 202 paths (see more in Section 4). Therefore the classifiers at the top 203 level must be configured with policies ensuring outgoing packets take 204 the reverse path of incoming packets through sub-domains. 206 +------------+ 207 |Sub-domain#1| 208 | in DC1 | 209 +----+-------+ 210 | 211 .---- SFF1 ------. +--+ 212 +--+ / / | \--|CF| 213 --->|CF|--/---->' | \ +--+ 214 +--+ / SC#1 | \ 215 | | | 216 | V .------>|---> 217 | / / | 218 \ | / / 219 +--+ \ | / / +--+ 220 |CF|---\ | / /---|CF| 221 +--+ '---- SFF2 ------' +--+ 222 | 223 +----+-------+ 224 |Sub-domain#2| 225 | in DC2 | 226 +------------+ 228 One path is shown from edge classifier to SFF1 to Sub-domain#1 229 (residing in data-center1) to SFF1 to SFF2 (residing in data-center 230 2) to Sub-domain#2 to SFF2 to network egress. 232 Figure 1: Network-wide view of top level of hierarchy 234 2.2. Lower Levels 236 Each of the sub-domains in Figure 1 is an SFC-enabled domain. 238 Unlike the top level, data packets entering the sub-domain are 239 already SFC-encapsulated. Figure 2 shows a sub-domain interfaced 240 with a higher-level domain by means of an Internal Boundary Node 241 (IBN). It is the purpose of the IBN to apply classification rules 242 and direct the packets to the selected local SFPs terminating at an 243 egress IBN. The egress IBN finally restores packets to the original 244 SFC shim and hands them off to SFFs. 246 Each sub-domain intersects a subset of the total paths that are 247 possible in the higher-level domain. An IBN is concerned with 248 higher-level paths, but only those traversing its sub-domain. A top- 249 level control element may configure the IBN as an SF (i.e., the IBN 250 plays the SF role in the top-level domain). 252 Each sub-domain is likely to have a control plane that can operate 253 independently of the top-level control plane, managing 254 classification, forwarding paths, etc. within the level of the sub- 255 domain, with the details being opaque to the upper-level control 256 elements. Section 3 provides more details about the behavior of an 257 IBN. 259 The sub-domain control plane configures the classification rules in 260 the IBN, where SFC encapsulation of the top-level domain is converted 261 to/from SFC encapsulation of the lower-level domain. The sub-domain 262 control plane also configures the forwarding rules in the SFFs of the 263 sub-domain. 265 +----+ +-----+ +----------------------+ +-----+ 266 | | | SFF | | IBN 1 (in DC 1) | | SFF | 267 | |SC#1| | | +----------------+ | | | 268 ->| |===============>| SFF |================> 269 | | +-----+ | +----------------+ | +-----+ 270 | CF | | | ^ | 271 | | | v | | 272 | | |+--------------------+| Top domain 273 | | ||CF, fwd/rev mapping || 274 | | * * * * *|| and "glue" || * * * * * 275 | | * |+--------------------+| * 276 +----+ * | | | | | | Sub * 277 * +-o-o--------------o-o-+ domain* 278 * SC#2 | |SC#1 ^ ^ #1 * 279 * +-----+ | | | * 280 * | V | | * 281 * | +---+ +------+ | | * 282 * | |SFF|->|SF#1.1|--+ | * 283 * | +---+ +------+ | * 284 * V | * 285 * +---+ +------+ +---+ +------+ * 286 * |SFF|->|SF#2.1|->|SFF|->|SF#2.2| * 287 * +---+ +------+ +---+ +------+ * 288 * * * * * * * * * * * * * * * * * * * * * * 289 Legend: 290 *** Sub-domain boundary 291 === top-level chain 292 --- low-level chain 294 Figure 2: Sub-domain within a higher-level domain 296 If desired, the pattern can be applied recursively. For example, 297 SF#1.1 in Figure 2 could be a sub-domain of the sub-domain. 299 3. Internal Boundary Node (IBN) 301 As mentioned in the previous section, a network element termed 302 "Internal Boundary Node" (IBN) is responsible for bridging packets 303 between higher and lower layers of SFC-enabled domains. It behaves 304 as an SF to the higher level (Section 2.1), and looks like a 305 classifier and end-of-chain to the lower level (Section 2.2). 307 To achieve the benefits of hierarchy, the IBN should be applying more 308 granular traffic classification rules at the lower level than the 309 traffic passed to it. This means that the number of SFPs within the 310 lower level is greater than the number of SFPs arriving to the IBN. 312 The IBN is also the termination of lower-level SFPs. This is because 313 the packets exiting lower-level SF paths must be returned to the 314 higher-level SF paths and forwarded to the next hop in the higher- 315 level domain. 317 When different metadata schemes are used at different levels, the IBN 318 has further responsibilities: when packets enter the sub-domain, the 319 IBN translates upper-level metadata into lower-level metadata; and 320 when packets leave the sub-domain at the termination of lower-level 321 SFPs, the IBN translates lower-level metadata into upper-level 322 metadata. 324 Appropriately configuring IBNs is key to ensure the consistency of 325 the overall SFC operation within a given domain that enables hSFC. 326 Classification rules (or lack thereof) in the IBN classifier can of 327 course impact higher levels. 329 3.1. IBN Path Configuration 331 The lower-level domain may be provisioned with valid high-level paths 332 or may allow any high-level paths. 334 When packets enter the sub-domain, the Service Path Identifier (SPI) 335 and Service Index (SI) are re-marked according to the path selected 336 by the (sub-domain) classifier. 338 At the termination of an SFP in the sub-domain, packets can be 339 restored to an original upper-level SFP by implementing one of these 340 methods: 342 1. Saving SPI and SI in transport-layer flow state (Section 3.1.1). 344 2. Pushing SPI and SI into a metadata header (Section 3.1.2). 346 3. Using unique lower-level paths per upper-level path coordinates 347 (Section 3.1.3). 349 4. Nesting NSH headers, encapsulating the higher-level NSH headers 350 within the lower-level NSH headers (Section 3.1.4). 352 5. Saving upper-level by a flow identifier (ID) and placing an hSFC 353 flow ID into a metadata header (Section 3.1.5). 355 3.1.1. Flow-Stateful IBN 357 An IBN can be flow-aware, returning packets to the correct higher- 358 level SFP on the basis, for example, of the transport-layer 359 coordinates (typically, a 5-tuple) of packets exiting the lower-level 360 SFPs. 362 When packets are received by the IBN on a higher-level path, the 363 classifier parses encapsulated packets for IP and transport-layer 364 (TCP, UDP, etc.) coordinates. State is created, indexed by some or 365 all transport-coordinates ({source-IP, destination-IP, source-port, 366 destination-port and transport protocol} typically). The state 367 contains at minimum the critical fields of the encapsulating SFC 368 header (SPI, SI, MD Type, flags); additional information carried in 369 the packet (metadata, TTL) may also be extracted and saved as state. 370 Note, that the some fields of a packet may be altered by an SF of the 371 sub-domain (e.g., source IP address). 373 Note that this state is only accessed by the classifier and 374 terminator functions of the sub-domain. Neither the SFFs nor SFs 375 have knowldge of this state; in fact they may be agnostic about being 376 in a sub-domain. 378 One approach is to ensure that packets are terminated at the same IBN 379 at the end of the chain that classified the packet at the start of 380 the chain. If the packet is returned to a different egress IBN, 381 state must be synchronized between the IBNs. 383 When a packet returns to the IBN at the end of a chain (which is the 384 terminator of the lower-level chain), the SFC header is removed, the 385 packet is parsed for IP and transport-layer coordinates, and state is 386 retrieved from them. The state contains the information required to 387 forward the packet within the higher-level service chain. 389 State cannot be created by packets arriving from the lower-level 390 chain; when state cannot be found for such packets, they must be 391 dropped. 393 This stateful approach is limited to use with SFs that retain the 394 transport coordinates of the packet. This approach cannot be used 395 with SFs that modify those coordinates (e.g., NATs) or otherwise 396 create packets for new coordinates other than those received (e.g., 397 as an HTTP cache might do to retrieve content on behalf of the 398 original flow). In both cases, the fundamental problem is the 399 inability to forward packets when state cannot be found for the 400 packet transport-layer coordinates. 402 In the stateful approach, there are issues caused by having state, 403 such as how long the state should be maintained, as well as whether 404 the state needs to be replicated to other devices to create a highly 405 available network. 407 It is valid to consider the state to be disposable after failure, 408 since it can be re-created by each new packet arriving from the 409 higher-level domain. For example, if an IBN loses all flow state, 410 the state is re-created by an end-point retransmitting a TCP packet. 412 If an SFC domain handles multiple network regions (e.g., multiple 413 private networks), the coordinates may be augmented with additional 414 parameters, perhaps using some metadata to identify the network 415 region. 417 In this stateful approach, it is not necessary for the sub-domain's 418 control plane to modify paths when higher-level paths are changed. 419 The complexity of the higher-level domain does not cause complexity 420 in the lower-level domain. 422 Since it doesn't depend on NSH in the lower domain, this flow- 423 stateful approach can be applied to translation methods of converting 424 NSH to other forwarding techniques (refer to Section 6). 426 3.1.2. Encoding Upper-Level Paths in Metadata 428 An IBN can push the upper-level SPI and SI (or encoding thereof) into 429 a metadata field of the lower-level encapsulation (e.g., placing 430 upper-level path information into a metadata field of NSH). When 431 packets exit the lower-level path, the upper-level SPI and SI can be 432 restored from the metadata retrieved from the packet. 434 This approach requires the SFs in the path to be capable of 435 forwarding the metadata and appropriately attaching metadata to any 436 packets injected for a flow. 438 Using new metadata header may inflate packet size when variable- 439 length metadata (type 2 from NSH [I-D.ietf-sfc-nsh]) is used. 441 It is conceivable that the MD-type 1 Mandatory Context Header fields 442 of NSH [I-D.ietf-sfc-nsh] are not all relevant to the lower-level 443 domain. In this case, one of the metadata slots of the Mandatory 444 Context Header could be repurposed within the lower-level domain, and 445 restored when leaving. 447 If flags or TTL (see Section 3.4) from the original header also need 448 to be saved, more metadata space will be consumed. 450 In this metadata approach, it is not necessary for the sub-domain's 451 control element to modify paths when higher-level paths are changed. 452 The complexity of the higher-level domain does not increase 453 complexity in the lower-level domain. 455 3.1.3. Using Unique Paths per Upper-Level Path 457 This approach assumes that paths within the sub-domain are 458 constrained so that a SPI (of the sub-domain) unambiguously indicates 459 the egress SPI and SI (of the upper domain). This allows the 460 original path information to be restored at sub-domain egress from a 461 look-up table using the sub-domain SPI. 463 Whenever the upper-level domain provisions a path via the lower-level 464 domain, the lower-level domain control plane must provision 465 corresponding paths to traverse the lower-level domain. 467 A down-side of this approach is that the number of paths in the 468 lower-level domain is multiplied by the number of paths in the 469 higher-level domain that traverse the lower-level domain. I.e., a 470 sub-path must be created for each combination of upper SPI/SI and 471 lower chain. 473 A further down-side of this approach is that it requires upper and 474 lower levels to utilize the same metadata configuration. 476 Furthermore, this approach does not allow any information to be 477 stashed away in state or embedded in metadata. E.g., the TTL 478 modifications by the lower level cannot be hidden from the upper 479 level. 481 3.1.4. Nesting Upper-Level NSH within Lower-Level NSH 483 When packets arrive at an IBN in the top-level domain, the classifier 484 in the IBN determines the path for the lower-level domain and pushes 485 the new NSH header in front of the original NSH header. 487 As shown in Figure 3 the Lower-NSH header used to forward packets in 488 the lower-level domain precedes the Upper-NSH header from the top- 489 level domain. 491 +------------------+ 492 | Overlay Header | 493 +------------------+ 494 | Lower-NSH Header | 495 +------------------+ 496 | Upper-NSH Header | 497 +------------------+ 498 | Original Packet | 499 +------------------+ 501 Figure 3: Encapsulation of NSH within NSH 503 The traffic with the above stack of two NSH headers is to be 504 forwarded according to the Lower-NSH header in the lower-level SFC 505 domain. The Upper-NSH header is preserved in the packets but not 506 used for forwarding. At the last SFF of the chain of the lower-level 507 domain (which resides in the IBN), the Lower-NSH header is removed 508 from the packet, and then the packet is forwarded by the IBN to an 509 SFF of the upper-level domain. The packet will be forwarded in the 510 top-level domain according to the Upper-NSH header. 512 With such encapsulation, Upper-NSH information is carried along the 513 extent of the lower-level chain without modification. 515 A benefit of this approach is that it does not require state in the 516 IBN or configuration to encode fields in meta-data. All header 517 fields, including flags and TTL are easily restored when the chains 518 of the sub-domain terminate. 520 However, the down-side is it does require SFC-aware SFs in the lower- 521 level domain to be able to parse multiple NSH layers. If an SFC- 522 aware SF injects packets, it must also be able to deal with adding 523 appropriate multiple layers of headers to injected packets. 525 By increasing packet overhead, nesting may lead to fragmentation or 526 decreased MTU in some networks. 528 3.1.5. Stateful / Metadata Hybrid 530 The basic idea of this approach is for the IBN to save upper domain 531 encapsulation information such that it can be retrieved by a unique 532 identifier, termed an "hSFC Flow ID". An example is shown in 533 Table 1. 535 +-----------+-----+-----+----------+----------+----------+----------+ 536 | hSFC Flow | SPI | SI | Context1 | Context2 | Context3 | Context4 | 537 | ID | | | | | | | 538 +-----------+-----+-----+----------+----------+----------+----------+ 539 | 1 | 45 | 254 | 100 | 2112 | 12345 | 7 | 540 +-----------+-----+-----+----------+----------+----------+----------+ 542 Table 1: Example Mapping of an hSFC Flow ID to Upper-Level Header 544 The ID is placed in the metadata in NSH headers of the packet in the 545 lower domain, as shown in Figure 4. When packets exit the lower 546 domain, the IBN uses the ID to retrieve the appropriate NSH 547 encapsulation for returning the packet to the upper domain. 549 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 550 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 551 |Ver|O|R| TTL | Length |R|R|R|R|MD Type| Next Protocol | 552 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 553 | Service Path Identifer | Service Index | 554 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 555 | hSFC Flow ID | 556 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 557 | Mandatory Context Header | 558 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 559 | Mandatory Context Header | 560 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 561 | Mandatory Context Header | 562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 564 Figure 4: Storing hSFC Flow ID in lower-level metadata 566 Advantages of this approach include: 568 o Does not require state based on 5-tuple, so it works with SFs that 569 change the IP addresses or ports of a packet such as NATs. 571 o Does not require all domains to have the same metadata scheme. 573 o Can be used to restore any upper-domain information, including 574 metadata, flags and TTL, not just service path. 576 o The lower domain only requires a single item of metadata 577 regardless of the number of items of metadata used in the upper 578 domain. (For MD-Type 1, this leaves 3 slots for use in the lower 579 domain.) 581 o No special functionality is required to be supported by an SFC- 582 aware SF, other than the usual ability to preserve metadata and to 583 apply metadata to injected packets. 585 Disadvantages include those of other stateful approaches, including 586 state timeout and replication mentioned in Section 3.1.1. 588 There may be a large number of unique NSH encapsulations to be 589 stored, given that the hSFC Flow ID must represent all of the bits in 590 the upper-level encapsulation. This might consume a lot of memory or 591 create out-of-memory situations in which IDs cannot be created or old 592 IDs are discarded while still in use. 594 3.2. Gluing Levels Together 596 The SPI or metadata included in a packet received by the IBN may be 597 used as input to reclassification and path selection within a lower- 598 level domain. 600 In some cases the meanings of the various path IDs and metadata must 601 be coordinated between domains for the sake of proper end-to-end SFC 602 operation. 604 One approach is to use well-known identifier values in metadata, 605 maintained in a global registry. 607 Another approach is to use well-known labels for chain identifiers or 608 metadata, as an indirection to the actual identifiers. The actual 609 identifiers can be assigned by control-plane systems. For example, a 610 sub-domain classifier could have a policy, "if pathID=classA then 611 chain packet to path 1234"; the higher-level controller would be 612 expected to configure the concrete higher-level pathID for classA. 614 3.3. Decrementing Service Index 616 Because the IBN acts as an SFC-aware SF to the higher-level domain, 617 it must decrement the Service Index in the NSH headers of the higher- 618 level path. This operation should be undertaken when the packet is 619 first received by the IBN, before applying any of the strategies of 620 Section 3.1, immediately prior to classification. 622 3.4. Managing TTL 624 The NSH base header contains a TTL field [I-D.ietf-sfc-nsh]. There 625 is a choice: 627 a sub-domain may appear as a pure service function, which should 628 not decrement the TTL from the perspective of the higher-level 629 domain, 631 or all of the TTL changes within the sub-domain may be visible to 632 the higher-level domain. 634 The network operator should be given control of this behavior, 635 choosing whether to expose the lower-level topology to the higher 636 layer. An implementation may support per-packet policy, allowing 637 some users to perform a layer-transcending trace-route, for example. 639 The choice affects whether the methods of restoring the paths in the 640 sub-sections of Section 3.1 restore a saved version of TTL or 641 propagate it with the packet. The method of Section 3.1.3 does not 642 permit topology-hiding. The other methods of Section 3.1.1, 643 Section 3.1.2, Section 3.1.4, and Section 3.1.5 have unique methods 644 for restoring saved versions of TTL. 646 4. Sub-domain Classifier 648 Within the sub-domain (referring to Figure 2), once the IBN removes 649 higher-level encapsulation from incoming packets, it sends the 650 packets to the classifier, which selects the encapsulation for the 651 packet within the sub-domain. 653 One of the goals of the hierarchical approach is to make it easy to 654 have transport-flow-aware service chaining with bidirectional paths. 655 For example, it is desired that for each TCP flow, the client-to- 656 server packets traverse the same SF instances as the server-to-client 657 packets, but in the opposite sequence. We call this bidirectional 658 symmetry. If bidirectional symmetry is required, it is the 659 responsibility of the control plane to be aware of symmetric paths 660 and configure the classifier to chain the traffic in a symmetric 661 manner. 663 Another goal of the hierarchical approach is to simplify the 664 mechanisms of scaling in and scaling out SFs. All of the 665 complexities of load-balancing among multiple SFs can be handled 666 within a sub-domain, under control of the classifier, allowing the 667 higher-level domain to be oblivious to the existence of multiple SF 668 instances. 670 Considering the requirements of bidirectional symmetry and load- 671 balancing, it is useful to have all packets entering a sub-domain to 672 be received by the same classifier or a coordinated cluster of 673 classifiers. There are both stateful and stateless approaches to 674 ensuring bidirectional symmetry. 676 5. Control Plane Elements 678 Although SFC control protocols have not yet been standardized (2016), 679 from the point of view of hierarchical service function chaining we 680 have these expectations: 682 o Each control-plane instance manages a single level of hierarchy of 683 a single domain. 685 o Each control plane is agnostic about other levels of hierarchy. 686 This aspect allows humans to reason about the system within a 687 single domain and allows control-plane algorithms to use only 688 domain-local inputs. Top-level control does not need visibility 689 to sub-domain policies, nor does sub-domain control need 690 visibility to higher-level policies. (Top-level control considers 691 a sub-domain as though it were an SF.) 693 o Sub-domain control planes are agnostic about control planes of 694 other sub-domains. This allows both humans and machines to 695 manipulate sub-domain policy without considering policies of other 696 domains. 698 Recall that the IBN acts as an SFC-aware SF in the higher-level 699 domain (receiving SF instructions from the higher-level control 700 plane) and as a classifier in the lower-level domain (receiving 701 classification rules from the sub-domain control plane). In this 702 view, it is the IBN that glues the layers together. 704 The above expectations are not intended to prohibit network-wide 705 control. A control hierarchy can be envisaged to distribute 706 information and instructions to multiple domains and sub-domains. 707 Control hierarchy is outside the scope of this document. 709 6. Extension for Adapting to NSH-Unaware Service Functions 711 The hierarchical approach can be used for dividing networks into NSH- 712 aware and NSH-unaware domains by converting NSH encapsulation to 713 other forwarding techniques (e.g., 5-tuple-based routing with 714 OpenFlow), as shown in Figure 5. 716 * * * * * * * * * * * * * * * * * * 717 * NSH-aware domain * 718 * +-------+ +-------+ * 719 * | SF#1 | | SF#5 | * 720 * +-o---o-+ +-o---o-+ * 721 * ^ | ^ | * 722 * +-|---|-+ +-|---|-+ * 723 * | |SFF| | | |SFF| | * 724 * +-|---|-+ +-|---|-+ * 725 * . | | . * 726 * +--+ / | | \ * 727 -->|CF|--' | | '-------> 728 * +--+ v | * 729 * +---o-----------o---+ * 730 .*.*.*.*.| / | IBN | \ |*.*.*. 731 . +-o--o---------o--o-+ . 732 . | | ^ ^ . 733 . | +-+ +-+ | . 734 . +---+ v | +---+ . 735 . | +-o-----o-+ | . 736 . | | SF#2 | | . 737 . | +---------+ | . 738 . +--+ +--+ . 739 . | +---------+ | . 740 . v | v | . 741 . +-o---o-+ +-o---o-+ . 742 . | SF#3 | | SF#4 | . 743 . +-------+ +-------+ . 744 . NSH-unaware domain . 745 . . . . . . . . . . . . . . . . . . 747 SF#1 and SF#5 are NSH-aware and SF#2, SF#3 and SF#4 are NSH-unaware. 748 In the NSH-unaware domain, packets are conveyed in a format supported 749 by SFs which are deployed there. 751 Figure 5: Dividing NSH-aware and NSH-unaware domains 753 6.1. Purpose 755 This approach is expected to facilitate service chaining in networks 756 in which NSH-aware and NSH-unaware SFs coexist. Some examples of 757 such situations are: 759 o In a period of transition from legacy SFs to NSH-aware SFs, and 761 o Supporting multi-tenancy. 763 6.2. Requirements for IBN 765 In this usage, an IBN classifier is required to have an NSH 766 conversion table for applying packets to appropriate lower-level 767 paths and returning packets to the correct higher-level paths. For 768 example, the following methods would be used for saving/restoring 769 upper-level path information: 771 o Saving SPI and SI in transport-layer flow state (refer to 772 Section 3.1.1) and 774 o Using unique lower-level paths per upper-level NSH coordinates 775 (refer to Section 3.1.3). 777 Especially, the use of unique paths approach would be good for 778 translating NSH to a different forwarding technique in the lower 779 level. A single path in the upper level may be branched to multiple 780 paths in the lower level such that any lower-level path is only used 781 by one upper-level path. This allows unambiguous restoration to the 782 upper-level path. 784 In addition, an IBN might be required to convert metadata contained 785 in NSH to the format appropriate to the packet in the lower-level 786 path. For example, some legacy SFs identify subscriber based on 787 information of network topology, such as VID, and IBN would be 788 required to create VLAN to packets from metadata if subscriber 789 identifier is conveyed as metadata in higher-level domains. 791 Other fundamental functions required as IBN (e.g., maintaining 792 metadata of upper level or decrementing Service Index) are same as 793 normal usage. 795 It is useful to permit metadata to be transferred between levels of a 796 hierarchy. Metadata from a higher level may be useful within a sub- 797 domain and a sub-domain may augment metadata for consumption in an 798 upper domain. However, allowing uncontrolled metadata between 799 domains may lead to forwarding failures. 801 In order to prevent SFs of low-level SFC-enabled domains from 802 supplying (illegitimate) metadata, IBNs may be instructed to 803 permit specific metadata types to exit the sub-domain. Such 804 control over the metadata in the upper level is the responsibility 805 of the upper-level control plane. 807 To limit unintentional metadata reaching SFs of low-level SFC- 808 enabled sub-domains, IBNs may be instructed to permit specific 809 metadata types into the sub-domain. Such control of metadata in 810 the low-level domain is the responsibility of the lower-level 811 control plane. 813 7. Acknowledgements 815 The concept of Hierarchical Service Path Domains was introduced in 816 [I-D.homma-sfc-forwarding-methods-analysis] as a means to improve 817 scalability of service chaining in large networks. 819 The concept of nested NSH headers was introduced in 820 [I-D.ao-sfc-for-dc-interconnect] as a means of creating hierarchical 821 SFC in a data center. 823 The authors would like to thank the following individuals for 824 providing valuable feedback: 826 Ron Parker 828 Christian Jacquenet 830 Jie Cao 832 8. IANA Considerations 834 This memo includes no request to IANA. 836 9. Security Considerations 838 Hierarchical service function chaining makes use of service chaining 839 architecture, and hence inherits the security considerations 840 described in the architecture document [RFC7665]. 842 Furthermore, hierarchical service function chaining inherits security 843 considerations of the data-plane protocols (e.g., NSH) and control- 844 plane protocols used to realize the solution. 846 The systems described in this document bear responsibility for 847 forwarding Internet traffic. In some cases the systems are 848 responsible for maintaining separation of traffic in private 849 networks. 851 This document describes systems within different domains of 852 administration that must have consistent configurations in order to 853 properly forward traffic and to maintain private network separation. 854 Any protocol designed to distribute the configurations must be secure 855 from tampering. 857 All of the systems and protocols must be secure from modification by 858 untrusted agents. 860 9.1. Control Plane 862 Security considerations related to the control plane are discussed in 863 [I-D.ietf-sfc-control-plane]. These considerations apply for both 864 high-level and low-level domains. 866 9.2. Infinite Forwarding Loops 868 Distributing policies among multiple domains may lead to forwarding 869 loops. NSH supports the ability to detect loops (Section 3.3 and 870 Section 3.4), but means to ensure the consistency of the policies 871 should be enabled at all levels of a domain. Within the context of 872 hSFC, it is the responsibility of the Control Elements at all levels 873 to prevent such (unwanted) loops. 875 10. References 877 10.1. Normative References 879 [I-D.ietf-sfc-control-plane] 880 Boucadair, M., "Service Function Chaining (SFC) Control 881 Plane Components & Requirements", draft-ietf-sfc-control- 882 plane-06 (work in progress), May 2016. 884 [I-D.ietf-sfc-nsh] 885 Quinn, P. and U. Elzur, "Network Service Header", draft- 886 ietf-sfc-nsh-05 (work in progress), May 2016. 888 [RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function 889 Chaining (SFC) Architecture", RFC 7665, 890 DOI 10.17487/RFC7665, October 2015, 891 . 893 10.2. Informative References 895 [I-D.ao-sfc-for-dc-interconnect] 896 Ao, T. and W. Bo, "Hierarchical SFC for DC 897 Interconnection", draft-ao-sfc-for-dc-interconnect-01 898 (work in progress), October 2015. 900 [I-D.homma-sfc-forwarding-methods-analysis] 901 Homma, S., Naito, K., Lopez, D., Stiemerling, M., Dolson, 902 D., Gorbunov, A., Leymann, N., Bottorff, P., and d. 903 don.fedyk@hpe.com, "Analysis on Forwarding Methods for 904 Service Chaining", draft-homma-sfc-forwarding-methods- 905 analysis-05 (work in progress), January 2016. 907 [I-D.ietf-sfc-dc-use-cases] 908 Surendra, S., Tufail, M., Majee, S., Captari, C., and S. 909 Homma, "Service Function Chaining Use Cases In Data 910 Centers", draft-ietf-sfc-dc-use-cases-02 (work in 911 progress), January 2015. 913 Appendix A. Examples of Hierarchical Service Function Chaining 915 The advantage of hierarchical service function chaining compared with 916 normal or flat service function chaining is that it can reduce the 917 management complexity significantly. This section discusses examples 918 that show those advantages. 920 A.1. Reducing the Number of Service Function Paths 922 In this case, hierarchical service function chaining is used to 923 simplify service function chaining management by reducing the number 924 of Service Function Paths. 926 As shown in Figure 6, there are two domains, each with different 927 concerns: a Security Domain that selects Service Functions based on 928 network conditions and an Optimization Domain that selects Service 929 Functions based on traffic protocol. 931 In this example there are five security functions deployed in the 932 Security Domain. The Security Domain operator wants to enforce the 933 five different security policies, and the Optimization Domain 934 operator wants to apply different optimizations (either cache or 935 video optimization) to each of these two types of traffic. If we use 936 flat SFC (normal branching), 10 SFPs are needed in each domain. In 937 contrast, if we use hierarchical SFC, only 5 SFPs in Security Domain 938 and 2 SFPs in Optimization Domain will be required, as shown in 939 Figure 7. 941 In the flat model, the number of SFPs is the product of the number of 942 functions in all of the domains. In the hSFC model, the number of 943 SFPs is the sum of the number of functions. For example, adding a 944 "bypass" path in the Optimization Domain would cause the flat model 945 to require 15 paths (5 more), but cause the hSFC model to require one 946 more path in the Optimization Domain. 948 . . . . . . . . . . . . . . . . . . . . . . . . . 949 . Security Domain . . Optimization Domain . 950 . . . . 951 . +-1---[ ]----------------->[Cache ]-------> 952 . | [ WAF ] . . . 953 . +-2-->[ ]----------------->[Video Opt.]----> 954 . | . . . 955 . +-3---[Anti ]----------------->[Cache ]-------> 956 . | [Virus] . . . 957 . +-4-->[ ]----------------->[Video Opt.]----> 958 . | . . . 959 . +-5-->[ ]----------------->[Cache ]-------> 960 [DPI]--->[CF]---| [ IPS ] . . . 961 . +-6-->[ ]----------------->[Video Opt.]----> 962 . | . . . 963 . +-7-->[ ]----------------->[Cache ]-------> 964 . | [ IDS ] . . . 965 . +-8-->[ ]----------------->[Video Opt.]----> 966 . | . . . 967 . +-9-->[Traffic]--------------->[Cache ]-------> 968 . | [Monitor] . . . 969 . +-10->[ ]--------------->[Video Opt.]----> 970 . . . . . . . . . . . . . . . . . . . . . . . . . 972 The classifier must select paths that determine the combination of 973 Security and Optimization concerns. 1:WAF+Cache, 2:WAF+VideoOpt, 974 3:AntiVirus+Cache, 4:AntiVirus+VideoOpt, 5: IPS+Cache, 975 6:IPS+VideoOpt, 7:IDS+Cache, 8:IDS+VideoOpt, 9:TrafficMonitor+Cache, 976 10:TrafficMonitor+VideoOpt 978 Figure 6: Flat SFC (normal branching) 980 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981 . Security Domain . . Optimization Domain . 982 . . . . 983 [CF]---->[ [CF] IBN ]---------->[ [CF] IBN ]----> 984 . | ^ . . | ^ . 985 . +----->[ WAF ]-----+ . . +-->[ Cache ]---------+ . 986 . | | . . | | . 987 . +-->[Anti-Virus]---+ . . +-->[Video Opt]-------+ . 988 . | | . . . 989 . +----->[ IPS ]-----+ . . . . . . . . . . . . . . . . 990 . | | . 991 . +----->[ IDS ]-----+ . 992 . | | . 993 . +-->[ Traffic ]----+ . 994 . [ Monitor ] . 995 . . . . . . . . . . . . . . . 997 Figure 7: Simplified path management with Hierarchical SFC 999 A.2. Managing a Distributed Data-Center Network 1001 Hierarchical service function chaining can be used to simplify inter- 1002 data-center SFC management. In the example of Figure 8, shown below, 1003 there is a central data center (Central DC) and multiple local data 1004 centers (Local DC#1, #2, #3) that are deployed in a geographically 1005 distributed manner. All of the data centers are under a single 1006 administrative domain. 1008 The central DC may have some service functions that the local DC 1009 needs, such that the local DC needs to chain traffic via the central 1010 DC. This could be because: 1012 o Some service functions are deployed as dedicated hardware 1013 appliances, and there is a desire to lower the cost (both CAPEX 1014 and OPEX) of deploying such service functions in all data centers. 1016 o Some service functions are being trialed, introduced or otherwise 1017 handle a relatively small amount of traffic. It may be cheaper to 1018 manage these service functions in a single central data center and 1019 steer packets to the central data center than to manage these 1020 service functions in all data centers. 1022 +-----------+ 1023 |Central DC | 1024 +-----------+ 1025 ^ ^ ^ 1026 | | | 1027 .---|--|---|----. 1028 / / | | \ 1029 / / | \ \ 1030 +-----+ / / | \ \ +-----+ 1031 |Local| | / | \ | |Local| 1032 |DC#1 |--|--. | .----|----|DC#3 | 1033 +-----+ | | | +-----+ 1034 \ | / 1035 \ | / 1036 \ | / 1037 '----------------' 1038 | 1039 +-----+ 1040 |Local| 1041 |DC#2 | 1042 +-----+ 1044 Figure 8: Simplify inter-DC SFC management 1046 For large data center operators, one local DC may have tens of 1047 thousands of servers and hundred of thousands of virtual machines. 1048 SFC can be used to manage user traffic. For example, SFC can be used 1049 to classify user traffic based on service type, DDoS state etc. 1051 In such large scale data center, using flat SFC is very complex, 1052 requiring a super-controller to configure all data centers. For 1053 example, any changes to Service Functions or Service Function Paths 1054 in the central DC (e.g., deploying a new SF) would require updates to 1055 all of the Service Function Paths in the local DCs accordingly. 1056 Furthermore, requirements for symmetric paths add additional 1057 complexity when flat SFC is used in this scenario. 1059 Conversely, if using hierarchical SFC, each data center can be 1060 managed independently to significantly reduce management complexity. 1061 Service Function Paths between data centers can represent abstract 1062 notions without regard to details within data centers. Independent 1063 controllers can be used for the top level (getting packets to pass 1064 the correct data centers) and local levels (getting packets to 1065 specific SF instances). 1067 Authors' Addresses 1069 David Dolson 1070 Sandvine 1071 408 Albert Street 1072 Waterloo, ON N2L 3V3 1073 Canada 1075 Phone: +1 519 880 2400 1076 Email: ddolson@sandvine.com 1078 Shunsuke Homma 1079 NTT, Corp. 1080 3-9-11, Midori-cho 1081 Musashino-shi, Tokyo 180-8585 1082 Japan 1084 Email: homma.shunsuke@lab.ntt.co.jp 1086 Diego R. Lopez 1087 Telefonica I+D 1088 Don Ramon de la Cruz, 82 1089 Madrid 28006 1090 Spain 1092 Phone: +34 913 129 041 1093 Email: diego.r.lopez@telefonica.com 1095 Mohamed Boucadair 1096 Orange 1097 Rennes 35000 1098 France 1100 Email: mohamed.boucadair@orange.com 1102 Dapeng Liu 1103 Alibaba Group 1104 Beijing 100022 1105 China 1107 Email: max.ldp@alibaba-inc.com 1108 Ting Ao 1109 ZTE Corporation 1110 No.889,Bibo Rd.,Zhangjiang Hi-tech Park 1111 Shanghai 201203 1112 China 1114 Phone: +86-21-688976442 1115 Email: ao.ting@zte.com.cn 1117 Vu Anh Vu 1118 Soongsil University 1119 369 Sangdo-ro 1120 Seoul, Dongjak-gu 06978 1121 Korea 1123 Email: vuva@dcn.ssu.ac.kr