netconfcentral logo

ietf-srv6-base

HTML

ietf-srv6-base@2017-11-12



  module ietf-srv6-base {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-srv6-base";

    prefix srv6;

    import ietf-interfaces {
      prefix if;
    }
    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }
    import ietf-routing-types {
      prefix rt-types;
    }
    import ietf-routing {
      prefix rt;
    }
    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>

     WG Chair: Bruno Decraene
               <mailto:loa@pi.nu>

     WG Chair: Martin Vigoureux
               <mailto:rcallon@juniper.net>

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

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

     Editor:   Xufeng Liu
               <mailto:Xufeng_Liu@jabil.com>

     Editor:   Iftekhar Hussain
               <mailto:IHussain@infinera.com>

     Editor:   Himanshu Shah
               <mailto:hshah@ciena.com>

     Editor:   Daniel Voyer
               <mailto:daniel.voyerbell.ca>

     Editor:   Hani Elmalky
               <mailto:hani.elmalky@ericsson.com>

     Editor:   Ahmed AbdelSalam
               <mailto:ahmed.abdelsalam@gssi.it>
     ";

    description
      "This YANG module defines the essential elements for the
     management of Segment-Routing with IPv6 dataplane (SRv6).

     Copyright (c) 2017 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).";

    reference
      "RFC XXXX";


    revision "2017-11-12" {
      description "Initial revision.";
      reference
        "RFC XXXX: YANG Data Model for SRv6";

    }


    grouping path-attrs-cmn {
      description
        "Path properties -common for v4/v6";
      leaf weight {
        type uint16;
        description
          "This value is used to compute a loadshare to perform un-equal
          load balancing when multiple outgoing path(s) are specified. A
          share is computed as a ratio of this number to the total under
          all configured path(s).";
      }

      leaf role {
        type enumeration {
          enum "PRIMARY" {
            value 0;
            description
              "Path as primary traffic carrying";
          }
          enum "BACKUP" {
            value 1;
            description
              "Path acts as a backup";
          }
          enum "PRIMARY_AND_BACKUP" {
            value 2;
            description
              "Path acts as primary and backup simultaneously";
          }
        }
        description "The path role";
      }

      leaf backup-path-index {
        type uint8;
        description
          "Index of the protecting (backup) path";
      }
    }  // grouping path-attrs-cmn

    grouping path-out-sids {
      description
        "Grouping for path's SID stack";
      list out-sid {
        key "sid";
        description "Out SID";
        leaf sid {
          type srv6-types:srv6-sid;
          description "SID value";
        }
      }  // list out-sid
    }  // grouping path-out-sids

    grouping path-out-labels {
      description
        "Grouping for path's label stack";
      list out-label {
        key "label";
        description "Out label";
        leaf label {
          type rt-types:mpls-label;
          description "Label value";
        }
      }  // list out-label
    }  // grouping path-out-labels

    grouping srv6-encap {
      description
        "Grouping for encap param config.";
      container encapsulation {
        description
          "Configure encapsulation related parameters";
        leaf source-address {
          type inet:ipv6-address;
          description
            "Specify a source address (for T.Encap). The address must locally exists
                     and be routable";
        }

        leaf ip-ttl-propagation {
          type boolean;
          default 'false';
          description
            "IP TTL propagation from encapsulated packet to encapsulating outer
                     IPv6 header. When configured on decapsulation side, this refers to
                     propagating IP TTL from outer IPv6 header to inner header after decap";
        }
      }  // container encapsulation
    }  // grouping srv6-encap

    grouping srv6-locator-state {
      description
        "SRv6 grouping Locastateor ";
      leaf operational-status {
        type srv6-types:srv6-status-type;
        config false;
        description
          "Indicates whether locator state is UP";
      }

      leaf is-in-address-conflict {
        type boolean;
        config false;
        description
          "Indicates whether locator address conflicts with
                      some other IPv6 address on the box";
      }
    }  // grouping srv6-locator-state

    grouping srv6-locators {
      description "SRv6 locator grouping";
      container locators {
        description "SRv6 locators";
        list locator {
          key "name";
          description
            "Configure a SRv6 locator";
          leaf name {
            type string;
            description "Locator name";
          }

          leaf enable {
            type boolean;
            default 'false';
            description
              "Enable a SRv6 locator";
          }

          leaf is-default {
            type boolean;
            mandatory true;
            description
              "Indicates if the locator is a default locator";
          }

          container prefix {
            description
              "Specify locator prefix value";
            leaf address {
              type inet:ipv6-address;
              mandatory true;
              description "IPv6 address";
            }

            leaf length {
              type srv6-types:srv6-locator-len;
              mandatory true;
              description
                "Locator (prefix) length";
            }
          }  // container prefix

          uses srv6-locator-state;
        }  // list locator
      }  // container locators
    }  // grouping srv6-locators

    grouping srv6-stats-in {
      description
        "Grouping for inbound stats";
      leaf in-pkts {
        type yang:counter64;
        description
          "A cumulative counter of the total number of packets received";
      }

      leaf in-octets {
        type yang:counter64;
        description
          "A cumulative counter of the total bytes received.";
      }
    }  // grouping srv6-stats-in

    grouping srv6-stats-out {
      description
        "Grouping for inbound stats";
      leaf out-pkts {
        type yang:counter64;
        description
          "A cumulative counter of the total number of packets transmitted";
      }

      leaf out-octets {
        type yang:counter64;
        description
          "A cumulative counter of the total bytes transmitted.";
      }
    }  // grouping srv6-stats-out

    grouping path-out-sids-choice {
      description
        "Grouping for Out-SID choices";
      choice encap-type {
        description
          "Out-SID encap-based choice";
        case srv6 {
          uses path-out-sids;
        }  // case srv6

        case mpls {
          uses path-out-labels;
        }  // case mpls
      }  // choice encap-type
    }  // grouping path-out-sids-choice

    grouping local-sid-fwd-state {
      description
        "SRv6 local-SID forwarding state grouping";
      container forwarding {
        description
          "SRv6 local-SID forwarding state";
        leaf is-installed {
          type boolean;
          description
            "Indicates whether SID is installed in forwarding";
        }

        leaf next-hop-type {
          type srv6-types:srv6-nexthop-type;
          description
            "Forwarding next-hop types";
        }

        container paths {
          when "../is-installed = 'true'" {
            description
              "This container is valid only when the local-SID is installed
               in forwarding";
          }
          description "Forwarding paths";
          list path {
            key "path-index";
            description
              "The list of paths associated with the SID";
            leaf path-index {
              type uint8;
              description
                "Index of the path";
            }

            container l2 {
              when
                "../../../next-hop-type = 'l2'" {
                description
                  "This container is valid only for L2 type of NHs";
              }
              description "L2 information";
              leaf interface {
                type if:interface-ref;
                description
                  "The outgoing Layer2 interface";
              }
            }  // container l2

            container l3 {
              when
                "../../../next-hop-type != 'l2'" {
                description
                  "This container is valid only for L3 type of NHs";
              }
              description "L3 information";
              leaf interface {
                type if:interface-ref;
                description
                  "The outgoing Layer3 interface";
              }

              leaf next-hop {
                type inet:ip-address;
                description
                  "The IP address of the next-hop";
              }

              uses path-attrs-cmn;
            }  // container l3

            uses path-out-sids-choice;
          }  // list path
        }  // container paths
      }  // container forwarding
    }  // grouping local-sid-fwd-state

    grouping srv6-state-sid {
      description "SRv6 SID state grouping";
      container local-sids {
        config false;
        description "Local-SID state";
        container counters {
          description "SRv6 counters";
          container cnt0 {
            description
              "Counts SRv6 traffic received/dropped on local prefix not instantiated as local-SID";
            uses srv6-stats-in;
          }  // container cnt0
        }  // container counters

        list local-sid {
          key "sid";
          description
            "Per-localSID Counters";
          leaf sid {
            type srv6-types:srv6-sid;
            description "Local SID value";
          }

          uses srv6-locator-ref;

          leaf is-reserved {
            type boolean;
            description
              "Set to true if SID comes from reserved pool";
          }

          leaf end-behavior-type {
            type srv6-types:srv6-end-type;
            description
              "Type of SRv6 end behavior.";
          }

          leaf alloc-type {
            type srv6-types:sid-alloc-type;
            description
              "Type of sid allocation.";
          }

          list owner {
            key "type instance";
            description "SID Owner clients";
            leaf type {
              type srv6-types:srv6-sid-owner-type;
              description
                "SID owner/client type";
            }

            leaf instance {
              type string;
              description "Client instance";
            }

            leaf is-winner {
              type boolean;
              description
                "Is this client/owner the winning in terms of forwarding";
            }
          }  // list owner

          uses local-sid-fwd-state;

          container counters {
            description
              "SRv6 per local-SID counters";
            container cnt1 {
              description
                "Counts SRv6 traffic received on local-SID prefix and processed successfully";
              uses srv6-stats-in;
            }  // container cnt1
          }  // container counters
        }  // list local-sid
      }  // container local-sids
    }  // grouping srv6-state-sid

    grouping srv6-support-ends {
      description
        "SRv6 End behavior support grouping";
      list end-behavior {
        key "type";
        description "End behavior support";
        leaf type {
          type srv6-types:srv6-end-type;
          description
            "End behavior (End*) type";
        }

        leaf supported {
          type boolean;
          mandatory true;
          description "True if supported";
        }
      }  // list end-behavior
    }  // grouping srv6-support-ends

    grouping srv6-support-transits {
      description
        "SRv6 Transit behavior support grouping";
      list transit-behavior {
        key "type";
        description
          "Transit behavior support";
        leaf type {
          type srv6-types:srv6-transit-type;
          description
            "Transit behavior (T*) type";
        }

        leaf supported {
          type boolean;
          mandatory true;
          description "True if supported";
        }
      }  // list transit-behavior
    }  // grouping srv6-support-transits

    grouping srv6-support-signaled {
      description
        "SRv6 signaled parameter support grouping";
      container signaled-parameters {
        description
          "SRv6 signaled parameter support";
        leaf max-sl {
          type uint8;
          description
            "Maximum value of the SL field in the SRH of
                    a received packet before applying the function
                    associated with a SID";
        }

        leaf max-end-pop-srh {
          type uint8;
          description
            "Maximum number of SIDs in the top SRH in an
                    SRH stack to which the router can apply
                    PSP or USP flavors";
        }

        leaf max-t_insert {
          type uint8;
          description
            "Maximum number of SIDs that can be inserted as
                   part of the T.insert behavior";
        }

        leaf max-t_encap {
          type uint8;
          description
            "Maximum number of SIDs that can be inserted as
                    part of the T.Encap behavior";
        }

        leaf max-end_d {
          type uint8;
          description
            "Maximum number of SIDs in an SRH when applying
                    End.DX6 and End.DT6 functions";
        }
      }  // container signaled-parameters
    }  // grouping srv6-support-signaled

    grouping srv6-support-security-rules {
      description
        "SRv6 Security rules grouping";
      list security-rule {
        key "type";
        description "Security rule support";
        leaf type {
          type srv6-types:srv6-security-rule-type;
          description "Security rule type";
        }

        leaf supported {
          type boolean;
          mandatory true;
          description "True if supported";
        }
      }  // list security-rule
    }  // grouping srv6-support-security-rules

    grouping srv6-support-counters {
      description "SRv6 Counters grouping";
      list counters {
        key "type";
        description "SRv6 counter support";
        leaf type {
          type srv6-types:srv6-counter-type;
          description "Counter type";
        }

        leaf supported {
          type boolean;
          mandatory true;
          description "True if supported";
        }
      }  // list counters
    }  // grouping srv6-support-counters

    grouping srv6-state-capabilities {
      description
        "SRv6 node capabilities grouping";
      container node-capabilities {
        config false;
        description
          "Node's SRv6 capabilities";
        uses srv6-support-ends;

        uses srv6-support-transits;

        uses srv6-support-signaled;

        uses srv6-support-security-rules;

        uses srv6-support-counters;
      }  // container node-capabilities
    }  // grouping srv6-state-capabilities

    augment /rt:routing {
      description
        "This augments routing-instance configuration with segment-routing SRv6.";
      container srv6 {
        description
          "Segment Routing with IPv6 dataplane";
        leaf enable {
          type boolean;
          default 'false';
          description "Enable SRv6";
        }

        uses srv6-encap;

        uses srv6-locators;

        uses srv6-state-capabilities;

        uses srv6-state-sid;
      }  // container srv6
    }

    grouping srv6-locator-ref {
      description
        "An absolute reference to an SRv6 locator";
      leaf locator-ref {
        type leafref {
          path "/rt:routing/srv6:srv6/srv6:locators/srv6:locator/srv6:name";
        }
        description
          "Reference to a SRv6 locator.";
      }
    }  // grouping srv6-locator-ref

    notification srv6-locator-status-event {
      description
        "Notification event for a change of SRv6 locator operational status.";
      leaf operational-status {
        type srv6-types:srv6-status-type;
        description "Operational status";
      }

      uses srv6-locator-ref;
    }  // notification srv6-locator-status-event

    notification srv6-sid-collision-event {
      description
        "Notification event for an SRv6 SID collision - i.e., attempt to bind an already
       bound SID to a new context";
      leaf sid {
        type srv6-types:srv6-sid;
        description "SRv6 SID";
      }

      container existing {
        description
          "Current assignment / bind";
        leaf end-behavior-type {
          type srv6-types:srv6-end-type;
          description "End type";
        }
      }  // container existing

      container requested {
        description
          "Requested assignment / bind";
        leaf end-behavior-type {
          type srv6-types:srv6-end-type;
          description "End type";
        }
      }  // container requested
    }  // notification srv6-sid-collision-event
  }  // module ietf-srv6-base

