Skip to main content

YANG Data Model for SR Service Programming
draft-jags-spring-sr-service-programming-yang-00

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 Jaganbabu Rajamanickam , Syed Kamran Raza , Daniel Bernier
Last updated 2020-11-02
RFC stream (None)
Formats
Additional resources
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-jags-spring-sr-service-programming-yang-00
quot;;
        }

        leaf behaviour {
          mandatory true;
          type identityref {
            base sr-svc-pgm-types:service-program-behaviour-type;
          }
          description
            "SR program behaviour";
        }

        leaf service-type {
          mandatory true;
          type identityref {
            base service-types:service-function-type;
          }
          description
            "Service-Type defined by IANA (STT). This is either the SR-aware
             service of SR-unaware service offered by an SR proxy";
        }

        leaf service-instance {
          mandatory true;
          type uint32;
          description
            "Service instance which differentiates the same service -- e.g.
             same Firewall service could have several instances available.
             The type and the instance would
             describe a specific instance which the application would
             like to choose";
        }

        leaf dataplane {
          mandatory true;
          type sr-svc-pgm-types:dataplane-type;
          description
            "Service SID dataplane.";
        }

Rajamanickam, et al.       Expires May 6, 2021                 [Page 21]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

        leaf admin-status {
          type sr-svc-pgm-types:admin-status-type;
          default down;
          description
            "Admin Status";
        }

        leaf oper-status {
          config false;
          type identityref {
            base sr-svc-pgm-types:service-program-oper-status-type;
          }
          description
            "Service SID operational mode.";
        }

        uses service-sid-binding;
        uses service-statistics;

        container sr-services {

          description
              "Any SR-aware or AR-unaware services could augment this container";
          reference "Segment Routing Service Programming Architecture.";
        }
      }
    }
  }

  augment "/rt:routing/sr:segment-routing" {
    description
      "Augmenting the segment-routing bindings to add SR service programming";

    uses service-programming;
  }

  notification service-program-oper-status {
    description
      "This notification is sent when there is a change in the service
       program oper status.";
    leaf name {
      mandatory true;
      type leafref {
        path "/rt:routing/sr:segment-routing/"
            + "sr-svc-pgm:service-programming/"
            + "sr-svc-pgm:service-program/"
            + "sr-svc-pgm:name";
      }

Rajamanickam, et al.       Expires May 6, 2021                 [Page 22]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

      description
        "Service program name to identify a specific programming.";
    }

    leaf oper-status {
      mandatory true;
      type leafref {
        path "/rt:routing/sr:segment-routing/"
            + "sr-svc-pgm:service-programming/"
            + "sr-svc-pgm:service-program/"
            + "sr-svc-pgm:oper-status";
      }
      description
        "Service program operational status.";
    }

  }
}

            <CODE ENDS>

                Figure 9: ietf-sr-service-programming.yang

4.4.  SR Service Proxy

   Following are the SR service programming service proxy model
   definition.

            <CODE BEGINS> file "ietf-sr-service-programming-proxy.yang" -->
module ietf-sr-service-programming-proxy {
  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-sr-service-programming-proxy";
  prefix "sr-svc-proxy";

  import ietf-yang-types {
    prefix yang;
  }

  import ietf-routing {
    prefix rt;
    reference "RFC 8349: A YANG Data Model for Routing
               Management (NMDA Version)";
  }

  import ietf-inet-types {

Rajamanickam, et al.       Expires May 6, 2021                 [Page 23]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

    prefix "inet";
  }

  import ietf-segment-routing {
    prefix sr;
  }

  import ietf-sr-service-programming {
    prefix "sr-svc-pgm";
  }

  import ietf-sr-service-programming-types {
    prefix "sr-svc-pgm-types";
  }

  import ietf-routing-types {
    prefix "rt-types";
  }

  import ietf-srv6-types {
    prefix "srv6-types";
  }

  organization "IETF SPRING Working Group";

  contact
      "WG Web:   <http://tools.ietf.org/wg/spring/>
       WG List:  <mailto:spring@ietf.org>

       Editor:   Jaganbabu Rajamanickam
                 <mailto:jrajaman@cisco.com>

       Editor:   Kamran Raza
                 <mailto:skraza@cisco.com>

       Editor:   Daniel Bernier
                 <mailto:daniel.bernier@bell.ca>";

  grouping service-proxy-parameters {

    leaf out-interface-name {
      mandatory true;
      type string;
      description
        "Interface name on which the packet sent to the service endpoint";
    }

    leaf in-interface-name {

Rajamanickam, et al.       Expires May 6, 2021                 [Page 24]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

      mandatory true;
      type string;
      description
        "Interface name on which the packet received from the service endpoint";
    }
  }

