Skip to main content

Yang Data Model for Service Function Chaining
draft-penno-sfc-yang-05

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Expired".
Authors Reinaldo Penno , Paul Quinn
Last updated 2014-07-01
RFC stream (None)
Formats
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-penno-sfc-yang-05
SFC Netmod                                                      R. Penno
Internet-Draft                                                  P. Quinn
Intended status: Standards Track                           Cisco Systems
Expires: January 2, 2015                                   July 01, 2014

             Yang Data Model for Service Function Chaining
                        draft-penno-sfc-yang-05

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 January 2, 2015.

Copyright Notice

   Copyright (c) 2014 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 January 2, 2015                [Page 1]
Internet-Draft       Yang Model for Service Chaining           July 2014

   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  . . . . . . . . . . . . . . . . . .   3
   3.  VXLAN-GPE . . . . . . . . . . . . . . . . . . . . . . . . . .   3
     3.1.  Module  Structure . . . . . . . . . . . . . . . . . . . .   3
     3.2.  VXLAN -GPE Configuration Model  . . . . . . . . . . . . .   3
   4.  Service Function (SF) . . . . . . . . . . . . . . . . . . . .   6
     4.1.  Module Structure  . . . . . . . . . . . . . . . . . . . .   6
     4.2.  Service Function  . . . . . . . . . . . . . . . . . . . .   6
   5.  Service Function Chain (SFC)  . . . . . . . . . . . . . . . .  10
     5.1.  Module Structure  . . . . . . . . . . . . . . . . . . . .  10
     5.2.  Service Function Chain Configuration Model  . . . . . . .  10
   6.  Service Node (SN) . . . . . . . . . . . . . . . . . . . . . .  12
     6.1.  Module Structure  . . . . . . . . . . . . . . . . . . . .  13
     6.2.  Service Node Configuration Model  . . . . . . . . . . . .  13
   7.  Service Function Path (SFP) . . . . . . . . . . . . . . . . .  15
     7.1.  Module Structure  . . . . . . . . . . . . . . . . . . . .  15
     7.2.  Service Function Path Configuration Model . . . . . . . .  15
   8.  Service Function Forwarder (SFF)  . . . . . . . . . . . . . .  17
     8.1.  Service Function Forwarder Configuration Model  . . . . .  17
   9.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  20
   10. Security Considerations . . . . . . . . . . . . . . . . . . .  20
   11. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  20
   12. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . .  20
   13. References  . . . . . . . . . . . . . . . . . . . . . . . . .  21
     13.1.  Normative References . . . . . . . . . . . . . . . . . .  21
     13.2.  Informative References . . . . . . . . . . . . . . . . .  21
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  22

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

Penno & Quinn            Expires January 2, 2015                [Page 2]
Internet-Draft       Yang Model for Service Chaining           July 2014

2.  Definitions and Acronyms

   The reader should be familiar with the terms contained in
   [I-D.quinn-sfc-arch], [I-D.ietf-sfc-problem-statement]
   ,[I-D.quinn-sfc-nsh] and [I-D.quinn-vxlan-gpe]

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

<CODE BEGINS> 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 <repenno@cisco.com>";

  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.

Penno & Quinn            Expires January 2, 2015                [Page 3]
Internet-Draft       Yang Model for Service Chaining           July 2014

     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.";
  }

//    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";
      }

Penno & Quinn            Expires January 2, 2015                [Page 4]
Internet-Draft       Yang Model for Service Chaining           July 2014

      bit r4 {
        position 3;
        description "reserved";
      }
      bit i {
        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 vni-low {
      type uint8;
    }

    leaf vni-med {
      type uint8;

Penno & Quinn            Expires January 2, 2015                [Page 5]
Internet-Draft       Yang Model for Service Chaining           July 2014

    }

    leaf vni-hi {
      type uint8;
    }

    leaf reserved2 {
      default 0;
      type uint8 {
        range "0 .. 255";
      }
      description "Reserved field";
    }
  }
}

</CODE ENDS>

4.  Service Function (SF)

   This module describe a Service Function, which is an essential
   building block of other modules.

4.1.  Module Structure

4.2.  Service Function

<CODE BEGINS> file "service-function@2014-06-05.yang"

module service-function {

  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 <repenno@cisco.com>";

  description
    "This module contains a collection of YANG definitions for
     managing service function.

Penno & Quinn            Expires January 2, 2015                [Page 6]
Internet-Draft       Yang Model for Service Chaining           July 2014