Summary

  
  
Organization IETF SPRING Working Group
  
Module ietf-srv6-base
Version 2017-11-12
File ietf-srv6-base@2017-11-12.yang
  
Prefix srv6
Namespace urn:ietf:params:xml:ns:yang:ietf-srv6-base
Reference
RFC XXXX
  
Cooked /cookedmodules/ietf-srv6-base/2017-11-12
YANG /src/ietf-srv6-base@2017-11-12.yang
XSD /xsd/ietf-srv6-base@2017-11-12.xsd
  
Abstract This YANG module defines the essential elements for the management of Segment-Routing with IPv6 dataplane (SRv6). Copyright (c)...
  
Contact
WG Web:   <http://tools.ietf.org/wg/spring/>
WG List:  <mailto:spring@ietf.org>

WG Chair: Bruno Decraene
	  <mailto:loa@pi.nu>

WG Chair: Martin Vigoureux
	  <mailto:rcallon@juniper.net>

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

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

Editor:   Xufeng Liu
	  <mailto:Xufeng_Liu@jabil.com>

Editor:   Iftekhar Hussain
	  <mailto:IHussain@infinera.com>

Editor:   Himanshu Shah
	  <mailto:hshah@ciena.com>

Editor:   Daniel Voyer
	  <mailto:daniel.voyerbell.ca>