  grouping mpls-packet-cache-info {
    description
      "MPLS Label stack";

    list mpls-sids {
      key "index";

      leaf index {
        type uint8 {
          range "1..16";
        }
        description
          "cache index - MPLS Label stack index";
      }

      leaf mpls-label {
        mandatory true;
        type rt-types:mpls-label;
        description
          "MPLS Label value.";
      }
    }
  }

  grouping srv6-packet-cache-info {
    description
      "SRv6 SID stack";

    leaf ipv6-source-address {
      type inet:ipv6-address;
      description
        "IPv6 source address that needs in the case if SRv6.";
    }
    list srv6-sids {
      key "index";

      leaf index {
        type uint8 {
          range "1..16";
        }
        description

Rajamanickam, et al.       Expires May 6, 2021                 [Page 25]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

          "cache index - SRv6 SID index";
      }

      leaf srv6-sid {
        mandatory true;
        type srv6-types:srv6-sid;
        description
          "SRv6 SID.";
      }
    }
  }

  grouping service-proxy-packet-cache-info {
    description
      "SRv6 Proxy header cache";

    container packet-cache-info {

      choice cache-type {
        mandatory true;
        case mpls {

          when "/rt:routing/sr:segment-routing/sr-svc-pgm:service-programming
            /sr-svc-pgm:service-program
            /sr-svc-pgm:dataplane = 'mpls'";

          uses mpls-packet-cache-info;
        }
        case srv6 {

          when "/rt:routing/sr:segment-routing/sr-svc-pgm:service-programming
            /sr-svc-pgm:service-program
            /sr-svc-pgm:dataplane = 'srv6'";

          uses srv6-packet-cache-info;
        }
      }
      //  uses mpls-packet-cache-info;
       // uses srv6-packet-cache-info;
    }
  }

  grouping static-service-proxy {
    container static-proxy {
      description
        "Parameters related to static service proxy";

      leaf inner-packet-type {

Rajamanickam, et al.       Expires May 6, 2021                 [Page 26]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

        mandatory true;
        type identityref {
          base sr-svc-pgm-types:service-proxy-inner-pkt-type;
        }
        description
          "Defines the expected inner packet type";
      }

      leaf next-hop {
        when "(../inner-packet-type = 'IPv4' or ../inner-packet-type = 'IPv6')";
        type yang:mac-address;
        description
          "Nexthop Ethernet address for inner packet type IPv4/IPv6";
      }
      uses service-proxy-parameters;
      uses service-proxy-packet-cache-info;
    }
  }

  grouping dynamic-service-proxy {
    container dynamic-proxy {
      description
        "Parameters related to dynamic service proxy";
      uses service-proxy-parameters;
    }
  }

  grouping masquerading-service-parameters {

    leaf next-hop {
      mandatory true;
      type yang:mac-address;
      description
        "Nexthop Ethernet address";
    }
    uses service-proxy-parameters;
  }

  grouping masquerading-service-proxy {
    container masquerading-proxy {
      description
        "Parameters related to masquerading service proxy";

      when "/rt:routing/sr:segment-routing/sr-svc-pgm:service-programming
            /sr-svc-pgm:service-program
            /sr-svc-pgm:dataplane = 'srv6'";

      uses masquerading-service-parameters;

Rajamanickam, et al.       Expires May 6, 2021                 [Page 27]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

    }
  }

  grouping service-proxy-programming {

    container service-proxy {

      choice proxy-type {
        mandatory true;
        case static {
          when "/rt:routing/sr:segment-routing/
              sr-svc-pgm:service-programming
              /sr-svc-pgm:service-program
              /sr-svc-pgm:dataplane = 'srv6'";
          uses static-service-proxy;
        }
        case dynamic {
          uses dynamic-service-proxy;
        }
        case masquerading {
          uses masquerading-service-proxy;
        }
      }
      //uses dynamic-service-proxy;
    }
  }

  augment "/rt:routing/sr:segment-routing/sr-svc-pgm:service-programming/sr-svc-pgm:service-program/sr-svc-pgm:sr-services" {
    description
      "Augmenting the segment-routing bindings to add SR-unaware
       service programming";

    uses service-proxy-programming;
  }

}

            <CODE ENDS>

             Figure 10: ietf-sr-service-programming-proxy.yang

5.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure

Rajamanickam, et al.       Expires May 6, 2021                 [Page 28]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   There are a number of data nodes defined in this YANG module that are
   writable/creatable/ deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g., edit-config)
   to these data nodes without proper protection can have a negative
   effect on network operations.

   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.

   It goes without saying that this specification also inherits the
   security considerations captured in the SRv6 specification document
   [I-D.ietf-spring-sr-service-programming].