     It follows closely the constructs of
     http://tools.ietf.org/html/draft-ietf-netmod-interfaces-cfg-12

     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 2014-06-29 {
    description
    "Changes based on Opendaylight Testing.";
  }

  // 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";
  }

Penno & Quinn            Expires January 2, 2015                [Page 7]
Internet-Draft       Yang Model for Service Chaining           July 2014

  identity napt44 {
    base "service-function-type-indentity";
    description "Network Address and Port Translation 44";
  }

  typedef service-function-type {
    type identityref {
      base "service-function-type-indentity";
    }
  }

  typedef service-function-type-ref {
    type leafref {
      path "/sfc-sf:service-function-type";
    }
    description
      "This type is used by data models that need to reference
       registered service types.";
  }

  typedef service-function-ref {
    type leafref {
      path "/sfc-sf:service-functions/sfc-sf:service-function/sfc-sf:name";
    }
    description
      "This type is used by data models that need to reference
       configured service functions.";
  }

  container service-functions {
    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.";

    list service-function {
      key "name";
      leaf name {
        type string;
        description
            "The name of the service function.";
      }

Penno & Quinn            Expires January 2, 2015                [Page 8]
Internet-Draft       Yang Model for Service Chaining           July 2014

      leaf type {
        type service-function-type;
        mandatory true;
      }
      leaf ip-mgmt-address {
        type inet:ip-address;
      }
    }
  }

  rpc delete-all-service-function {
  }

  rpc put-service-function {
    input {
      leaf name {
        type string;
        mandatory true;
        description "The name of the service function.";
      }
      leaf type {
        type service-function-type;
      }
      leaf ip-mgmt-address {
        type inet:ip-address;
      }
    }
  }
  rpc read-service-function {
    input {
      leaf name {
        type string;
        mandatory true;
        description "The name of the service function.";
      }
    }
    output {
      leaf name {
        type string;
        mandatory true;
        description "The name of the service function.";
      }
      leaf type {
        type service-function-type;
      }
      leaf ip-mgmt-address {
        type inet:ip-address;
      }

Penno & Quinn            Expires January 2, 2015                [Page 9]
Internet-Draft       Yang Model for Service Chaining           July 2014

    }
  }

  rpc delete-service-function {
    input {
      leaf name {
        type string;
        mandatory true;
        description "The name of the service function.";
      }
    }
  }
}

</CODE ENDS>

5.  Service Function Chain (SFC)

   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.

5.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

5.2.  Service Function Chain Configuration Model

<CODE BEGINS> file "service-function-chain@2014-06-16.yang"

module service-function-chain {

  namespace "urn:cisco:params:xml:ns:yang:sfc-sfc";

  prefix sfc-sfc;

  import ietf-inet-types { prefix inet; }
  import ietf-yang-types { prefix yang; }
  import service-function {prefix sfc-sf; }

Penno & Quinn            Expires January 2, 2015               [Page 10]
Internet-Draft       Yang Model for Service Chaining           July 2014

  organization "Cisco Systems, Inc.";
  contact "Reinaldo Penno <repenno@cisco.com>";

  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
     // and remove this note.

  revision 2014-06-30 {
    description
    "Revised based on Opendaylight Project feedback";
  }

  grouping service-function-chain-grouping {
    list 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).";
      key "name";
      leaf name {
        type string;
        description
          "the name of the service function chain";
      }
      list service-function-type {
        key "name";

Penno & Quinn            Expires January 2, 2015               [Page 11]
Internet-Draft       Yang Model for Service Chaining           July 2014

        leaf name {
          type string;
          description
              "The name of this service function type. This could be the
              same as the registered type or in the case where
              multiple service functions of the same type are used in
              the chain, something like ingress-firewall and egress-firewall";
        }
        leaf type {
          type string;
          description
              "The registered service function type.";
        }
        ordered-by user;
        description
          "A list of service functions that compose the service chain";
      }
    }
  }

  // Service Function Chains

  container service-function-chains {
    uses service-function-chain-grouping;
  }

  rpc put-service-function-chains {
    input {
      uses service-function-chain-grouping;
    }
  }
}

</CODE ENDS>

6.  Service Node (SN)

   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.

Penno & Quinn            Expires January 2, 2015               [Page 12]
Internet-Draft       Yang Model for Service Chaining           July 2014

6.1.  Module Structure

   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

6.2.  Service Node Configuration Model

<CODE BEGINS> file "service-node@2014-06-05.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; }
  import service-function {prefix sfc-sf; }

  organization "Cisco Systems, Inc.";
  contact "Reinaldo Penno <repenno@cisco.com>";

  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.";

