idnits 2.17.1 draft-penno-sfc-yang-15.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 : ---------------------------------------------------------------------------- ** There are 22 instances of too long lines in the document, the longest one being 25 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 258 has weird spacing: '...ro name str...' == Line 288 has weird spacing: '...ro name str...' == Line 523 has weird spacing: '...or-type sfc...' == Line 525 has weird spacing: '...rw name sfc...' == Line 679 has weird spacing: '...ro name sfc...' == (6 more instances...) -- The document date (June 19, 2016) is 2860 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) == Missing Reference: 'RFC6020' is mentioned on line 98, but not defined == Missing Reference: 'RFC6241' is mentioned on line 100, but not defined == Unused Reference: 'RFC2616' is defined on line 2677, but no explicit reference was found in the text == Unused Reference: 'I-D.ietf-sfc-architecture' is defined on line 2685, but no explicit reference was found in the text == Unused Reference: 'I-D.ietf-sfc-nsh' is defined on line 2690, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) == Outdated reference: A later version (-28) exists of draft-ietf-sfc-nsh-04 Summary: 2 errors (**), 0 flaws (~~), 13 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SFC Netmod R. Penno 3 Internet-Draft P. Quinn 4 Intended status: Standards Track Cisco Systems 5 Expires: December 19, 2016 D. Zhou 6 J. Li 7 Intel Corporation 8 June 19, 2016 10 Yang Data Model for Service Function Chaining 11 draft-penno-sfc-yang-15 13 Abstract 15 This document defines a YANG data model that can be used to configure 16 and manage Service Function Chains. 18 Requirements Language 20 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 21 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 22 document are to be interpreted as described in RFC 2119 [RFC2119]. 24 Status of this Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on December 19, 2016. 41 Copyright Notice 43 Copyright (c) 2016 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents (http://trustee.ietf.org/ 48 license-info) in effect on the date of publication of this document. 49 Please review these documents carefully, as they describe your rights 50 and restrictions with respect to this document. Code Components 51 extracted from this document must include Simplified BSD License text 52 as described in Section 4.e of the Trust Legal Provisions and are 53 provided without warranty as described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 58 2. Definitions and Acronyms . . . . . . . . . . . . . . . . . . . 3 59 3. Understanding SFC Yang Models . . . . . . . . . . . . . . . . 3 60 4. Service Function (SF) . . . . . . . . . . . . . . . . . . . . 4 61 4.1. Module Structure . . . . . . . . . . . . . . . . . . . . . 4 62 4.2. Service Function Configuration Module . . . . . . . . . . 7 63 5. Service Function Type (SFT) . . . . . . . . . . . . . . . . . 12 64 5.1. Module Structure . . . . . . . . . . . . . . . . . . . . . 12 65 5.2. Service Function Type Configuration Model . . . . . . . . 12 66 6. Service Function Chain (SFC) . . . . . . . . . . . . . . . . . 15 67 6.1. Module Structure . . . . . . . . . . . . . . . . . . . . . 15 68 6.2. Service Function Chain Configuration Model . . . . . . . . 16 69 7. Service Function Path (SFP) . . . . . . . . . . . . . . . . . 20 70 7.1. Module Structure . . . . . . . . . . . . . . . . . . . . . 20 71 7.2. Service Function Path Configuration Model . . . . . . . . 21 72 8. Service Function Forwarder (SFF) . . . . . . . . . . . . . . . 26 73 8.1. Module Struture . . . . . . . . . . . . . . . . . . . . . 26 74 8.2. Service Function Forwarder Model . . . . . . . . . . . . . 28 75 9. Service Locator (SL) . . . . . . . . . . . . . . . . . . . . . 34 76 9.1. Module Structure . . . . . . . . . . . . . . . . . . . . . 34 77 9.2. Service Locator Module . . . . . . . . . . . . . . . . . . 34 78 10. Rendered Service Path (RSP) . . . . . . . . . . . . . . . . . 38 79 10.1. Module Structure . . . . . . . . . . . . . . . . . . . . 39 80 10.2. Rendered Service Path Module . . . . . . . . . . . . . . 41 81 11. Service Function Common (SFC-Common) . . . . . . . . . . . . . 48 82 11.1. Service Function Common Module . . . . . . . . . . . . . 48 83 12. Service Statistics (Sfc-ss) . . . . . . . . . . . . . . . . . 50 84 12.1. Service Statistics Chain Common Module . . . . . . . . . 50 85 13. Service Function Path Metadata (SFC-MD) . . . . . . . . . . . 52 86 13.1. Module Structure . . . . . . . . . . . . . . . . . . . . 53 87 13.2. Service Function Path Metadata Module . . . . . . . . . . 53 88 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 56 89 15. Security Considerations . . . . . . . . . . . . . . . . . . . 56 90 16. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 56 91 17. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 92 18. References . . . . . . . . . . . . . . . . . . . . . . . . . . 59 93 18.1. Normative References . . . . . . . . . . . . . . . . . . 59 94 18.2. Informative References . . . . . . . . . . . . . . . . . 60 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 60 97 1. Introduction 98 YANG [RFC6020] is a data definition language that was introduced to 99 define the contents of a conceptual data store that allows networked 100 devices to be managed using NETCONF [RFC6241]. YANG is proving 101 relevant beyond its initial confines, as bindings to other interfaces 102 (e.g. ReST) and encodings other than XML (e.g. JSON) are being 103 defined. Furthermore, YANG data models can be used as the basis of 104 implementation for other interfaces, such as CLI and programmatic 105 APIs. 107 This document defines a YANG data model that can be used to configure 108 and manage Service Function Chains 110 2. Definitions and Acronyms 112 The reader should be familiar with the terms contained in [I-D.ietf- 113 sfc-architecture], [I-D.ietf-sfc-problem-statement] ,[I-D.ietf-sfc- 114 nsh] and [I-D.quinn-vxlan-gpe] 116 3. Understanding SFC Yang Models 118 There are two main models in SFC: service-function (SF) and service- 119 function-forwarder (SFF). Most other models are used or derived from 120 those models. SF describes a service function like firewall, napt44, 121 dpi, http-proxy, etc. SFF describes a forwarding element that moves 122 packets along a service path. A SFF to function only needs to be 123 able to associate a Service Path ID and SI to a next hop data plane 124 locator. 126 The service-locator model provides a centralized place to register 127 transport and endpoints used with SFFs and SFs. This allows reuse 128 across a large number of other models since in networking usually 129 data plane locators are widely used. Some examples of transport 130 types are GRE, VXLAN-GPE and the data plane locator are IP:port, 131 VLAN-ID and MPLS Label. This model is imported by SFF, SF and 132 Rendered Service Path (RSP) models. 134 Service Function Type model serves as a registry for SF types. The 135 model can be easily extended by anyone looking to define their own 136 service type. This model is imported by SF and Service Function 137 Chain (SFC). Since a SFC is an abstract order of service function 138 types, having a registry of types is important. Furthermore, when we 139 instantiate a SFP and RSP from a SFC we need to choose the actual SFs 140 that will be traversed by the packets and this requires us to know 141 the type associated with a Service Function. 143 A service function path (SFP) is an intermediate step between SFC and 144 RSP. It allows the user to provide input or constraints into the 145 construction of a RSP. This input ranges from nothing to specifying 146 the entire path. During RSP construction, the controller examines 147 the SFP and 'fill in the blanks'. 149 One of the most important configuration aspects of a SF is the data 150 plane locators. A SF's data plane locators indicates how the SF can 151 be reached. A SF can have multiple data plane locators of different 152 transport and types as specified in the service locator model. 154 A SFF has also can have multiple data plane locators that indicate 155 how it can be reached. It is very important when constructing a RSP 156 to pick SFFs that have data plane locators of the same transport and 157 type so that the path works. A SFF has an additional very important 158 configuration container, the service function dictionary. The 159 service function dictionary stores the SFF's view of the Service 160 Functions. It contains all SFs and their data plane locators. 162 Therefore the Service Function data plane locators and the SFF 163 service function dictionary constitute two pieces of a puzzle. If 164 they fit, it means they can be used in a path, otherwise they can 165 not. 167 The RSP model is the result of creating a Service Function Chain, 168 applying policies through the Service Function Path and finally 169 choosing a collection of (SFF, SF) tuples that meet these criteria. 170 The RSP is an operational model, meaning it can read but not changed. 172 4. Service Function (SF) 174 This module describe a Service Function, which is an essential 175 building block of other modules. 177 4.1. Module Structure 178 module: service-function 179 +--rw service-functions 180 | +--rw service-function* [name] 181 | +--rw tenant-id? sfc-common:tenant-id 182 | +--rw rest-uri? inet:uri 183 | x--rw request_reclassification? boolean 184 | x--rw nsh-aware? boolean 185 | +--rw name sfc-common:sf-name 186 | +--rw type sfc-common:sft-type-name 187 | +--rw ip-mgmt-address? inet:ip-address 188 | +--rw sf-data-plane-locator* [name] 189 | +--rw name sfc-common:sf-data-plane-locator-name 190 | +--rw (locator-type) 191 | | +--:(ip) 192 | | | +--rw ip? inet:ip-address 193 | | | +--rw port? inet:port-number 194 | | +--:(lisp) 195 | | | +--rw eid? inet:ip-address 196 | | +--:(mac) 197 | | | +--rw mac? yang:mac-address 198 | | | +--rw vlan-id? uint16 199 | | +--:(function) 200 | | | +--rw function-name? string 201 | | +--:(mpls) 202 | | | +--rw mpls-label? uint32 203 | | +--:(other) 204 | | +--rw other-name? string 205 | +--rw transport? identityref 206 | +--rw service-function-forwarder? sfc-common:sff-name 207 +--ro service-functions-state 208 +--ro service-function-state* [name] 209 +--ro name sfc-common:sf-name 210 +--ro statistic-by-timestamp* [timestamp] 211 | +--ro timestamp uint64 212 | +--ro service-statistic 213 | +--ro bytes-in? yang:zero-based-counter64 214 | +--ro bytes-out? yang:zero-based-counter64 215 | +--ro packets-in? yang:zero-based-counter64 216 | +--ro packets-out? yang:zero-based-counter64 217 +--ro sf-service-path* [name] 218 +--ro name sfc-common:sfp-name 219 +--ro statistic-by-timestamp* [timestamp] 220 +--ro timestamp uint64 221 +--ro service-statistic 222 +--ro bytes-in? yang:zero-based-counter64 223 +--ro bytes-out? yang:zero-based-counter64 224 +--ro packets-in? yang:zero-based-counter64 225 +--ro packets-out? yang:zero-based-counter64 226 rpcs: 227 +---x delete-all-service-function 228 +---x put-service-function 229 | +--ro input 230 | +--ro tenant-id? sfc-common:tenant-id 231 | +--ro rest-uri? inet:uri 232 | x--ro request_reclassification? boolean 233 | x--ro nsh-aware? boolean 234 | +--ro name? sfc-common:sf-name 235 | +--ro type sfc-common:sft-type-name 236 | +--ro ip-mgmt-address? inet:ip-address 237 | +--ro sf-data-plane-locator* [name] 238 | +--ro name sfc-common:sf-data-plane-locator-name 239 | +--ro (locator-type) 240 | | +--:(ip) 241 | | | +--ro ip? inet:ip-address 242 | | | +--ro port? inet:port-number 243 | | +--:(lisp) 244 | | | +--ro eid? inet:ip-address 245 | | +--:(mac) 246 | | | +--ro mac? yang:mac-address 247 | | | +--ro vlan-id? uint16 248 | | +--:(function) 249 | | | +--ro function-name? string 250 | | +--:(mpls) 251 | | | +--ro mpls-label? uint32 252 | | +--:(other) 253 | | +--ro other-name? string 254 | +--ro transport? identityref 255 | +--ro service-function-forwarder? sfc-common:sff-name 256 +---x read-service-function 257 | +--ro input 258 | | +--ro name string 259 | +--ro output 260 | +--ro tenant-id? sfc-common:tenant-id 261 | +--ro rest-uri? inet:uri 262 | x--ro request_reclassification? boolean 263 | x--ro nsh-aware? boolean 264 | +--ro name? sfc-common:sf-name 265 | +--ro type sfc-common:sft-type-name 266 | +--ro ip-mgmt-address? inet:ip-address 267 | +--ro sf-data-plane-locator* [name] 268 | +--ro name sfc-common:sf-data-plane-locator-name 269 | +--ro (locator-type) 270 | | +--:(ip) 271 | | | +--ro ip? inet:ip-address 272 | | | +--ro port? inet:port-number 273 | | +--:(lisp) 274 | | | +--ro eid? inet:ip-address 275 | | +--:(mac) 276 | | | +--ro mac? yang:mac-address 277 | | | +--ro vlan-id? uint16 278 | | +--:(function) 279 | | | +--ro function-name? string 280 | | +--:(mpls) 281 | | | +--ro mpls-label? uint32 282 | | +--:(other) 283 | | +--ro other-name? string 284 | +--ro transport? identityref 285 | +--ro service-function-forwarder? sfc-common:sff-name 286 +---x delete-service-function 287 +--ro input 288 +--ro name string 290 4.2. Service Function Configuration Module 291 file "service-function@2014-07-01.yang" 293 module service-function { 295 namespace "urn:cisco:params:xml:ns:yang:sfc-sf"; 297 prefix sfc-sf; 299 import ietf-inet-types { 300 prefix inet; 301 revision-date 2013-07-15; 302 } 303 import service-locator { 304 prefix sfc-sl; 305 revision-date 2014-07-01; 306 } 307 import service-statistics { 308 prefix sfc-ss; 309 revision-date 2014-07-01; 310 } 311 import sfc-common { 312 prefix sfc-common; 313 revision-date 2015-10-17; 314 } 316 organization "Cisco Systems, Inc."; 317 contact "Reinaldo Penno "; 319 description 320 "This module contains a collection of YANG definitions for 321 managing service function."; 323 revision 2014-07-01 { 324 description 325 "Changes based on Opendaylight Testing."; 326 reference 327 "https://tools.ietf.org/html/draft-penno-sfc-yang"; 328 } 330 grouping service-function-base { 331 description 332 "A group with all base nodes to describe service function"; 333 leaf name { 334 type sfc-common:sf-name; 335 description 336 "The name of the service function."; 337 } 338 leaf type { 339 type sfc-common:sft-type-name; 340 mandatory true; 341 description 342 "Service Function Type from service-function-type yang 343 model"; 344 } 345 leaf ip-mgmt-address { 346 type inet:ip-address; 347 description 348 "The IP and port used to configure this service-function"; 349 } 350 list sf-data-plane-locator { 351 key "name"; 352 description 353 "A network data-plane locator"; 354 leaf name { 355 type sfc-common:sf-data-plane-locator-name; 356 description 357 "A unique string that represents this 358 data-plane-locator"; 359 } 360 uses sfc-sl:data-plane-locator; 361 leaf service-function-forwarder { 362 type sfc-common:sff-name; 363 description 364 "The service function forwarder associated with this 365 locator"; 366 } 367 } 368 } 370 grouping service-function-entry { 371 description 372 "This group bundles together all information related to a 373 single service function"; 374 leaf tenant-id { 375 type sfc-common:tenant-id; 376 description 377 "This SF was created for a specific tenant-id"; 378 } 379 leaf rest-uri { 380 type inet:uri; 381 description "URI of REST based management"; 382 } 383 leaf request_reclassification { 384 type boolean; 385 status deprecated; 386 description 387 "This leaf determines whether SF can request 388 reclassification by the SFF"; 389 } 390 leaf nsh-aware { 391 type boolean; 392 status deprecated; 393 description "Whether this SF can process NSH headers"; 394 } 395 uses service-function-base; 397 } 399 container service-functions { 400 description 401 "A function that is responsible for specific 402 treatment of received packets. A Service Function can act at 403 various layers of a protocol stack (e.g., at the network layer 404 or other OSI layers). A Service Function can be a virtual 405 element or be embedded in a physical network element. One of 406 multiple Service Functions can be embedded in the same network 407 element. Multiple occurrences of the Service Function can be 408 enabled in the same administrative domain. 410 One or more Service Functions can be involved in the delivery 411 of added-value services. A non-exhaustive list of Service 412 Functions includes: firewalls, WAN and application 413 acceleration, Deep Packet Inspection (DPI),a LI (Lawful 414 Intercept) module, server load balancers, NAT44 [RFC3022], 415 NAT64 [RFC6146], NPTv6 [RFC6296], HOST_ID injection, HTTP 416 Header Enrichment functions, TCP optimizer, etc. 418 An SF may be SFC encapsulation aware, that is it receives, and 419 acts on information in the SFC encapsulation, or unaware in 420 which case data forwarded to the service does not contain the 421 SFC encapsulation."; 423 list service-function { 424 key "name"; 425 description 426 "This list holds configuration data for all service functions 427 in the domain"; 428 uses service-function-entry; 429 } 430 } 432 container service-functions-state { 433 config false; 434 description 435 "This container hold operational state for all service 436 functions"; 437 list service-function-state { 438 key "name"; 439 description 440 "This list holds operational data for all service functions 441 in the domain"; 442 leaf name { 443 type sfc-common:sf-name; 444 description 445 "the name of the service function"; 446 } 447 uses sfc-ss:service-statistics-group { 448 description "Global Service Function statistics"; 449 } 450 list sf-service-path { 451 key "name"; 452 leaf name { 453 type sfc-common:sfp-name; 454 description 455 "The name of the Service Path"; 456 } 457 uses sfc-ss:service-statistics-group; 458 description 459 "A list of all service function paths that contain this 460 service function"; 461 } 462 } 463 } 465 rpc delete-all-service-function { 466 description 467 "Deletes all service functions"; 468 } 470 rpc put-service-function { 471 description 472 "Creates a service function"; 473 input { 474 uses service-function-entry; 475 } 476 } 477 rpc read-service-function { 478 description 479 "Reads a service function"; 480 input { 481 leaf name { 482 type string; 483 mandatory true; 484 description "The name of the service function."; 485 } 486 } 487 output { 488 uses service-function-entry; 489 } 490 } 491 rpc delete-service-function { 492 description 493 "Deletes a service function"; 494 input { 495 leaf name { 496 type string; 497 mandatory true; 498 description "The name of the service function."; 499 } 500 } 501 } 502 } 503 505 5. Service Function Type (SFT) 507 This module holds one list for each service function type found in 508 the system. Each one of these lists has the name of all service 509 functions configured on the system of that particular type. This 510 allows finding a service function of a given type simple. 512 5.1. Module Structure 514 module: service-function-type 515 +--rw service-function-types 516 +--rw service-function-type* [type] 517 +--rw type sfc-common:sft-type-name 518 +--rw symmetry? boolean 519 +--rw bidirectionality? boolean 520 +--rw nsh-aware? boolean 521 +--rw request-reclassification? boolean 522 +--rw supported-dataplanelocator-types* [dataplanelocator-type] 523 | +--rw dataplanelocator-type sfc-sl:sl-transport-type-def 524 +--rw sft-service-function-name* [name] 525 +--rw name sfc-common:sf-name 527 5.2. Service Function Type Configuration Model 528 file "service-function-type@2014-07-01.yang" 530 module service-function-type { 532 namespace "urn:cisco:params:xml:ns:yang:sfc-sft"; 534 prefix sfc-sft; 536 import service-locator { 537 prefix sfc-sl; 538 revision-date 2014-07-01; 539 } 541 import sfc-common { 542 prefix sfc-common; 543 revision-date 2015-10-17; 544 } 546 organization "Cisco Systems, Inc."; 547 contact "Reinaldo Penno "; 549 description 550 "This module contains a collection of YANG definitions for 551 managing service function types. 553 It follows closely the constructs of 554 http://tools.ietf.org/html/draft-ietf-netmod-interfaces-cfg-12 556 Copyright (c) 2013 IETF Trust and the persons identified as 557 authors of the code. All rights reserved. 559 Redistribution and use in source and binary forms, with or 560 without modification, is permitted pursuant to, and subject 561 to the license terms contained in, the Simplified BSD License 562 set forth in Section 4.c of the IETF Trust's Legal Provisions 563 Relating to IETF Documents 564 (http://trustee.ietf.org/license-info). 566 This version of this YANG module is part of RFC XXXX; see 567 the RFC itself for full legal notices."; 569 // RFC Ed.: replace XXXX with actual RFC number and remove this 570 // note. 572 // RFC Ed.: update the date below with the date of RFC 573 // publication and remove this note. 575 revision 2014-07-01 { 576 description 577 "Changes based on Opendaylight Testing."; 578 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 579 } 580 // Service Function Type definitions 582 grouping service-function-type-definition { 583 description 584 "List of parameters to define an abstract type 585 of Service Function"; 586 // TODO: Expand list to include metadata context 587 // template support. 588 // ie MD Type1 C3/C4 context, MD Type2 etc. 589 leaf type { 590 type sfc-common:sft-type-name; 591 description 592 "Service Function type names such as firewall, 593 dpi, tcp-proxy, etc"; 594 } 595 leaf symmetry { 596 type boolean; 597 description "SF is involved in a symmetric service path"; 598 } 599 leaf bidirectionality { 600 type boolean; 601 description "SF handles uplink and downlink traffic"; 602 } 603 leaf nsh-aware { 604 type boolean; 605 description 606 "Service Function can handle Network Service 607 Headers"; 608 } 609 leaf request-reclassification { 610 type boolean; 611 description "This leaf determines whether SF can request 612 reclassification by the SFF"; 613 } 614 list supported-dataplanelocator-types { 615 key "dataplanelocator-type"; 616 leaf dataplanelocator-type { 617 type sfc-sl:sl-transport-type-def; 618 description 619 "Unique data plane identifier"; 620 } 621 description 622 "Data Plane Locator types from the Service 623 Function"; 624 } 625 } 627 container service-function-types { 628 description 629 "A list of Service function Types. For each type we keep 630 a list of Service Functions"; 632 list service-function-type { 633 key "type"; 634 uses service-function-type-definition; 636 list sft-service-function-name { 637 // TODO: should this be sf-name typedef? Also this should be 638 // kept in a separate map as an alternate index as it mirrors 639 // state. 640 key "name"; 641 leaf name { 642 type sfc-common:sf-name; 643 description 644 "The name of the service function."; 645 } 646 description 647 "The list of all service functions of a specific type"; 648 } 649 description 650 "A list of all service types. Each service-type entry holds 651 a list of all service functions of that type"; 652 } 653 } 654 } 656 658 6. Service Function Chain (SFC) 660 This model describes a service function chain which is basically an 661 ordered list of services. But a service function chain does not 662 specify exactly which service (firewal1 vs. firewall2) will be used 663 to actually process packets. 665 6.1. Module Structure 666 module: service-function-chain 667 +--rw service-function-chains 668 | +--rw service-function-chain* [name] 669 | +--rw name sfc-common:sfc-name 670 | +--rw symmetric? boolean 671 | +--rw sfc-service-function* [name] 672 | +--rw name string 673 | +--rw type sfc-common:sft-type-name 674 | +--rw order? uint8 675 +--ro service-function-chains-state 676 +--ro service-function-chain-state* [name] 677 +--ro name sfc-common:sfc-name 678 +--ro sfc-service-path* [name] 679 +--ro name sfc-common:sfp-name 680 rpcs: 681 +---x instantiate-service-function-chain 682 | +--ro input 683 | | +--ro name string 684 | +--ro output 685 | +--ro name? string 686 +---x put-service-function-chains 687 +--ro input 688 +--ro service-function-chain* [name] 689 +--ro name sfc-common:sfc-name 690 +--ro symmetric? boolean 691 +--ro sfc-service-function* [name] 692 +--ro name string 693 +--ro type sfc-common:sft-type-name 694 +--ro order? uint8 696 6.2. Service Function Chain Configuration Model 697 file "service-function-chain@2014-07-01.yang" 699 module service-function-chain { 701 namespace "urn:cisco:params:xml:ns:yang:sfc-sfc"; 703 prefix sfc-sfc; 705 import sfc-common { 706 prefix sfc-common; 707 } 709 organization "Cisco Systems, Inc."; 710 contact "Reinaldo Penno "; 712 description 713 "This module contains a collection of YANG definitions for 714 managing service function chains. 716 Copyright (c) 2013 IETF Trust and the persons identified as 717 authors of the code. All rights reserved. 719 Redistribution and use in source and binary forms, with or 720 without modification, is permitted pursuant to, and subject 721 to the license terms contained in, the Simplified BSD License 722 set forth in Section 4.c of the IETF Trust's Legal Provisions 723 Relating to IETF Documents 724 (http://trustee.ietf.org/license-info). 726 This version of this YANG module is part of RFC XXXX; see 727 the RFC itself for full legal notices."; 729 // RFC Ed.: replace XXXX with actual RFC number and remove this 730 // note. 732 // RFC Ed.: update the date below with the date of RFC 733 // publication and remove this note. 735 revision 2014-07-01 { 736 description 737 "Revised based on Opendaylight Project feedback"; 738 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 739 } 741 grouping service-function-chain-grouping { 742 list service-function-chain { 743 key "name"; 744 description 745 "A list that holds all service function chains in the 746 domain"; 747 leaf name { 748 type sfc-common:sfc-name; 749 description 750 "the name of the service function chain"; 751 } 752 leaf symmetric { 753 type boolean; 754 default false; 755 description 756 "If the chain is symmetric we will create two service 757 paths, one ingress and another egress. Packets traverse 758 the egress service path in the reverse order of the 759 ingress path"; 760 } 761 list sfc-service-function { 762 key "name"; 763 leaf name { 764 type string; 765 description 766 "A unique handle that describes the service function 767 that will be chosen for this type, such as 768 ingress-dpi. This is not the service function name"; 769 } 770 leaf type { 771 type sfc-common:sft-type-name; 772 mandatory true; 773 description 774 "Service Function Type from service-function-type.yang"; 775 } 776 leaf order { 777 type uint8; 778 description 779 "A number that denotes the order of a service function 780 type in a chain"; 781 } 782 ordered-by user; 783 description 784 "A list of service functions that compose the service 785 chain"; 786 } 787 } 788 description 789 "This group bundles together all service function chains in the 790 domain"; 791 } 793 // Service Function Chains 795 container service-function-chains { 796 uses service-function-chain-grouping; 797 description 798 "A service Function chain defines an 799 abstract set of service functions and their ordering 800 constraints that must be applied to packets and/or frames 801 selected as a result of classification. The implied order 802 may not be a linear progression as the architecture allows 803 for nodes that copy to more than one branch, and also allows 804 for cases where there is flexibility in the order in which 805 services need to be applied. The term service chain is often 806 used as shorthand for service function chain."; 807 } 809 container service-function-chains-state { 810 config false; 811 list service-function-chain-state { 812 key "name"; 813 description 814 "A list that contains operational service function 815 chain state"; 816 leaf name { 817 type sfc-common:sfc-name; 818 description 819 "the name of the service function chain"; 820 } 821 list sfc-service-path { 822 key "name"; 823 leaf name { 824 type sfc-common:sfp-name; 825 description 826 "The name of the Service Path"; 827 } 828 description 829 "A list of all service function paths instantiated from 830 this chain"; 831 } 832 } 833 description 834 "This containers holds operational service function 835 chain state and their associated service path"; 836 } 838 // Remote procedure calls 840 // (main feature: instantiation of a SFC) 842 rpc instantiate-service-function-chain { 843 description 844 "Instantiates a single service function"; 845 input { 846 leaf name { 847 type string; 848 mandatory true; 849 description 850 "The name of the service function chain to be 851 instantiated."; 852 } 853 } 854 output { 855 leaf name { 856 type string; 857 description 858 "The name of the created service function path."; 859 } 860 } 861 } 863 // (RPC for testing) 864 rpc put-service-function-chains { 865 description 866 "Creates Service-Functions"; 867 input { 868 uses service-function-chain-grouping; 869 } 870 } 871 } 873 875 7. Service Function Path (SFP) 877 A Service Function Path is an instantiation of a service function 878 chain. It allows be user to provide constrains for the rendering of 879 the service path such as specific service-hops that need to be 880 visited, the transport encapsulation used in the overlay, whether 881 paths should be symmetric, amongst others. 883 7.1. Module Structure 884 module: service-function-path 885 +--rw service-function-paths 886 | +--rw service-function-path* [name] 887 | +--rw name sfc-common:sfp-name 888 | +--rw transport-type? sfc-sl:sl-transport-type-def 889 | +--rw symmetric? boolean 890 | +--rw classifier? string 891 | +--rw symmetric-classifier? string 892 | +--rw context-metadata? sfc-md:context-metadata-ref 893 | +--rw variable-metadata? sfc-md:variable-metadata-ref 894 | +--rw tenant-id? string 895 | +--rw service-path-hop* [hop-number] 896 | | +--rw hop-number uint8 897 | | +--rw service-function-name? sfc-common:sf-name 898 | | +--rw service-function-group-name? string 899 | | +--rw service-function-forwarder? sfc-common:sff-name 900 | | +--rw service-index? uint8 901 | +--rw service-chain-name sfc-common:sfc-name 902 | +--rw starting-index? uint8 903 | +--rw path-id? uint32 904 +--ro service-function-paths-state 905 +--ro service-function-path-state* [name] 906 +--ro name sfc-common:sfp-name 907 +--ro sfp-rendered-service-path* [name] 908 +--ro name sfc-common:rsp-name 910 7.2. Service Function Path Configuration Model 911 file "service-function-path@2014-07-01.yang" 913 module service-function-path { 915 namespace "urn:cisco:params:xml:ns:yang:sfc-sfp"; 917 prefix sfc-sfp; 919 import service-function-path-metadata { 920 prefix sfc-md; 921 revision-date 2014-07-01; 922 } 923 import service-locator { 924 prefix sfc-sl; 925 revision-date 2014-07-01; 926 } 928 import sfc-common { 929 prefix sfc-common; 930 revision-date 2015-10-17; 931 } 933 organization "Cisco Systems, Inc."; 934 contact "Reinaldo Penno "; 936 description 937 "This module contains a collection of YANG definitions for 938 managing service function chains. 940 Copyright (c) 2013 IETF Trust and the persons identified as 941 authors of the code. All rights reserved. 943 Redistribution and use in source and binary forms, with or 944 without modification, is permitted pursuant to, and subject 945 to the license terms contained in, the Simplified BSD License 946 set forth in Section 4.c of the IETF Trust's Legal Provisions 947 Relating to IETF Documents 948 (http://trustee.ietf.org/license-info). 950 This version of this YANG module is part of RFC XXXX; see 951 the RFC itself for full legal notices."; 953 // RFC Ed.: replace XXXX with actual RFC number and remove this 954 // note. 956 // RFC Ed.: update the date below with the date of RFC 957 // publication and remove this note. 959 revision 2014-07-01 { 960 description 961 "Changes based on Opendaylight Testing and IETF SFC ml."; 962 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 964 } 966 // Service Function Path 968 container service-function-paths { 969 description 970 "The SFP provides a level of indirection 971 between the fully abstract notion of service chain as an 972 abstract sequence of functions to be delivered, and the 973 fully specified notion of exactly what SFF/SFs the packet 974 will visit when it actually traverses the network. By 975 allowing the control components to specify the use of this 976 level of indirection, the deployment may choose the degree 977 of SFF/SF selection authority that is delegated to the 978 network"; 979 list service-function-path { 980 key "name"; 981 description 982 "A list that holds configuration data for all SFPs in the 983 domain"; 984 leaf name { 985 type sfc-common:sfp-name; 986 description 987 "The name of this service function path"; 988 } 990 leaf transport-type { 991 type sfc-sl:sl-transport-type-def; 992 default "sfc-sl:vxlan-gpe"; 993 description 994 "Transport type from service-locator.yang."; 995 } 997 leaf symmetric { 998 type boolean; 999 default false; 1000 description 1001 "If the chain is symmetric we will create two service 1002 paths, one ingress and another egress. Packets traverse 1003 the egress service path in the reverse order of the 1004 ingress path"; 1005 } 1006 leaf classifier { 1007 type string; 1008 description "The classifier responsible for directing" 1009 + "packets to this service path"; 1010 } 1011 leaf symmetric-classifier { 1012 type string; 1013 description "The classifier responsible for directing" 1014 + "packets to this service path"; 1015 } 1016 leaf context-metadata { 1017 type sfc-md:context-metadata-ref; 1018 description 1019 "The name of the associated context metadata"; 1020 } 1021 leaf variable-metadata { 1022 type sfc-md:variable-metadata-ref; 1023 description 1024 "The name of the associated variable metadata"; 1025 } 1026 leaf tenant-id { 1027 type string; 1028 description 1029 "This SFP was created for a specific tenant-id"; 1030 } 1031 list service-path-hop { 1032 key "hop-number"; 1033 leaf hop-number { 1034 type uint8; 1035 description 1036 "A Monotonically increasing number"; 1037 } 1038 leaf service-function-name { 1039 type sfc-common:sf-name; 1040 description 1041 "Service Function name"; 1042 } 1043 leaf service-function-group-name { 1044 type string; 1045 description 1046 "Service Function group name"; 1047 } 1048 leaf service-function-forwarder { 1049 type sfc-common:sff-name; 1050 description 1051 "Service Function Forwarder name"; 1052 } 1053 leaf service-index { 1054 type uint8; 1055 description 1056 "Provides location within the service path. 1057 Service index MUST be decremented by service functions 1058 or proxy nodes after performing required services. MAY 1059 be used in conjunction with service path for path 1060 selection. Service Index is also valuable when 1061 troubleshooting/reporting service paths. In addition to 1062 location within a path, SI can be used for loop 1063 detection."; 1064 } 1065 ordered-by user; 1066 description 1067 "A list of service functions that compose the 1068 service path"; 1069 } 1070 leaf service-chain-name { 1071 type sfc-common:sfc-name; 1072 mandatory true; 1073 description 1074 "The Service Function Chain used as blueprint for this 1075 path"; 1076 } 1077 leaf starting-index { 1078 type uint8; 1079 description 1080 "Starting service index"; 1081 } 1082 leaf path-id { 1083 type uint32 { 1084 range "0..16777216"; 1085 } 1086 description 1087 "Identifies a service path. 1088 Participating nodes MUST use this identifier for path 1089 selection. An administrator can use the service path 1090 value for reporting and troubleshooting packets along 1091 a specific path."; 1092 } 1093 } 1094 } 1096 container service-function-paths-state { 1097 config false; 1098 description 1099 "This container hold operational state for all service 1100 function paths"; 1101 list service-function-path-state { 1102 key "name"; 1103 description 1104 "This list holds operational data for all service function 1105 paths in the domain"; 1106 leaf name { 1107 type sfc-common:sfp-name; 1108 description 1109 "The name of the service function path"; 1110 } 1111 list sfp-rendered-service-path { 1112 key "name"; 1113 leaf name { 1114 type sfc-common:rsp-name; 1115 description 1116 "The name of the Rendered Service Path"; 1117 } 1118 description 1119 "A list of all rendered service paths instantiated 1120 from this service path"; 1121 } 1122 } 1123 } 1125 } 1126 1128 8. Service Function Forwarder (SFF) 1130 This module describes the configuration a SFF needs to have in order 1131 to route packets to the service functions it serves. the SFF needs 1132 to have a table with service function name and associated locator. 1133 The locator could be an IP address and port, an internal function 1134 call or some other unique identifier. 1136 8.1. Module Struture 1137 module: service-function-forwarder 1139 +--rw service-function-forwarders 1140 | +--rw service-function-forwarder* [name] 1141 | +--rw name sfc-common:sff-name 1142 | +--rw service-node? sfc-common:sn-name 1143 | +--rw ip-mgmt-address? inet:ip-address 1144 | +--rw sff-data-plane-locator* [name] 1145 | | +--rw name sfc-common:sff-data-plane-locator-name 1146 | | +--rw data-plane-locator 1147 | | +--rw (locator-type) 1148 | | | +--:(ip) 1149 | | | | +--rw ip? inet:ip-address 1150 | | | | +--rw port? inet:port-number 1151 | | | +--:(lisp) 1152 | | | | +--rw eid? inet:ip-address 1153 | | | +--:(mac) 1154 | | | | +--rw mac? yang:mac-address 1155 | | | | +--rw vlan-id? uint16 1156 | | | +--:(function) 1157 | | | | +--rw function-name? string 1158 | | | +--:(mpls) 1159 | | | | +--rw mpls-label? uint32 1160 | | | +--:(other) 1161 | | | +--rw other-name? string 1162 | | +--rw transport? identityref 1163 | +--rw rest-uri? inet:uri 1164 | +--rw service-function-dictionary* [name] 1165 | | +--rw name sfc-common:sf-name 1166 | | +--rw sff-sf-data-plane-locator 1167 | | | +--rw sf-dpl-name? sfc-common:sf-data-plane-locator-name 1168 | | | +--rw sff-dpl-name? sfc-common:sff-data-plane-locator-name 1169 | | +--rw sff-interfaces* [sff-interface] 1170 | | | +--rw sff-interface string 1171 | | +--rw failmode? failmode-type 1172 | +--rw connected-sff-dictionary* [name] 1173 | +--rw name sfc-common:sff-name 1174 | +--rw sff-sff-data-plane-locator 1175 | | +--rw (locator-type) 1176 | | | +--:(ip) 1177 | | | | +--rw ip? inet:ip-address 1178 | | | | +--rw port? inet:port-number 1179 | | | +--:(lisp) 1180 | | | | +--rw eid? inet:ip-address 1181 | | | +--:(mac) 1182 | | | | +--rw mac? yang:mac-address 1183 | | | | +--rw vlan-id? uint16 1184 | | | +--:(function) 1185 | | | | +--rw function-name? string 1186 | | | +--:(mpls) 1187 | | | | +--rw mpls-label? uint32 1188 | | | +--:(other) 1189 | | | +--rw other-name? string 1190 | | +--rw transport? identityref 1191 | +--rw sff-interfaces* [sff-interface] 1192 | | +--rw sff-interface string 1193 | +--rw failmode? failmode-type 1194 +--ro service-function-forwarders-state 1195 +--ro service-function-forwarder-state* [name] 1196 +--ro name sfc-common:sff-name 1197 +--ro statistic-by-timestamp* [timestamp] 1198 | +--ro timestamp uint64 1199 | +--ro service-statistic 1200 | +--ro bytes-in? yang:zero-based-counter64 1201 | +--ro bytes-out? yang:zero-based-counter64 1202 | +--ro packets-in? yang:zero-based-counter64 1203 | +--ro packets-out? yang:zero-based-counter64 1204 +--ro sff-service-path* [name] 1205 +--ro name sfc-common:sfp-name 1206 +--ro statistic-by-timestamp* [timestamp] 1207 +--ro timestamp uint64 1208 +--ro service-statistic 1209 +--ro bytes-in? yang:zero-based-counter64 1210 +--ro bytes-out? yang:zero-based-counter64 1211 +--ro packets-in? yang:zero-based-counter64 1212 +--ro packets-out? yang:zero-based-counter64 1214 8.2. Service Function Forwarder Model 1215 file "service-function-forwarder@2014-07-01.yang" 1217 module service-function-forwarder { 1219 namespace "urn:cisco:params:xml:ns:yang:sfc-sff"; 1221 prefix sfc-sff; 1223 import ietf-inet-types { 1224 prefix inet; 1225 revision-date 2010-09-24; 1226 } 1227 import service-locator { 1228 prefix sfc-sl; 1229 revision-date 2014-07-01; 1230 } 1231 import service-function-type { 1232 prefix sfc-sft; 1233 revision-date 2014-07-01; 1234 } 1235 import service-statistics { 1236 prefix sfc-ss; 1237 revision-date 2014-07-01; 1238 } 1239 import sfc-common { 1240 prefix sfc-common; 1241 revision-date 2015-10-17; 1242 } 1244 organization "Cisco Systems, Inc."; 1245 contact "Reinaldo Penno "; 1247 description 1248 "This module contains a collection of YANG definitions for 1249 managing service function forwarders. 1251 Copyright (c) 2013 IETF Trust and the persons identified as 1252 authors of the code. All rights reserved. 1254 Redistribution and use in source and binary forms, with or 1255 without modification, is permitted pursuant to, and subject 1256 to the license terms contained in, the Simplified BSD License 1257 set forth in Section 4.c of the IETF Trust's Legal Provisions 1258 Relating to IETF Documents 1259 (http://trustee.ietf.org/license-info). 1261 This version of this YANG module is part of RFC XXXX; see 1262 the RFC itself for full legal notices."; 1264 // RFC Ed.: replace XXXX with actual RFC number and remove this 1265 // note. 1267 // RFC Ed.: update the date below with the date of RFC 1268 // publication and remove this note. 1270 revision 2014-07-01 { 1271 description 1272 "Revision based on Opendaylight project feedback"; 1273 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 1274 } 1276 // Failmode type definitions 1278 identity failmode-type-identity { 1279 description 1280 "Base identity from which specific failmode 1281 types are derived. Fail mode specifies the behavior 1282 when the interface does not have connectivity to the 1283 service node."; 1284 } 1286 typedef failmode-type { 1287 type identityref { 1288 base "failmode-type-identity"; 1289 } 1290 description "This type is used to reference all 1291 registered failmode types"; 1292 } 1294 identity close { 1295 base "failmode-type-identity"; 1296 description "When service-function can not reach service 1297 function, packets will be dropped"; 1298 } 1300 identity open { 1301 base "failmode-type-identity"; 1302 description "When service-function can not reach service 1303 function, packets will be forwarded"; 1304 } 1306 container service-function-forwarders { 1307 description 1308 "A service function forwarder is 1309 responsible for delivering traffic received from the SFC 1310 network forwarder to one or more connected service 1311 functions via information carried in the SFC encapsulation. 1312 "; 1313 list service-function-forwarder { 1314 key "name"; 1315 description 1316 "A list that holds configuration of all SFFs in the domain"; 1317 leaf name { 1318 type sfc-common:sff-name; 1319 description 1320 "The unique name of this service function forwarder, such 1321 as SFF1"; 1322 } 1324 leaf service-node { 1325 type sfc-common:sn-name; 1326 description "The service node that hosts this SFF"; 1327 } 1329 leaf ip-mgmt-address { 1330 type inet:ip-address; 1331 description 1332 "The IP and port used to configure this 1333 service-function-forwarder"; 1334 } 1336 leaf rest-uri { 1337 type inet:uri; 1338 description "URI of REST based management"; 1339 } 1341 list sff-data-plane-locator { 1342 key "name"; 1343 description 1344 "A list of all data-plane-locators of this SFF."; 1345 leaf name { 1346 type sfc-common:sff-data-plane-locator-name; 1347 description 1348 "A unique name that represents this 1349 data-plane-locator"; 1350 } 1352 container data-plane-locator { 1353 description 1354 "This container holds configuration for the overlay data 1355 plane locator used by this SFF. This could be VXLAN, 1356 GRE, etc"; 1357 uses sfc-sl:data-plane-locator; 1358 } 1359 } 1361 list service-function-dictionary { 1362 key "name"; 1363 leaf name { 1364 type sfc-common:sf-name; 1365 description 1366 "The name of the service function."; 1367 } 1368 container sff-sf-data-plane-locator { 1369 description 1370 "SFF and SF data plane locators to use when sending 1371 packets from this SFF to the associated SF"; 1372 leaf sf-dpl-name { 1373 type sfc-common:sf-data-plane-locator-name; 1374 description 1375 "The SF data plane locator to use when sending 1376 packets to the associated service function"; 1377 } 1378 leaf sff-dpl-name { 1379 type sfc-common:sff-data-plane-locator-name; 1380 description 1381 "The SFF data plane locator to use when sending 1382 packets to the associated service function. 1383 This is necessary when the SFF has multiple DPLs"; 1384 } 1385 } 1386 list sff-interfaces { 1387 key "sff-interface"; 1388 leaf sff-interface { 1389 type string; 1390 description 1391 "An individual interface on the SFF connected to the 1392 SF"; 1393 } 1394 description 1395 "A list of interfaces on the SFF which are connected to 1396 this SF, usually one 1 or 2 elements"; 1397 } 1398 leaf failmode { 1399 type failmode-type; 1400 description 1401 "This leaf defines what should the SFF do if it can not 1402 send packets to the SF"; 1403 } 1404 description 1405 "A list of all Service Functions attached to this SFF."; 1406 } 1408 list connected-sff-dictionary { 1409 key "name"; 1410 leaf name { 1411 type sfc-common:sff-name; 1412 description 1413 "The name of the SFF connected to this SFF"; 1414 } 1415 container sff-sff-data-plane-locator { 1416 description 1417 "The SFF uses this data plane locator when sending 1418 packets to the associated SFF"; 1419 uses sfc-sl:data-plane-locator; 1420 } 1421 list sff-interfaces { 1422 key "sff-interface"; 1423 leaf sff-interface { 1424 type string; 1425 description 1426 "An individual SFF interface connected to this SFF"; 1427 } 1428 description 1429 "A list of SFF interfaces connected to this SFF"; 1430 } 1431 leaf failmode { 1432 type failmode-type; 1433 description 1434 "This leaf defines what the SFF should do if it can not 1435 send packets to a connected SFF"; 1436 } 1437 description 1438 "A list of all Service Function Forwarders connected to 1439 this SFF"; 1440 } 1441 } 1442 } 1444 container service-function-forwarders-state { 1445 config false; 1446 description 1447 "This container hold operational state for all service 1448 function forwarders"; 1449 list service-function-forwarder-state { 1450 key "name"; 1451 description 1452 "This list holds operational data for all service functions 1453 forwarders in the domain"; 1454 leaf name { 1455 type sfc-common:sff-name; 1456 description 1457 "the name of the service function forwarder"; 1458 } 1459 uses sfc-ss:service-statistics-group { 1460 description "Global Service Function Forwarder statistics"; 1461 } 1463 list sff-service-path { 1464 key "name"; 1465 leaf name { 1466 type sfc-common:sfp-name; 1467 description 1468 "The name of the Service Path"; 1469 } 1470 uses sfc-ss:service-statistics-group; 1471 description 1472 "A list of all service function paths that use this 1473 service function forwarder"; 1474 } 1475 } 1476 } 1477 } 1479 1481 9. Service Locator (SL) 1483 This module provides a single point of registration for all network 1484 locators types used in Services Function Chaining. the model can be 1485 augmented at will with locators appropriate for each use-case. 1487 9.1. Module Structure 1489 9.2. Service Locator Module 1490 file "service-locator@2014-07-01.yang" 1492 module service-locator { 1494 namespace "urn:cisco:params:xml:ns:yang:sfc-sl"; 1496 prefix sfc-sl; 1498 import ietf-inet-types { 1499 prefix inet; 1500 revision-date 2013-07-15; 1501 } 1502 import ietf-yang-types { 1503 prefix yang; 1504 revision-date 2013-07-15; 1505 } 1507 organization "Cisco Systems, Inc."; 1508 contact "Reinaldo Penno "; 1510 description 1511 "This module contains a collection of YANG definitions for 1512 managing service locators. Service locators are used as 1513 data plane network destinations for Service Functions and 1514 Service Function Forwarders 1516 It follows closely the constructs of 1517 http://tools.ietf.org/html/draft-ietf-netmod-interfaces-cfg-12 1519 Copyright (c) 2013 IETF Trust and the persons identified as 1520 authors of the code. All rights reserved. 1522 Redistribution and use in source and binary forms, with or 1523 without modification, is permitted pursuant to, and subject 1524 to the license terms contained in, the Simplified BSD License 1525 set forth in Section 4.c of the IETF Trust's Legal Provisions 1526 Relating to IETF Documents 1527 (http://trustee.ietf.org/license-info). 1529 This version of this YANG module is part of RFC XXXX; see 1530 the RFC itself for full legal notices."; 1532 // RFC Ed.: replace XXXX with actual RFC number and remove this 1533 // note. 1535 // RFC Ed.: update the date below with the date of RFC 1536 // publication and remove this note. 1538 revision 2014-07-01 { 1539 description 1540 "Changes based on Opendaylight Testing."; 1541 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 1543 } 1545 // Locator definitions 1547 // Transport type definitions 1548 identity transport-type { 1549 description 1550 "Base identity from which specific transport types are 1551 derived."; 1552 } 1554 identity mac { 1555 base "sl-transport-type"; 1556 description "Simple MAC with optional VLAN transport type"; 1557 } 1559 identity vxlan-gpe { 1560 base "sl-transport-type"; 1561 description "Programmable vxlan transport type"; 1562 } 1564 identity gre { 1565 base "sl-transport-type"; 1566 description "GRE transport type"; 1567 } 1569 identity mpls { 1570 base "sl-transport-type"; 1571 description "Multi Protocol Label Switching transport type"; 1572 } 1574 identity other { 1575 base "sl-transport-type"; 1576 description "unspecified transport type"; 1577 } 1579 identity sl-transport-type { 1580 base "transport-type"; 1581 description 1582 "This identity is used as a base for all transport 1583 types"; 1585 } 1587 typedef sl-transport-type-def { 1588 type identityref { 1589 base "sl-transport-type"; 1590 } 1591 description "This type is used to reference all 1592 registered transport types"; 1593 } 1595 grouping lisp-locator { 1596 description 1597 "Data plane-locator: Lisp Eid(IP)"; 1598 leaf eid { 1599 type inet:ip-address; 1600 description "Data-plane IP address"; 1601 } 1602 } 1604 grouping ip-port-locator { 1605 description 1606 "Data plane-locator: IP address and L4 port"; 1607 leaf ip { 1608 type inet:ip-address; 1609 description "Data-plane IP address"; 1610 } 1611 leaf port { 1612 type inet:port-number; 1613 description "Data-plane port number"; 1614 } 1615 } 1617 grouping mac-address-locator { 1618 description 1619 "Data plane-locator: mac address and optional vlan-id"; 1620 leaf mac { 1621 type yang:mac-address; 1622 description "Data-plane MAC address"; 1623 } 1624 leaf vlan-id { 1625 type uint16 { 1626 range "1..4094"; 1627 } 1628 description "Data-plane VLAN ID address"; 1629 } 1630 } 1632 grouping mpls-locator { 1633 description 1634 "Data plane-locator: MPLS label"; 1635 leaf mpls-label { 1636 type uint32 { 1637 range "1..1048575"; 1638 } 1639 description "MPLS Label, 20 bits"; 1640 } 1641 } 1643 grouping function-locator { 1644 description 1645 "When SF is co-located with SFF, this could be the name of a 1646 function or method."; 1647 leaf function-name { 1648 type string; 1649 description "Function or method name"; 1650 } 1652 } 1654 grouping other-locator { 1655 description 1656 "Other locator"; 1657 leaf other-name { 1658 type string; 1659 description "A other or undefined locator"; 1660 } 1661 } 1663 grouping data-plane-locator { 1664 description 1665 "This group presents data-plane locator 1666 information for service function elements in the domain"; 1667 choice locator-type { 1668 mandatory true; 1669 case ip { 1670 uses ip-port-locator; 1671 } 1672 case lisp { 1673 uses lisp-locator; 1674 } 1675 case mac { 1676 uses mac-address-locator; 1677 } 1678 case function { 1679 uses function-locator; 1680 } 1681 case mpls { 1682 uses mpls-locator; 1683 } 1684 case other { 1685 uses other-locator; 1686 } 1687 description "The collection of all possible data-plane 1688 locators. Only one can be chosen"; 1689 } 1690 leaf transport { 1691 type identityref { 1692 base sfc-sl:sl-transport-type; 1693 } 1694 description 1695 "The encapsulation used to carry NSH packets"; 1696 } 1697 } 1698 } 1700 1702 10. Rendered Service Path (RSP) 1703 This module holds the actual service-hops a packet will traverse when 1704 forwarded through a specific service path. 1706 10.1. Module Structure 1707 module: rendered-service-path 1708 +--ro rendered-service-paths 1709 +--ro rendered-service-path* [name] 1710 +--ro name sfc-common:rsp-name 1711 +--ro parent-service-function-path? sfc-common:sfp-name 1712 +--ro transport-type? sfc-sl:sl-transport-type-def 1713 +--ro context-metadata? sfc-md:context-metadata-ref 1714 +--ro variable-metadata? sfc-md:variable-metadata-ref 1715 +--ro tenant-id? string 1716 +--ro statistic-by-timestamp* [timestamp] 1717 | +--ro timestamp uint64 1718 | +--ro service-statistic 1719 | +--ro bytes-in? yang:zero-based-counter64 1720 | +--ro bytes-out? yang:zero-based-counter64 1721 | +--ro packets-in? yang:zero-based-counter64 1722 | +--ro packets-out? yang:zero-based-counter64 1723 +--ro rendered-service-path-hop* [hop-number] 1724 | +--ro hop-number uint8 1725 | +--ro service-function-name? sfc-common:sf-name 1726 | +--ro service-function-group-name? string 1727 | +--ro service-function-forwarder? sfc-common:sff-name 1728 | +--ro service-function-forwarder-locator? sfc-common:sff-data-plane-locator-name 1729 | +--ro service-index? uint8 1730 +--ro service-chain-name sfc-common:sfc-name 1731 +--ro starting-index? uint8 1732 +--ro path-id uint32 1733 +--ro symmetric-path-id? uint32 1734 rpcs: 1735 +---x trace-rendered-service-path 1736 | +--ro input 1737 | | +--ro name? string 1738 | +--ro output 1739 | +--ro result? boolean 1740 +---x delete-rendered-path 1741 | +--ro input 1742 | | +--ro name? string 1743 | +--ro output 1744 | +--ro result? boolean 1745 +---x create-rendered-path 1746 | +--ro input 1747 | | +--ro name? string 1748 | | +--ro parent-service-function-path? string 1749 | | +--ro symmetric? boolean 1750 | | +--ro (context-header-allocation-type-1)? 1751 | | +--:(vxlan-classifier) 1752 | | | +--ro vxlan-classifier-enabled? boolean 1753 | | +--:(mobility) 1754 | | | +--ro mobility-allocation-enabled? boolean 1755 | | +--:(dc) 1756 | | +--ro dc-allocation-enabled? boolean 1757 | +--ro output 1758 | +--ro name? string 1759 +---x read-rendered-service-path-first-hop 1760 | +--ro input 1761 | | +--ro name? string 1762 | +--ro output 1763 | +--ro rendered-service-path-first-hop 1764 | +--ro starting-index? uint8 1765 | +--ro symmetric-path-id? uint32 1766 | +--ro path-id? uint32 1767 | +--ro transport-type? sfc-sl:sl-transport-type-def 1768 | +--ro ip? inet:ip-address 1769 | +--ro port? inet:port-number 1770 | +--ro mpls-label? uint32 1771 +---x read-rsp-first-hop-by-sft-list 1772 +--ro input 1773 | +--ro sfst? sfc-sfst:service-function-scheduler-type 1774 | +--ro sft-list* sfc-common:sft-type-name 1775 +--ro output 1776 +--ro rendered-service-path-first-hop 1777 +--ro starting-index? uint8 1778 +--ro symmetric-path-id? uint32 1779 +--ro path-id? uint32 1780 +--ro transport-type? sfc-sl:sl-transport-type-def 1781 +--ro ip? inet:ip-address 1782 +--ro port? inet:port-number 1783 +--ro mpls-label? uint32 1785 10.2. Rendered Service Path Module 1786 file "rendered-service-path@2014-07-01.yang" 1788 module rendered-service-path { 1790 namespace "urn:cisco:params:xml:ns:yang:sfc-rsp"; 1792 prefix sfc-rsp; 1794 import service-function-path-metadata { 1795 prefix sfc-md; 1796 revision-date 2014-07-01; 1797 } 1798 import service-locator { 1799 prefix sfc-sl; 1800 revision-date 2014-07-01; 1801 } 1802 import service-statistics { 1803 prefix sfc-ss; 1804 revision-date 2014-07-01; 1805 } 1806 import sfc-common { 1807 prefix sfc-common; 1808 } 1810 organization "Cisco Systems, Inc."; 1811 contact "Reinaldo Penno "; 1813 description 1814 "This module contains a collection of YANG definitions to 1815 manage Rendered Service Paths. 1817 Copyright (c) 2013 IETF Trust and the persons identified as 1818 authors of the code. All rights reserved. 1820 Redistribution and use in source and binary forms, with or 1821 without modification, is permitted pursuant to, and subject 1822 to the license terms contained in, the Simplified BSD License 1823 set forth in Section 4.c of the IETF Trust's Legal Provisions 1824 Relating to IETF Documents 1825 (http://trustee.ietf.org/license-info). 1827 This version of this YANG module is part of RFC XXXX; see 1828 the RFC itself for full legal notices."; 1830 // RFC Ed.: replace XXXX with actual RFC number and remove this 1831 // note. 1833 // RFC Ed.: update the date below with the date of RFC 1834 // publication and remove this note. 1836 revision 2014-07-01 { 1837 description 1838 "Changes based on Opendaylight Testing and IETF SFC ml."; 1839 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 1840 } 1842 // Rendered Service Path 1844 container rendered-service-paths { 1845 config false; 1846 description 1847 "A container that holds the list of all Rendered Service Paths 1848 in a SFC domain"; 1849 list rendered-service-path { 1850 key "name"; 1851 description 1852 "A list that holds operational data for all RSPs in the 1853 domain"; 1854 leaf name { 1855 type sfc-common:rsp-name; 1856 description 1857 "The name of this rendered function path. This is the same 1858 name as the associated SFP"; 1859 } 1860 leaf parent-service-function-path { 1861 type sfc-common:sfp-name; 1862 description 1863 "Service Function Path from which this RSP was 1864 instantiated"; 1866 } 1867 leaf transport-type { 1868 type sfc-sl:sl-transport-type-def; 1869 default "sfc-sl:vxlan-gpe"; 1870 description 1871 "Transport type as set in the Parent Service Function 1872 Path"; 1873 } 1874 leaf context-metadata { 1875 type sfc-md:context-metadata-ref; 1876 description 1877 "The name of the associated context metadata"; 1878 } 1879 leaf variable-metadata { 1880 type sfc-md:variable-metadata-ref; 1881 description 1882 "The name of the associated variable metadata"; 1883 } 1884 leaf tenant-id { 1885 type string; 1886 description 1887 "This RSP was created for a specific tenant-id"; 1888 } 1889 uses sfc-ss:service-statistics-group { 1890 description "Global Rendered Service Path statistics"; 1892 } 1893 list rendered-service-path-hop { 1894 key "hop-number"; 1895 leaf hop-number { 1896 type uint8; 1897 description 1898 "A Monotonically increasing number"; 1899 } 1900 leaf service-function-name { 1901 type sfc-common:sf-name; 1902 description 1903 "Service Function name"; 1904 } 1905 leaf service-function-group-name { 1906 type string; 1907 description 1908 "Service Function group name"; 1909 } 1910 leaf service-function-forwarder { 1911 type sfc-common:sff-name; 1912 description 1913 "Service Function Forwarder name"; 1914 } 1915 leaf service-function-forwarder-locator { 1916 type sfc-common:sff-data-plane-locator-name; 1917 description 1918 "The name of the SFF data plane locator"; 1919 } 1920 leaf service-index { 1921 type uint8; 1922 description 1923 "Provides location within the service path. 1924 Service index MUST be decremented by service functions 1925 or proxy nodes after performing required services. MAY 1926 be used in conjunction with service path for path 1927 selection. Service Index is also valuable when 1928 troubleshooting/reporting service paths. In addition to 1929 location within a path, SI can be used for loop 1930 detection."; 1931 } 1932 ordered-by user; 1933 description 1934 "A list of service functions that compose the 1935 service path"; 1936 } 1937 leaf service-chain-name { 1938 type sfc-common:sfc-name; 1939 mandatory true; 1940 description 1941 "The Service Function Chain used as blueprint for this 1942 path"; 1943 } 1944 leaf starting-index { 1945 type uint8; 1946 description 1947 "Starting service index"; 1948 } 1949 leaf path-id { 1950 type uint32 { 1951 range "0..16777216"; 1952 } 1953 mandatory true; 1954 description 1955 "Identifies a service path. 1956 Participating nodes MUST use this identifier for path 1957 selection. An administrator can use the service path 1958 value for reporting and troubleshooting packets along 1959 a specific path."; 1960 } 1961 leaf symmetric-path-id { 1962 type uint32 { 1963 range "0..16777216"; 1964 } 1965 description 1966 "Identifies the associated symmetric path, if any."; 1967 } 1968 } 1969 } 1971 rpc trace-rendered-service-path { 1972 description 1973 "Requests a NSH Traceroute through the specified 1974 rendered service path"; 1975 input { 1976 leaf name { 1977 type string; 1978 description 1979 "The name of the rendered function path."; 1980 } 1981 } 1982 output { 1983 leaf result { 1984 type boolean; 1985 description 1986 "Whether NSH traceroute for the requested path was 1987 successful"; 1988 } 1989 } 1990 } 1992 rpc delete-rendered-path { 1993 description 1994 "Delete a Rendered Service Path"; 1995 input { 1996 leaf name { 1997 type string; 1998 description 1999 "The name of this rendered function path."; 2000 } 2001 } 2002 output { 2003 leaf result { 2004 type boolean; 2005 description 2006 "True if Rendered Service Path was deleted, otherwise 2007 false"; 2008 } 2009 } 2010 } 2012 rpc create-rendered-path { 2013 description 2014 "Created a Rendered Service Path"; 2015 input { 2016 leaf name { 2017 type string; 2018 description 2019 "The name of this rendered function path."; 2020 } 2021 leaf parent-service-function-path { 2022 type string; 2023 description 2024 "Service Function Path from which this RSP was 2025 instantiated"; 2026 } 2027 leaf symmetric { 2028 type boolean; 2029 default false; 2030 description 2031 "If the chain is symmetric we will create two service 2032 paths, one ingress and another egress. Packets traverse 2033 the egress service path in the reverse order of the 2034 ingress path"; 2035 } 2036 choice context-header-allocation-type-1 { 2037 description 2038 "A RSP can support a single MD-type 1 2039 context-allocation-type"; 2040 case vxlan-classifier { 2041 leaf vxlan-classifier-enabled { 2042 type boolean; 2043 default false; 2044 description "Client needs service path to implement 2045 VXLAN overlay classifier metadata allocation"; 2046 } 2047 } 2048 case mobility { 2049 leaf mobility-allocation-enabled { 2050 type boolean; 2051 default false; 2052 description "Client needs service path to implement 2053 Mobility Metadata allocation"; 2054 } 2055 } 2056 case dc { 2057 leaf dc-allocation-enabled { 2058 type boolean; 2059 default false; 2060 description "Client needs service path to implement 2061 DC Allocation Metadata allocation"; 2062 } 2063 } 2064 } 2065 } 2066 output { 2067 leaf name { 2068 type string; 2069 description "Name of the created Rendered Service Path"; 2070 } 2071 } 2072 } 2074 grouping rendered-service-path-first-hop-info { 2075 description 2076 "This groups holds the the container that provides 2077 information about the first hop in a rendered service 2078 path"; 2079 container rendered-service-path-first-hop { 2080 description 2081 "Provides all necessary information for a system to construct 2082 a NSH header and associated overlay packet to target the 2083 first service hop of a Rendered Service Path"; 2084 leaf starting-index { 2085 type uint8; 2086 description 2087 "Starting service index"; 2088 } 2089 leaf symmetric-path-id { 2090 type uint32 { 2091 range "0..16777216"; 2092 } 2093 description 2094 "Identifies the associated symmetric path, if any."; 2095 } 2096 leaf path-id { 2097 type uint32 { 2098 range "0..16777216"; 2099 } 2100 description 2101 "Identifies a service path. 2102 Participating nodes MUST use this identifier for path 2103 selection. An administrator can use the service path 2104 value for reporting and troubleshooting packets along 2105 a specific path."; 2106 } 2107 leaf transport-type { 2108 type sfc-sl:sl-transport-type-def; 2109 description 2110 "Defines the data-plane protocol used by the first 2111 Service Function Forwarder"; 2112 } 2114 uses sfc-sl:ip-port-locator; 2115 uses sfc-sl:mpls-locator; 2116 } 2117 } 2119 rpc read-rendered-service-path-first-hop { 2120 description 2121 "Read all the necessary information for the first hop of a 2122 Rendered Service Path"; 2123 input { 2124 leaf name { 2125 type string; 2126 description 2127 "The name of this rendered service path"; 2128 } 2129 } 2130 output { 2131 uses rendered-service-path-first-hop-info; 2132 } 2133 } 2134 } 2136 2138 11. Service Function Common (SFC-Common) 2140 This module holds common definitions for Service Chain modules 2142 11.1. Service Function Common Module 2143 file "sfc-common@2015-10-17.yang" 2145 module sfc-common { 2147 namespace "urn:cisco:params:xml:ns:yang:sfc-common"; 2149 prefix sfc-common; 2151 organization "Cisco Systems, Inc."; 2152 contact "Keith Burns "; 2154 description 2155 "Common typedefs and leafrefs for project"; 2157 revision 2015-10-17 { 2158 description 2159 "Initial revision"; 2160 reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; 2161 } 2163 // general typedefs 2164 typedef tenant-id { 2165 type string; 2166 description "Tenant ID"; 2167 } 2168 // typedef for Service Node 2169 typedef sn-name { 2170 type string; 2171 description "Service Node Name Type"; 2172 } 2174 // typedefs for Service Function Chain 2175 typedef sfc-name { 2176 type string; 2177 description "Service Function Chain Name"; 2178 } 2180 // typedefs for Service Function Type 2181 typedef sft-type-name { 2182 type string; 2183 description "Service function type name"; 2184 } 2186 // typedefs for Service Function 2187 typedef sf-name { 2188 type string; 2189 description "Service Function Name"; 2190 } 2192 typedef sf-data-plane-locator-name { 2193 type string; 2194 description 2195 "A unique name for SF data-plane-locator"; 2197 } 2199 // typedefs for Rendererd Service Paths 2200 typedef rsp-name { 2201 type string; 2202 description 2203 "Rendererd Service Path Name Type"; 2204 } 2206 // typedefs for Service Function Path 2207 typedef sfp-name { 2208 type string; 2209 description "Service Function Path Name Type"; 2210 } 2212 // typedefs for sff names 2213 typedef sff-data-plane-locator-name { 2214 type string; 2215 description 2216 "Service Function Forwarder data-plane-locator name type"; 2217 } 2219 typedef sff-name { 2220 type string; 2221 description "Service Function Forwarder Name type"; 2222 } 2224 // typedefs for renderer names 2225 typedef renderer-name { 2226 type string; 2227 description "Renderer Name type"; 2228 } 2229 } 2231 2233 12. Service Statistics (Sfc-ss) 2235 This module holds common statistics definitions for Service Chain 2236 modules 2238 12.1. Service Statistics Chain Common Module 2239 file "service-statistics@2014-07-01.yang" 2241 module service-statistics { 2243 namespace "urn:cisco:params:xml:ns:yang:sfc-ss"; 2245 prefix sfc-ss; 2247 import ietf-yang-types { 2248 prefix yang; 2249 revision-date 2013-07-15; 2250 } 2252 organization "Cisco Systems, Inc."; 2253 contact "Reinaldo Penno "; 2255 description 2256 "This module contains a collection of YANG definitions for 2257 managing service statistics. Service statistics are used 2258 to determine the load and efficiency of a service function 2259 or service function forwarder device 2261 Copyright (c) 2013 IETF Trust and the persons identified as 2262 authors of the code. All rights reserved. 2264 Redistribution and use in source and binary forms, with or 2265 without modification, is permitted pursuant to, and subject 2266 to the license terms contained in, the Simplified BSD License 2267 set forth in Section 4.c of the IETF Trust's Legal Provisions 2268 Relating to IETF Documents 2269 (http://trustee.ietf.org/license-info). 2271 This version of this YANG module is part of RFC XXXX; see 2272 the RFC itself for full legal notices."; 2274 // RFC Ed.: replace XXXX with actual RFC number and remove this 2275 // note. 2277 // RFC Ed.: update the date below with the date of RFC 2278 // publication 2279 // and remove this note. 2281 revision 2014-07-01 { 2282 description 2283 "Initial Revision"; 2284 reference 2285 "https://tools.ietf.org/html/draft-penno-sfc-yang"; 2286 } 2288 grouping service-statistics-group { 2289 description 2290 "Group that holds the list that indexes statistics by timestamp"; 2292 list statistic-by-timestamp { 2293 key "timestamp"; 2294 leaf timestamp { 2295 type uint64; 2296 description 2297 "Date and time of record creation in milliseconds 2298 counting from 1.1.1970 00:00:00 UTC (= 0)"; 2299 } 2300 uses statistic-fields; 2301 description 2302 "This list holds statistics indexed by timestamp"; 2303 } 2304 } 2306 grouping statistic-fields { 2307 description 2308 "Groups all statistics containers"; 2309 container service-statistic { 2310 config false; 2311 leaf bytes-in { 2312 type yang:zero-based-counter64; 2313 description 2314 "Received bytes"; 2315 } 2316 leaf bytes-out { 2317 type yang:zero-based-counter64; 2318 description 2319 "Transmitted bytes"; 2320 } 2321 leaf packets-in { 2322 type yang:zero-based-counter64; 2323 description 2324 "Received packets"; 2325 } 2326 leaf packets-out { 2327 type yang:zero-based-counter64; 2328 description 2329 "Transmitted packets"; 2330 } 2331 description 2332 "This container holds packets and bytes statistics"; 2333 } 2334 } 2335 } 2337 2339 13. Service Function Path Metadata (SFC-MD) 2341 This module holds the service function path metadata that is attached 2342 to a packet as it traverses a specific service path. 2344 13.1. Module Structure 2346 module: service-function-path-metadata 2347 +--rw service-function-metadata 2348 +--rw context-metadata* [name] 2349 | +--rw name string 2350 | +--rw context-header1? uint32 2351 | +--rw context-header2? uint32 2352 | +--rw context-header3? uint32 2353 | +--rw context-header4? uint32 2354 +--rw variable-metadata* [name] 2355 +--rw name string 2356 +--rw tlv-metadata* [tlv-class tlv-type] 2357 +--rw tlv-class uint16 2358 +--rw tlv-type uint8 2359 +--rw flags? bits 2360 +--rw length? uint8 2361 +--rw tlv-data? string 2363 13.2. Service Function Path Metadata Module 2364 file "service-function-path-metadata@2014-07-01.yang" 2366 module service-function-path-metadata { 2368 namespace "urn:cisco:params:xml:ns:yang:sfc-md"; 2370 prefix sfc-md; 2372 organization "Cisco Systems, Inc."; 2373 contact "Paul Quinn "; 2375 description 2376 "This module contains a collection of YANG definitions metadata 2377 used in a service function path between participating nodes"; 2379 revision 2014-07-01 { 2380 description 2381 "Initial Version"; 2382 reference 2383 "RFC XXXX: Service Path Metadata"; 2384 } 2386 // Service Function Path Metadata 2388 typedef context-metadata-ref { 2389 type leafref { 2390 path "/sfc-md:service-function-metadata/" + 2391 "sfc-md:context-metadata/sfc-md:name"; 2392 } 2393 description 2394 "This type is used by data models that need to reference 2395 configured context metadata headers."; 2396 } 2398 typedef variable-metadata-ref { 2399 type leafref { 2400 path "/sfc-md:service-function-metadata/" + 2401 "sfc-md:variable-metadata/sfc-md:name"; 2402 } 2403 description 2404 "This type is used by data models that need to reference 2405 configured variable metadata headers."; 2406 } 2408 //Another module would reference these headers like 2409 //leaf name { 2410 // type sfc-md:context-metadata-ref; 2411 // description 2412 // "A reference to the name of a configured context header"; 2413 //} 2414 container service-function-metadata { 2416 description 2417 "NSH provides a mechanism to carry shared metadata between 2418 network devices and service function, and between service 2419 functions. The semantics of the shared metadata is 2420 communicated via a control plane to participating 2421 nodes. Examples of metadata include classification 2422 information used for policy enforcement and network context 2423 for forwarding post service delivery."; 2425 list context-metadata { 2426 key "name"; 2427 leaf name { 2428 type string; 2429 description "A unique name for this set of context headers"; 2430 } 2431 leaf context-header1 { 2432 type uint32; 2433 description "network platform context, bytes 9-12"; 2434 } 2435 leaf context-header2 { 2436 type uint32; 2437 description "network platform context, bytes 13-16"; 2438 } 2439 leaf context-header3 { 2440 type uint32; 2441 description "network platform context, bytes 17-20"; 2442 } 2443 leaf context-header4 { 2444 type uint32; 2445 description "network platform context, bytes 21-24"; 2446 } 2447 description "Fixed Context metadata headers"; 2448 } 2449 list variable-metadata { 2450 key "name"; 2451 leaf name { 2452 type string; 2453 description "A unique name for this set of variable length 2454 metadata"; 2455 } 2456 list tlv-metadata { 2457 key "tlv-class tlv-type"; 2458 leaf tlv-class { 2459 type uint16; 2460 description "Class of TLV being used, bytes 25-26"; 2461 } 2462 leaf tlv-type { 2463 type uint8; 2464 description "type of tlv for a given class"; 2465 } 2466 leaf flags { 2467 type bits { 2468 bit r1 { 2469 position 24; 2470 description "Reserved"; 2471 } 2472 bit r2 { 2473 position 25; 2474 description "Reserved"; 2475 } 2476 bit r3 { 2477 position 26; 2478 description "Reserved"; 2479 } 2480 } 2481 description "reserved flag bits"; 2482 } 2484 leaf length { 2485 type uint8 { 2486 range "0..32"; 2487 } 2488 description "Length of the variable metadata in 4-byte 2489 words"; 2490 } 2491 leaf tlv-data { 2492 type string; 2493 description "Variable Data"; 2494 } 2495 description "A set of variable length metadata"; 2496 } 2497 description "A list that contain sets of variable length 2498 metadata"; 2499 } 2500 } 2501 } 2503 2505 14. IANA Considerations 2507 TBD 2509 15. Security Considerations 2511 16. Acknowledgements 2513 Thanks to Jan Medved, Ron Parker, Jan Lindblad, David Goldberg, Vina 2514 Ermagan, Sam Hague and Vinayak Joshi and for reviews and suggestions. 2516 17. Changes 2518 -15 2519 o Getting ready for a possible WG adoption therefore removed OVS 2520 Scheduler and Classifier models since they are very implementation 2521 specific. 2523 o New SFC-Common module that carries definition reused across many 2524 different modules 2526 o Updated all models, regenerated all model structures. 2528 o Fixed all errors flagged by pyang --ietf. The warnings were not 2529 fixed and will be taken care if documented adopted by WG 2531 -14 2533 o Updated all modules according to implementation experience 2535 -11 2537 o Added new co-authors 2539 o changed RSP and SFP models to allow multiple encap paths. 2541 o Added the "need reclassififcation" leaf to allow a Service 2542 Function to tell a SFF that packet reclassification is needed 2544 o Added RSP first hop container to allow SFC applications to request 2545 the ingress hop to a RSP. These applciations (such as dynamic 2546 classifier) treat RSP as a black box and only need ingress 2547 locator. 2549 -10 2551 This new revision comes after considerable control and dataplane 2552 interop testing. The new changes reflect what we found necessary for 2553 building a well-rounded solution. 2555 o Added Rendered Service Path Model 2557 o Added Service Function Description Monitor and Report Models 2559 o Updated Service Function Path (It allow users to control certain 2560 aspects of RSPs, new symmetric and metadata leaves) 2562 o Updated Service Function Forwarder model 2564 o Updated Service Function Model 2566 o Updated Service Function Type Model (HTTP Header Enrichment 2567 service) 2569 o Update Service Locator Model (MPLS encap) 2571 o Removed Service Node 2572 o Others 2574 -09 2576 o Modifed Service Function Forwarder OVS model based on OVS/ 2577 Openstack deployment experience 2579 -08 2581 o Removed VXLAN-GPE model 2583 o Added Service Function Forwarder OVS model 2585 o Added metadata reference to Service Function Path 2587 -07 2589 o All models that need data plane locators reference service locator 2590 model 2592 o Service Locator module has locators for IP:port, VLAN:MAC, LISP 2594 o A SF can have multiple data place locators 2596 o SF and SFF are decoupled and have their own views of the network 2598 o Service Function Chains and derived path can be symmtric (bi-dir) 2599 or not 2601 o Service Function Types separated into a model 2603 o Service Function Path is a collection of service hops. This 2604 allows hops such as SFF + classifier. 2606 -06 2608 o Introduced operational tree in some models based on testing and 2609 user feedback. 2611 o Introduced RPCs in some models 2613 o Service Function Path needs SFC from which it will be instantiated 2615 o Updated all module structures 2617 o Introduced Service Locator module 2619 -05 2621 Changes based on Opendaylight Implementation Testing and Sfc-dev 2622 mailing list feedback 2623 o Service Node becomes a container for Service Functions. Moved 2624 data plane items to SFF. 2626 o Fixed Service Function Forwarders into a list so we cna have 2627 multiple in a system 2629 o Fixed Service Function Chain so it becomes a list of lists. 2631 o Created RPCs for Service Functions and Service Chain 2633 -04 2635 o Fixed list inside Service Function Chain to read service-function- 2636 type 2638 o Small comment fixes 2640 -03 2642 o Revision dates consistent 2644 o Service function chain to container + list in order to allow 2645 multiple 2647 o Service Function Path to cotainer + list 2649 o VXLAN-gpe vni to multiple 8-bit fields 2651 o Consistent typeref use 2653 o Other consistency fixes 2655 -02 2657 o After Opendaylight Testing converted multiple leafs to lists 2658 throughout all models 2660 o Removed transport dependency. Transport could be layer-2, 2661 layer-3, etc 2663 o Used pathrefs similar to ietf-interfaces to reference 2664 configuration names 2666 o Other consistency fixes 2668 18. References 2670 18.1. Normative References 2672 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2673 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 2674 RFC2119, March 1997, . 2677 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2678 Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext 2679 Transfer Protocol -- HTTP/1.1", RFC 2616, DOI 10.17487/ 2680 RFC2616, June 1999, . 2683 18.2. Informative References 2685 [I-D.ietf-sfc-architecture] 2686 Halpern, J. and C. Pignataro, "Service Function Chaining 2687 (SFC) Architecture", Internet-Draft draft-ietf-sfc- 2688 architecture-11, July 2015. 2690 [I-D.ietf-sfc-nsh] 2691 Quinn, P. and U. Elzur, "Network Service Header", 2692 Internet-Draft draft-ietf-sfc-nsh-04, March 2016. 2694 [I-D.ietf-sfc-problem-statement] 2695 Quinn, P. and T. Nadeau, "Service Function Chaining 2696 Problem Statement", Internet-Draft draft-ietf-sfc-problem- 2697 statement-13, February 2015. 2699 [I-D.quinn-vxlan-gpe] 2700 Quinn, P., Manur, R., Kreeger, L., Lewis, D., Maino, F., 2701 Smith, M., Agarwal, P., Yong, L., Xu, X., Elzur, U., Garg, 2702 P. and D. Melman, "Generic Protocol Extension for VXLAN", 2703 Internet-Draft draft-quinn-vxlan-gpe-04, February 2015. 2705 Authors' Addresses 2707 Reinaldo Penno 2708 Cisco Systems 2709 170 West Tasman Dr 2710 San Jose, CA 2711 USA 2713 Email: repenno@cisco.com 2715 Paul Quinn 2716 Cisco Systems 2717 170 West Tasman Dr 2718 San Jose, CA 2719 USA 2721 Email: paulq@cisco.com 2722 Danny Zhou 2723 Intel Corporation 2724 2200 Mission College Blvd. 2725 Santa Clara, CA 2726 USA 2728 Email: danny.zhou@intel.com 2730 Johnson Li 2731 Intel Corporation 2732 2200 Mission College Blvd. 2733 Santa Clara, CA 2734 USA 2736 Email: johnson.li@intel.com