Editor:   Hani Elmalky
	  <mailto:hani.elmalky@ericsson.com>

Editor:   Ahmed AbdelSalam
	  <mailto:ahmed.abdelsalam@gssi.it>

Description

 
This YANG module defines the essential elements for the
management of Segment-Routing with IPv6 dataplane (SRv6).

Copyright (c) 2017 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).

Groupings

Grouping Objects Abstract
local-sid-fwd-state forwarding SRv6 local-SID forwarding state grouping
path-attrs-cmn weight role backup-path-index Path properties -common for v4/v6
path-out-labels out-label Grouping for path's label stack
path-out-sids out-sid Grouping for path's SID stack
path-out-sids-choice encap-type Grouping for Out-SID choices
srv6-encap encapsulation Grouping for encap param config.
srv6-locator-ref locator-ref An absolute reference to an SRv6 locator
srv6-locator-state operational-status is-in-address-conflict SRv6 grouping Locastateor
srv6-locators locators SRv6 locator grouping
srv6-state-capabilities node-capabilities SRv6 node capabilities grouping
srv6-state-sid local-sids SRv6 SID state grouping
srv6-stats-in in-pkts in-octets Grouping for inbound stats
srv6-stats-out out-pkts out-octets Grouping for inbound stats
srv6-support-counters counters SRv6 Counters grouping
srv6-support-ends end-behavior SRv6 End behavior support grouping
srv6-support-security-rules security-rule SRv6 Security rules grouping
srv6-support-signaled signaled-parameters SRv6 signaled parameter support grouping
srv6-support-transits transit-behavior SRv6 Transit behavior support grouping

Notifications

Notification Abstract
srv6-locator-status-event Notification event for a change of SRv6 locator operational status.
srv6-sid-collision-event Notification event for an SRv6 SID collision - i.e., attempt to bind an already bound SID to a new context