Penno & Quinn            Expires January 2, 2015               [Page 13]
Internet-Draft       Yang Model for Service Chaining           July 2014

     // 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 2014-06-30 {
    description
      "Revision based on Opendaylight project feedback";
  }

    // Service Nodes

  typedef service-node-ref {
      type leafref {
          path "/sfc-sn:service-nodes/sfc-sn:service-node/sfc-sn:name";
      }
      description
          "This type is used by data models that need to reference
           configured service functions.";
  }

  container service-nodes {
    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.";
    list service-node {
      key "name";
      leaf name {
        type string;
        description
             "The name of the service node.";
      }

      leaf ip-mgmt-address {
        type inet:ip-address;
      }
      leaf-list service-function {
        type sfc-sf:service-function-ref;
        description
            "A list of service functions resident in this service node";
      }
    }
  }

Penno & Quinn            Expires January 2, 2015               [Page 14]
Internet-Draft       Yang Model for Service Chaining           July 2014

}

</CODE ENDS>

7.  Service Function Path (SFP)

   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.

7.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

7.2.  Service Function Path Configuration Model

<CODE BEGINS> file "service-function-path@2014-06-05.yang"

module service-function-path {

  namespace "urn:TBD:params:xml:ns:yang:sfc-path";

  prefix sfc-path;

  import ietf-inet-types { prefix inet; }
  import ietf-yang-types { prefix yang; }
  import service-function {prefix sfc-sf; }

  organization "Cisco Systems, Inc.";
  contact "Reinaldo Penno <repenno@cisco.com>";

  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.

Penno & Quinn            Expires January 2, 2015               [Page 15]
Internet-Draft       Yang Model for Service Chaining           July 2014

     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 2014-06-16 {
    description
      "Changes based on Opendaylight Testing and IETF SFC ml.";
  }

  // Service Function Path

  container service-function-paths {
    list service-function-path {
      description
        "A Service Function Path is an instantiation of a Service Chain. It
         specifies the actual firewall (say, firewall-3) that will be traversed by
         the packets. The Service Path needs to be known before hand or stitched
         run-time (given the dynamic LB decision) since a forwarding decision need
         to be made regardless.";
      key "name";
      leaf name {
        type string;
        description
          "the name of this service function path";
      }
      leaf-list service-function-instance {
        type sfc-sf:service-function-ref;
        ordered-by user;
        description
          "A list of service function instances that compose the service path";
      }
    }
  }
}

Penno & Quinn            Expires January 2, 2015               [Page 16]
Internet-Draft       Yang Model for Service Chaining           July 2014

<CODE ENDS>

8.  Service Function Forwarder (SFF)

   This module describes the configuration a SFF needs to have in order
   to route packets to the service functions it serves. the SFF needs to
   have a table with service function name and associated locator.  The
   locator could be an IP address and port, an internal function call or
   some other unique identifier.

8.1.  Service Function Forwarder Configuration Model

<CODE BEGINS> file "service-function-forwarder@2014-06-05.yang"

module service-function-forwarder {

  namespace "urn:cisco:params:xml:ns:yang:sfc-sff";

  prefix sfc-sff;

  import ietf-inet-types { prefix inet; }
  import ietf-yang-types { prefix yang; }
  import service-function {prefix sfc-sf; }

  organization "Cisco Systems, Inc.";
  contact "Reinaldo Penno <repenno@cisco.com>";

  description
    "This module contains a collection of YANG definitions for
     managing service function forwarders.

     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.";

Penno & Quinn            Expires January 2, 2015               [Page 17]
Internet-Draft       Yang Model for Service Chaining           July 2014

