Netmod R. Penno Internet-Draft P. Quinn Intended status: Standards Track Cisco Systems Expires: June 23, 2014 December 20, 2013 Yang Data Model for Service Function Chaining draft-penno-sfc-yang-00 Abstract This document defines a YANG data model that can be used to configure and manage Service Function Chains. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on June 23, 2014. Copyright Notice Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must Penno & Quinn Expires June 23, 2014 [Page 1] Internet-Draft Yang Model for Service Chaining December 2013 include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Definitions and Acronyms . . . . . . . . . . . . . . . . . . 2 3. VXLAN-GPE . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1. Module Structure . . . . . . . . . . . . . . . . . . . . 3 3.2. VXLAN -GPE Configuration Model . . . . . . . . . . . . . 3 4. Service Function Chain . . . . . . . . . . . . . . . . . . . 6 4.1. Module Structure . . . . . . . . . . . . . . . . . . . . 6 4.2. Service Function Chain Configuration Model . . . . . . . 6 5. Service Node . . . . . . . . . . . . . . . . . . . . . . . . 9 5.1. Module Structure . . . . . . . . . . . . . . . . . . . . 9 5.2. Service Node Configuration Model . . . . . . . . . . . . 10 6. Service Function Path . . . . . . . . . . . . . . . . . . . . 13 6.1. Module Structure . . . . . . . . . . . . . . . . . . . . 13 6.2. Service Function Path Configuration Model . . . . . . . . 13 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 8. Security Considerations . . . . . . . . . . . . . . . . . . . 17 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 17 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 10.1. Normative References . . . . . . . . . . . . . . . . . . 17 10.2. Informative References . . . . . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 1. Introduction YANG [RFC6020] is a data definition language that was introduced to define the contents of a conceptual data store that allows networked devices to be managed using NETCONF [RFC6241]. YANG is proving relevant beyond its initial confines, as bindings to other interfaces (e.g. ReST) and encodings other than XML (e.g. JSON) are being defined. Furthermore, YANG data models can be used as the basis of implementation for other interfaces, such as CLI and programmatic APIs. This document defines a YANG data model that can be used to configure and manage Service Function Chains 2. Definitions and Acronyms The reader should be familiar with the terms contained in [I-D.quinn-sfc-arch], [I-D.quinn-sfc-problem-statement] ,[I-D.quinn-nsh] and [I-D.quinn-vxlan-gpe] Penno & Quinn Expires June 23, 2014 [Page 2] Internet-Draft Yang Model for Service Chaining December 2013 3. VXLAN-GPE This model describes the VXLAN-GPE encapsulation when used as a overlay mechanism to create service function paths. VXLAN is one of many transport protocols that can be used to setup service chaining overlays. 3.1. Module Structure module: vxlan-gpe +--rw vxlan-gpe-header +--rw gpe-header-flag-value? vxlan-gpw-header-flag-type +--rw reserved? uint8 +--rw protocol-type? uint16 +--rw vni* uint8 +--rw reserved2? uint8 3.2. VXLAN -GPE Configuration Model file "vxlan-gpe@2013-12-04.yang" module vxlan-gpe { namespace "urn:cisco:params:xml:ns:yang:vxlan-gpe"; prefix vxlan-gpe; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } organization "Cisco Systems, Inc."; contact "Reinaldo Penno "; description "This module contains a collection of YANG definitions for managing service function chains. Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents Penno & Quinn Expires June 23, 2014 [Page 3] Internet-Draft Yang Model for Service Chaining December 2013 (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: update the date below with the date of RFC publication // and remove this note. revision 2013-11-26 { description "Initial revision."; } // 0 1 2 3 // 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 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Source Port = xxxx | Dest Port = 4789 | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | UDP Length | UDP Checksum | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // |R|R|R|R|I|P|R|R| Reserved | Protocol Type | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | VXLAN Network Identifier (VNI) | Reserved | // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ typedef vxlan-gpw-header-flag-type { type bits { bit r1 { position 0; description "reserved"; } bit r2 { position 1; description "reserved"; } bit r3 { position 2; description "reserved"; } bit r4 { position 3; description "reserved"; } bit i { Penno & Quinn Expires June 23, 2014 [Page 4] Internet-Draft Yang Model for Service Chaining December 2013 position 5; description "Some description"; } bit p { position 6; description "Some description"; } bit r7 { position 7; description "reserved"; } bit r8 { position 8; description "reserved"; } } description "vxlan-gpe Header Flags"; reference "http://tools.ietf.org/html/draft-quinn-vxlan-gpe-01"; } container vxlan-gpe-header { description "Network Service Base header"; leaf gpe-header-flag-value { type vxlan-gpw-header-flag-type; } leaf reserved { default 0; type uint8; } leaf protocol-type { type uint16; // Reinaldo: Another option is to import Opendaylight L2 Types so have ethertype } leaf-list vni { type uint8; min-elements 3; max-elements 3; } leaf reserved2 { default 0; type uint8 { range "0 .. 255"; } Penno & Quinn Expires June 23, 2014 [Page 5] Internet-Draft Yang Model for Service Chaining December 2013 description "Reserved field"; } } } 4. Service Function Chain This model describes a service function chain which is basically an ordered list of services. But a service function chain does not specify exactly which service (firewal1 vs. firewall2) will be used to actually process packets. 4.1. Module Structure module: service-function-chain +--rw service-function | +--rw name string | +--rw type? service-function-type | +--rw ip-host-address? inet:ip-address | +--rw context-headers* uint32 +--rw service-function-chain +--rw service-function* string 4.2. Service Function Chain Configuration Model file "service-function-chain@2013-12-04.yang" module service-function-chain { namespace "urn:cisco:params:xml:ns:yang:sfc-sf"; prefix sfc-sf; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } organization "Cisco Systems, Inc."; contact "Reinaldo Penno "; description "This module contains a collection of YANG definitions for managing service function chains. Penno & Quinn Expires June 23, 2014 [Page 6] Internet-Draft Yang Model for Service Chaining December 2013 Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: update the date below with the date of RFC publication // and remove this note. revision 2013-11-26 { description "Initial revision."; } // Service Function // Service Function Type definitions identity service-function-type-indentity { description "Base identity from which specific service function types are derived."; } identity firewall { base "service-function-type-indentity"; description "Firewall"; } identity dpi { base "service-function-type-indentity"; description "Deep Packet Inspection"; } identity napt44 { base "service-function-type-indentity"; description "Network Address and Port Translation 44"; Penno & Quinn Expires June 23, 2014 [Page 7] Internet-Draft Yang Model for Service Chaining December 2013 } typedef service-function-type { type identityref { base "service-function-type-indentity"; } } container service-function { description "A network or application based packet treatment, application, compute or storage resource, used singularly or in concert with other service functions within a service chain to enable a service offered by an operator. A non-exhaustive list of Service Functions includes: firewalls, WAN and application acceleration, Deep Packet Inspection (DPI), server load balancers, NAT44 [RFC3022], NAT64 [RFC6146], HOST_ID injection, HTTP Header Enrichment functions, TCP optimizer, etc."; leaf name { type string; description "The name of the service function."; mandatory true; } leaf type { type service-function-type; } leaf ip-host-address { type inet:ip-address; } uses network-service-context-header; } // Service Function Chain container service-function-chain { description "A service chain defines the required functions and associated order (service-function1 --> service-function 2) that must be applied to packets and/or frames. A service chain does not specify the network location or specific instance of service functions (e.g. firewall1 vs. firewall2)."; leaf-list service-function { type string; ordered-by user; description Penno & Quinn Expires June 23, 2014 [Page 8] Internet-Draft Yang Model for Service Chaining December 2013 "A list of service functions that compose the service chain"; } } /* 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Network Platform Context | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Network Shared Context | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Platform Context | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Shared Context | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ grouping network-service-context-header { description "Network Service context header"; leaf-list context-headers { type uint32; min-elements 4; max-elements 4; } } } 5. Service Node A Service Node is a virtual or physical element that houses one or more service functions. A Service node might contain an entire service function chain or be part of a larger service function chain. 5.1. Module Structure Penno & Quinn Expires June 23, 2014 [Page 9] Internet-Draft Yang Model for Service Chaining December 2013 module: service-node +--rw service-node +--rw name string +--rw type? service-node-type +--rw transport? transport-type +--rw service-function* string +--rw ip-host-address? inet:ip-address 5.2. Service Node Configuration Model file "service-node@2013-12-04.yang" module service-node { namespace "urn:cisco:params:xml:ns:yang:sfc-sn"; prefix sfc-sn; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } organization "Cisco Systems, Inc."; contact "Reinaldo Penno "; description "This module contains a collection of YANG definitions for managing service function chains. Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: update the date below with the date of RFC publication Penno & Quinn Expires June 23, 2014 [Page 10] Internet-Draft Yang Model for Service Chaining December 2013 // and remove this note. revision 2013-11-26 { description "Initial revision."; } // Transport type definitions identity transport-type-identity { description "Base identity from which specific service function types are derived."; } identity vxlan-gpe { base "transport-type-identity"; description "programmable vxlan transport type"; } typedef transport-type { type identityref { base "transport-type-identity"; } } // Service Nodes // Service Node Type definitions identity service-node-type-identity { description "Base identity from which specific service function types are derived."; } identity egress { base "service-node-type-identity"; description "Last node in the chain"; } identity ingress { base "service-node-type-identity"; description "First node in the chain"; } identity middle { base "service-node-type-identity"; Penno & Quinn Expires June 23, 2014 [Page 11] Internet-Draft Yang Model for Service Chaining December 2013 description "Service nodes in the middle of the chain"; } identity legacy { base "service-node-type-identity"; description "Service Nodes that need a proxy function"; } typedef service-node-type { type identityref { base "service-node-type-identity"; } } container service-node { description "Physical or virtual element that hosts one or more service functions and has one or more network locators associated with it for reachability and service delivery."; leaf name { type string; description "The name of the service node."; mandatory true; } leaf type { type service-node-type; } leaf transport { type transport-type; } leaf-list service-function { type string; description "A list of service functions resident in this service node"; } leaf ip-host-address { type inet:ip-address; } } } Penno & Quinn Expires June 23, 2014 [Page 12] Internet-Draft Yang Model for Service Chaining December 2013 6. Service Function Path A Service Function Path is an instantiation of a service function chain. It specifies the actual service functions (e.g. firewall1) and the transport encapsulation used in the overlay. 6.1. Module Structure module: service-function-path +--rw service-function-path +--rw service-function* string +--rw transport? sfc-sn:transport-type +--rw service-header-flag-value? service-header-flag-type +--rw protocol-type? uint8 +--rw service-index? uint8 +--rw service-path* uint8 +--rw reserved? uint8 6.2. Service Function Path Configuration Model file "service-function-path@2013-12-04.yang" module service-function-path { namespace "urn:cisco:params:xml:ns:yang:sfc-path"; prefix sfc-path; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } import service-node {prefix sfc-sn; } organization "Cisco Systems, Inc."; contact "Reinaldo Penno "; description "This module contains a collection of YANG definitions for managing service function chains. Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents Penno & Quinn Expires June 23, 2014 [Page 13] Internet-Draft Yang Model for Service Chaining December 2013 (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: update the date below with the date of RFC publication // and remove this note. revision 2013-12-04 { description "Initial revision."; } // Service Function Path container service-function-path { description "A service chain defines the required functions and associated order (service-function1 --> service-function 2) that must be applied to packets and/or frames. A service chain does not specify the network location or specific instance of service functions (e.g. firewall1 vs. firewall2)."; leaf-list service-function { type string; ordered-by user; description "A list of service functions that compose the service chain"; } leaf transport { type sfc-sn:transport-type; } uses network-service-base-header; } /* Base Service Header: 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |O|C|R|R|R|R|R|R| Protocol Type |Service Index | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service path | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Penno & Quinn Expires June 23, 2014 [Page 14] Internet-Draft Yang Model for Service Chaining December 2013 Flags: 8 Protocol Type (PT): 16 Service Index: 8 Service path: 24 Reserved: 8 */ typedef service-header-flag-type { type bits { bit oam { position 0; description "Indicates that this packet is an operations and management (OAM) packet"; } bit context-use { position 1; description "If a context header is not in use, the value of that context header MUST be zero"; } bit r1 { position 2; description "Some description"; } bit r2 { position 3; description "Some description"; } bit r3 { position 4; description "Some description"; } bit r4 { position 5; description "Some description"; } bit r5 { position 6; description "Some description"; } bit r6 { position 7; description "Some description"; } } description "Service-Header Flags"; reference "http://tools.ietf.org/html/draft-quinn-nsh-00"; Penno & Quinn Expires June 23, 2014 [Page 15] Internet-Draft Yang Model for Service Chaining December 2013 } grouping network-service-base-header { description "Network Service Base header"; leaf service-header-flag-value { type service-header-flag-type; } leaf protocol-type { type uint8; // Reinaldo: Another option is to import Opendaylight L2 Types so have ethertype } leaf service-index { type uint8 { range "0 .. 255"; } description "TTL functionality and location within the service path"; } leaf-list service-path { type uint8; min-elements 3; max-elements 3; } leaf reserved { default 0; type uint8 { range "0 .. 255"; } description "Reserved field"; } } } 7. IANA Considerations TBD Penno & Quinn Expires June 23, 2014 [Page 16] Internet-Draft Yang Model for Service Chaining December 2013 8. Security Considerations 9. Acknowledgements thanks to Jan Medved for reviews and suggestions. 10. References 10.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 10.2. Informative References [I-D.quinn-nsh] Quinn, P., Fernando, R., Guichard, J., Surendra, S., Agarwal, P., Manur, R., Chauhan, A., Smith, M., Yadav, N., McConnell, B., and C. Wright, "Network Service Header", draft-quinn-nsh-01 (work in progress), July 2013. [I-D.quinn-sfc-arch] Quinn, P., Guichard, J., Surendra, S., Pignataro, C., Agarwal, P., Manur, R., Leymann, N., Smith, M., Yadav, N., Gray, K., Nadeau, T., and K. Kevin, "Service Function Chaining (SFC) Architecture", draft-quinn-sfc-arch-02 (work in progress), October 2013. [I-D.quinn-sfc-problem-statement] Quinn, P., Guichard, J., Surendra, S., Agarwal, P., Manur, R., Chauhan, A., Leymann, N., Boucadair, M., Jacquenet, C., Smith, M., Yadav, N., Elzur, U., Nadeau, T., Gray, K., McConnell, B., and K. Kevin, "Service Function Chaining Problem Statement", draft-quinn-sfc-problem-statement-01 (work in progress), October 2013. [I-D.quinn-vxlan-gpe] Quinn, P., Agarwal, P., Fernando, R., Lewis, D., Kreeger, L., Smith, M., and N. Yadav, "Generic Protocol Extension for VXLAN", draft-quinn-vxlan-gpe-01 (work in progress), October 2013. Penno & Quinn Expires June 23, 2014 [Page 17] Internet-Draft Yang Model for Service Chaining December 2013 Authors' Addresses Reinaldo Penno Cisco Systems 170 West Tasman Dr San Jose CA USA Email: repenno@cisco.com Paul Quinn Cisco Systems 170 West Tasman Dr San Jose CA USA Email: paulq@cisco.com Penno & Quinn Expires June 23, 2014 [Page 18]