6.  IANA Considerations

   This document requests the registration of the following URIs in the
   IETF "XML registry" [RFC3688]:

   +--------------------------------------------------+----------+-----+
   | URI                                              | Registra | XML |
   |                                                  | nt       |     |
   +--------------------------------------------------+----------+-----+
   | urn:ietf:params:xml:ns:yang:ietf-service-        | The IESG | N/A |
   | function-types                                   |          |     |
   | urn:ietf:params:xml:ns:yang:ietf-sr-service-     | The IESG | N/A |
   | programming-types                                |          |     |
   |                                                  |          |     |
   | urn:ietf:params:xml:ns:yang:ietf-sr-service-     | The IESG | N/A |
   | programming                                      |          |     |
   | urn:ietf:params:xml:ns:yang:ietf-sr-service-     | The IESG | N/A |
   | programming-proxy                                |          |     |
   +--------------------------------------------------+----------+-----+

   This document requests the registration of the following YANG modules
   in the "YANG Module Names" registry [RFC6020]:

Rajamanickam, et al.       Expires May 6, 2021                 [Page 29]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

   +---------------+--------------------------+----------------+-------+
   | Name          | Namespace                | Prefix         | Refer |
   |               |                          |                | ence  |
   +---------------+--------------------------+----------------+-------+
   | ietf-service- | urn:ietf:params:xml:ns:y | service-       | This  |
   | function-     | ang:ietf-service-        | function-types | docum |
   | types         | function-types           |                | ent   |
   |               |                          |                |       |
   | ietf-sr-      | urn:ietf:params:xml:ns:y | ietf-sr-       | This  |
   | service-      | ang:ietf-sr-service-     | service-       | docum |
   | programming-  | programming-types        | programming-   | ent   |
   | types         |                          | types          |       |
   |               |                          |                |       |
   | ietf-sr-      | urn:ietf:params:xml:ns:y | ietf-sr-       | This  |
   | service-      | ang:ietf-sr-service-     | service-       | docum |
   | programming   | programming              | programming    | ent   |
   |               |                          |                |       |
   | ietf-sr-      | urn:ietf:params:xml:ns:y | ietf-sr-       | This  |
   | service-      | ang:ietf-sr-service-     | service-       | docum |
   | programming-  | programming-proxy        | programming-   | ent   |
   | proxy         |                          | proxy          |       |
   +---------------+--------------------------+----------------+-------+

   -- RFC Editor: Replace "This document" with the document RFC number
   at time of publication, and remove this note.

7.  Acknowledgments

   The authors would like to acknowledge Francois Clad, Ketan
   Talaulikar, and Darren Dukes for their review of some of the contents
   in this document.

8.  Normative References

   [I-D.ietf-spring-segment-routing-policy]
              Filsfils, C., Talaulikar, K., Voyer, D., Bogdanov, A., and
              P. Mattes, "Segment Routing Policy Architecture", draft-
              ietf-spring-segment-routing-policy-09 (work in progress),
              November 2020.

   [I-D.ietf-spring-sr-service-programming]
              Clad, F., Xu, X., Filsfils, C., daniel.bernier@bell.ca,
              d., Li, C., Decraene, B., Ma, S., Yadlapalli, C.,
              Henderickx, W., and S. Salsano, "Service Programming with
              Segment Routing", draft-ietf-spring-sr-service-
              programming-03 (work in progress), September 2020.

Rajamanickam, et al.       Expires May 6, 2021                 [Page 30]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

Rajamanickam, et al.       Expires May 6, 2021                 [Page 31]
Internet-Draft YANG Data Model for SR Service Programming  November 2020

   [RFC8402]  Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L.,
              Decraene, B., Litkowski, S., and R. Shakir, "Segment
              Routing Architecture", RFC 8402, DOI 10.17487/RFC8402,
              July 2018, <https://www.rfc-editor.org/info/rfc8402>.

   [RFC8407]  Bierman, A., "Guidelines for Authors and Reviewers of
              Documents Containing YANG Data Models", BCP 216, RFC 8407,
              DOI 10.17487/RFC8407, October 2018,
              <https://www.rfc-editor.org/info/rfc8407>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8754]  Filsfils, C., Ed., Dukes, D., Ed., Previdi, S., Leddy, J.,
              Matsushima, S., and D. Voyer, "IPv6 Segment Routing Header
              (SRH)", RFC 8754, DOI 10.17487/RFC8754, March 2020,
              <https://www.rfc-editor.org/info/rfc8754>.

Authors' Addresses

   Jaganbabu Rajamanickam
   Cisco Systems

   Email: jrajaman@cisco.com

   Kamran Raza
   Cisco Systems

   Email: skraza@cisco.com

   Daniel Bernier
   Bell Canada

   Email: daniel.bernier@bell.ca

Rajamanickam, et al.       Expires May 6, 2021                 [Page 32]