     // 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 2014-06-30 {
      description
      "Revision based on Opendaylight project feedback";
  }

  // Transport type definitions
  identity transport-type-identity {
    description
        "Base identity from which specific transport types are
        derived.";
  }

  identity vxlan-gpe {
    base "transport-type-identity";
    description "Programmable vxlan transport type";
  }

  typedef transport-type {
    type identityref {
        base "transport-type-identity";
    }
  }

  // Failmode type definitions

  identity failmode-type-identity {
    description
      "Base identity from which specific failmode
       types are derived. Fail mode specifies the behavior
       when the interface does not have connectivity to the
       service node.";
  }

  typedef failmode-type {
    type identityref {
        base "failmode-type-identity";
    }
  }

  identity close {
    base "failmode-type-identity";
    description "When service-function can not reach service function, packets will be dropped";

Penno & Quinn            Expires January 2, 2015               [Page 18]
Internet-Draft       Yang Model for Service Chaining           July 2014

  }

  identity open {
    base "failmode-type-identity";
    description "When service-function can not reach service function, packets will be forwarded";
  }

  // Service Function Forwarding Map

  container service-function-forwarders {
    description
        "This dictionary holds the configuration for a service function forwarder.
        For each service function, it has the location information.

        Example of a working Python Implementation of a SFF Map. A service function
        can be reached through IP:port or internal function call. ";
        //sfi_map = {"fw1": {"function": "fw1_process_packet", "ip_address":"", "port":""}, \
        //           "fw2": {"function": "", "ip_address": "192.168.0.2", "port":""}, \
        //           "dpi1":{"function": "", "ip_address": "192.168.0.4", "port":10000}, \
        //           "nat1":{"function": "nat1_process_packet", "ip_address": "", "port":""}}
    list service-function-forwarder {
      key "name";
      leaf name {
        type string;
        description
          "The name of this service function forwarder";
      }
      leaf transport {
        type transport-type;
      }
      list service-map {
        ordered-by user;
        key "service-function-name";
        leaf service-function-name {
          type sfc-sf:service-function-ref;
        }
        leaf failmode {
            type failmode-type;
        }
        container service-function-location {
          leaf ip {
            type inet:ip-address;
          }
          leaf port {
            type inet:port-number;
          }
        }

Penno & Quinn            Expires January 2, 2015               [Page 19]
Internet-Draft       Yang Model for Service Chaining           July 2014

      }
    }
  }
}

<CODE ENDS>

9.  IANA Considerations

   TBD

10.  Security Considerations

11.  Acknowledgements

   Thanks to Jan Medved, Ron Parker, Jan Lindblad, David Goldberg, Vina
   Ermagan for reviews and suggestions.

12.  Changes

   -05

   Changes based on Opendaylight Implementation Testing and Sfc-dev
   mailing list feedback

   o  Service Node becomes a container for Service Functions.  Moved
      data plane items to SFF.

   o  Fixed Service Function Forwarders into a list so we cna have
      multiple in a system

   o  Fixed Service Function Chain so it becomes a list of lists.

   o  Created RPCs for Service Functions and Service Chain

   -04

   o  Fixed list inside Service Function Chain to read service-function-
      type

   o  Small comment fixes

   -03

   o  Revision dates consistent

Penno & Quinn            Expires January 2, 2015               [Page 20]
Internet-Draft       Yang Model for Service Chaining           July 2014

   o  Service function chain to container + list in order to allow
      multiple

   o  Service Function Path to cotainer + list

   o  VXLAN-gpe vni to multiple 8-bit fields

   o  Consistent typeref use

   o  Other consistency fixes

   -02

   o  After Opendaylight Testing converted multiple leafs to lists
      throughout all models

   o  Removed transport dependency.  Transport could be layer-2, layer-
      3, etc

   o  Used pathrefs similar to ietf-interfaces to reference
      configuration names

   o  Other consistency fixes

13.  References

13.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.

13.2.  Informative References

   [I-D.ietf-sfc-problem-statement]
              Quinn, P. and T. Nadeau, "Service Function Chaining
              Problem Statement", draft-ietf-sfc-problem-statement-07
              (work in progress), June 2014.

   [I-D.quinn-sfc-arch]
              Quinn, P. and J. Halpern, "Service Function Chaining (SFC)
              Architecture", draft-quinn-sfc-arch-05 (work in progress),
              May 2014.

Penno & Quinn            Expires January 2, 2015               [Page 21]
Internet-Draft       Yang Model for Service Chaining           July 2014

   [I-D.quinn-sfc-nsh]
              Quinn, P., Guichard, J., Fernando, R., Surendra, S.,
              Smith, M., Yadav, N., Agarwal, P., Manur, R., Chauhan, A.,
              Elzur, U., McConnell, B., and C. Wright, "Network Service
              Header", draft-quinn-sfc-nsh-02 (work in progress),
              February 2014.

   [I-D.quinn-vxlan-gpe]
              Agarwal, P., Fernando, R., Lewis, D., Kreeger, L., Quinn,
              P., Yong, L., Xu, X., Smith, M., Yadav, N., and U. Elzur,
              "Generic Protocol Extension for VXLAN", draft-quinn-vxlan-
              gpe-02 (work in progress), 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 January 2, 2015               [Page 22]