netconfcentral logo

ietf-segment-routing

HTML

ietf-segment-routing@2017-07-01



  module ietf-segment-routing {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-segment-routing";

    prefix sr;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }
    import ietf-routing {
      prefix rt;
    }
    import ietf-interfaces {
      prefix if;
    }
    import ietf-segment-routing-common {
      prefix sr-cmn;
    }

    organization "IETF SPRING Working Group";

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

     Editor:    Stephane Litkowski
               <mailto:stephane.litkowski@orange.com>
     Editor:    Yingzhen Qu
               <mailto:yingzhen.qu@huawei.com>

     Author:    Acee Lindem
               <mailto:acee@cisco.com>
     Author:    Pushpasis Sarkar
               <mailto:pushpasis.ietf@gmail.com>
     Author:    Jeff Tantsura
               <jefftant.ietf@gmail.com>

    ";

    description
      "The YANG module defines a generic configuration model for
     Segment routing common across all of the vendor
     implementations.

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

     This version of this YANG module is part of RFC XXXX;
     see the RFC itself for full legal notices.";

    reference
      "RFC XXXX";


    revision "2017-07-01" {
      description
        "
       * Implement NMDA model
       *Conform to RFC6087BIS Appendix C
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2017-03-10" {
      description
        "
       * Change global-sid-list to sid-list and add a leaf scope
       * Added support of SRLB
       * Added support of local sids
       * fixed indentations
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2016-10-28" {
      description
        "
       * Add support of MSD (Maximum SID Depth)
       * Update contact info
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2016-10-24" {
      description
        "
       * Moved common SR types and groupings to a seperate module
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2016-07-07" {
      description
        "
       * Add support of prefix-sid algorithm configuration
       * change routing-protocols to control-plane-protocols
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2016-03-17" {
      description
        "
       * Add notification segment-routing-global-srgb-collision
       * Add router-id to segment-routing-global-sid-collision
       * Remove routing-instance
       * Add typedef router-id
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2015-10-17" {
      description
        "
       * Add per-protocol SRGB config feature
       * Move SRBG config to a grouping
      ";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }

    revision "2015-06-22" {
      description
        "
       * Prefix SID config moved to
       connected-prefix-sid-map in global SR cfg
       rather than IGP.
      ";
      reference
        "draft-litkowski-spring-sr-yang-01";

    }

    revision "2015-04-23" {
      description
        "
       * Node flag deprecated from prefixSID
       * SR interface cfg moved to protocol
       * Adding multiple binding policies for SRMS
      ";
      reference
        "";

    }

    revision "2015-02-27" {
      description "Initial";
      reference
        "draft-litkowski-spring-sr-yang-00";

    }


    feature mapping-server {
      description "Support of SRMS.";
    }

    feature protocol-srgb {
      description
        "Support per-protocol srgb configuration.";
    }

    feature msd {
      description
        "Support of signaling MSD (Maximum SID Depth) in IGP.";
    }

    typedef system-id {
      type string {
        pattern
          "[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.[0-9A-Fa-f]{4}\\.00";
      }
      description
        "This type defines ISIS system id using pattern,
       system id looks like : 0143.0438.AeF0.00";
    }

    typedef router-id {
      type union {
        type system-id;
        type yang:dotted-quad;
      }
      description
        "OSPF/BGP router id or ISIS system ID.";
    }

    grouping controlplane-cfg {
      description
        "Defines protocol configuration.";
      container segment-routing {
        description
          "segment routing global config.";
        leaf enabled {
          type boolean;
          default "false";
          description
            "Enables segment-routing
           protocol extensions.";
        }

        container bindings {
          description
            "Control of binding advertisement
           and reception.";
          container advertise {
            description
              "Authorize the advertise
             of local mappings in binding TLV.";
            leaf-list policies {
              type string;
              description
                "List of policies to be advertised.";
            }
          }  // container advertise

          leaf receive {
            type boolean;
            default "true";
            description
              "Authorize the reception and usage
             of binding TLV.";
          }
        }  // container bindings
      }  // container segment-routing
    }  // grouping controlplane-cfg

    grouping igp-interface-cfg {
      description
        "Grouping for IGP interface cfg.";
      container segment-routing {
        description
          "container for SR interface cfg.";
        container adjacency-sid {
          description
            "Defines the adjacency SID properties.";
          list advertise-adj-group-sid {
            key "group-id";
            description
              "Control advertisement of S flag.
             Enable to advertise a common Adj-SID
             for parallel links.";
            leaf group-id {
              type uint32;
              description
                "The value is an internal value to identify
               a group-ID. Interfaces with the same
               group-ID will be bundled together.";
            }
          }  // list advertise-adj-group-sid

          leaf advertise-protection {
            type enumeration {
              enum "single" {
                value 0;
                description
                  "A single Adj-SID is associated
                 with the adjacency and reflects
                 the protection configuration.";
              }
              enum "dual" {
                value 1;
                description
                  "Two Adj-SIDs will be associated
                 with the adjacency if interface
                 is protected. In this case
                 one will be enforced with
                 backup flag set, the other
                 will be enforced to backup flag unset.
                 In case, protection is not configured,
                 a single Adj-SID will be advertised
                 with backup flag unset.";
              }
            }
            description
              "If set, the Adj-SID refers to an
             adjacency being protected.";
          }
        }  // container adjacency-sid
      }  // container segment-routing
    }  // grouping igp-interface-cfg

    grouping msd-cfg {
      description
        "MSD configuration grouping.";
      leaf node-msd {
        type uint8;
        description
          "Node MSD is the lowest MSD supported by the node.";
      }

      container link-msd {
        description
          "Link MSD is a number represetns the particular link MSD value.";
        list link-msds {
          key "interface";
          description "List of link MSDs.";
          leaf interface {
            type if:interface-ref;
            description
              "Name of the interface.";
          }

          leaf msd {
            type uint8;
            description
              "SID depth of the interface associated with the link.";
          }
        }  // list link-msds
      }  // container link-msd
    }  // grouping msd-cfg

    augment /rt:routing {
      description
        "This augments routing-instance
       configuration with segment-routing.";
      container segment-routing {
        description
          "segment routing global config.";
        leaf transport-type {
          type identityref {
            base sr-cmn:segment-routing-transport;
          }
          default
            "sr-cmn:segment-routing-transport-mpls";
          description
            "Dataplane to be used.";
        }

        uses sr-cmn:node-capabilities;

        container msd {
          if-feature msd;
          description "MSD configuration.";
          uses msd-cfg;
        }  // container msd

        container bindings {
          description "List of bindings.";
          container mapping-server {
            if-feature mapping-server;
            description
              "Configuration of mapping-server
             local entries.";
            list policy {
              key "name";
              description
                "Definition of mapping policy.";
              leaf name {
                type string;
                description
                  "Name of the mapping policy.";
              }

              container ipv4 {
                description
                  "IPv4 mapping entries.";
                list mapping-entry {
                  key "prefix algorithm";
                  description
                    "Mapping entries.";
                  uses sr-cmn:ipv4-sid-cfg;
                }  // list mapping-entry
              }  // container ipv4

              container ipv6 {
                description
                  "IPv6 mapping entries.";
                list mapping-entry {
                  key "prefix algorithm";
                  description
                    "Mapping entries.";
                  uses sr-cmn:ipv6-sid-cfg;
                }  // list mapping-entry
              }  // container ipv6
            }  // list policy
          }  // container mapping-server

          container connected-prefix-sid-map {
            description
              "Prefix SID configuration.";
            container ipv4 {
              description
                "Parameters associated with IPv4 prefix SID";
              list ipv4-prefix-sid {
                key "prefix algorithm";
                description
                  "List of prefix SID
                 mapped to IPv4 local prefixes.";
                uses sr-cmn:ipv4-sid-cfg;

                uses sr-cmn:last-hop-behavior;
              }  // list ipv4-prefix-sid
            }  // container ipv4

            container ipv6 {
              description
                "Parameters associated with IPv6 prefix SID";
              list ipv6-prefix-sid {
                key "prefix algorithm";
                description
                  "List of prefix SID
                 mapped to IPv6 local prefixes.";
                uses sr-cmn:ipv6-sid-cfg;

                uses sr-cmn:last-hop-behavior;
              }  // list ipv6-prefix-sid
            }  // container ipv6
          }  // container connected-prefix-sid-map

          container local-prefix-sid {
            description
              "Local sid configuration.";
            container ipv4 {
              description
                "List of local ipv4 sids.";
              list ipv4-prefix-sid-local {
                key "prefix algorithm";
                description
                  "List of local prefix-sid.";
                uses sr-cmn:ipv4-sid-cfg;
              }  // list ipv4-prefix-sid-local
            }  // container ipv4

            container ipv6 {
              description
                "List of local ipv6 sids.";
              list ipv6-prefix-sid-local {
                key "prefix algorithm";
                description
                  "List of local prefix-sid.";
                uses sr-cmn:ipv6-sid-cfg;
              }  // list ipv6-prefix-sid-local
            }  // container ipv6
          }  // container local-prefix-sid
        }  // container bindings

        container global-srgb {
          description
            "Global SRGB configuration.";
          uses sr-cmn:srgb-cfg;
        }  // container global-srgb

        container srlb {
          description
            "SR Local Block configuration.";
          uses sr-cmn:srlb-cfg;
        }  // container srlb

        list label-blocks {
          config false;
          description
            "List of labels blocks currently
           in use.";
          leaf lower-bound {
            type uint32;
            description
              "Lower bound of the label block.";
          }

          leaf upper-bound {
            type uint32;
            description
              "Upper bound of the label block.";
          }

          leaf size {
            type uint32;
            description
              "Number of indexes in the block.";
          }

          leaf free {
            type uint32;
            description
              "Number of indexes free in the block.";
          }

          leaf used {
            type uint32;
            description
              "Number of indexes used in the block.";
          }

          leaf scope {
            type enumeration {
              enum "global" {
                value 0;
                description "Global sid.";
              }
              enum "local" {
                value 1;
                description "Local sid.";
              }
            }
            description
              "Scope of this label block.";
          }
        }  // list label-blocks

        container sid-list {
          config false;
          description
            "List of prefix and SID associations.";
          list sid {
            key "target sid source source-protocol binding-type";
            description "Binding.";
            leaf target {
              type string;
              description
                "Defines the target of the binding.
               It can be a prefix or something else.";
            }

            leaf sid {
              type uint32;
              description
                "Index associated with the prefix.";
            }

            leaf algorithm {
              type uint8;
              description
                "Algorithm to be used for the prefix
               SID.";
            }

            leaf source {
              type inet:ip-address;
              description
                "IP address of the router than own
               the binding.";
            }

            leaf used {
              type boolean;
              description
                "Defines if the binding is used
               in forwarding plane.";
            }

            leaf source-protocol {
              type leafref {
                path
                  "/rt:routing/rt:control-plane-protocols/"
                    + "rt:control-plane-protocol/rt:name";
              }
              description
                "Rtg protocol that owns the binding";
            }

            leaf binding-type {
              type enumeration {
                enum "prefix-sid" {
                  value 0;
                  description
                    "Binding is learned from
                   a prefix SID.";
                }
                enum "binding-tlv" {
                  value 1;
                  description
                    "Binding is learned from
                   a binding TLV.";
                }
              }
              description "Type of binding.";
            }

            leaf scope {
              type enumeration {
                enum "global" {
                  value 0;
                  description "Global sid.";
                }
                enum "local" {
                  value 1;
                  description "Local sid.";
                }
              }
              description
                "The sid is local or global.";
            }
          }  // list sid
        }  // container sid-list
      }  // container segment-routing
    }

    notification segment-routing-global-srgb-collision {
      description
        "This notification is sent when received SRGB blocks from
       a router conflict.";
      list srgb-collisions {
        description
          "List of SRGB blocks that conflict.";
        leaf lower-bound {
          type uint32;
          description
            "Lower value in the block.";
        }

        leaf upper-bound {
          type uint32;
          description
            "Upper value in the block.";
        }

        leaf routing-protocol {
          type leafref {
            path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
          }
          description
            "Routing protocol reference that received the event.";
        }

        leaf originating-rtr-id {
          type router-id;
          description
            "Originating router id of this SRGB block.";
        }
      }  // list srgb-collisions
    }  // notification segment-routing-global-srgb-collision

    notification segment-routing-global-sid-collision {
      description
        "This notification is sent when a new mapping is learned
       , containing mapping
       where the SID is already used.
       The notification generation must be throttled with at least
       a 5 second gap. ";
      leaf received-target {
        type string;
        description
          "Target received in the controlplane that
                           caused SID collision.";
      }

      leaf new-sid-rtr-id {
        type router-id;
        description
          "Router Id that advertising the conflicting SID.";
      }

      leaf original-target {
        type string;
        description
          "Target already available in database that have the same SID
         as the received target.";
      }

      leaf original-sid-rtr-id {
        type router-id;
        description
          "Original router ID that advertised the conflicting SID.";
      }

      leaf index {
        type uint32;
        description
          "Value of the index used by two different prefixes.";
      }

      leaf routing-protocol {
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
        }
        description
          "Routing protocol reference that received the event.";
      }
    }  // notification segment-routing-global-sid-collision

    notification segment-routing-index-out-of-range {
      description
        "This notification is sent when a binding
       is received, containing a segment index
       which is out of the local configured ranges.
       The notification generation must be throttled with at least
       a 5 second gap. ";
      leaf received-target {
        type string;
        description
          "Target received in the controlplane
                          that caused SID collision.";
      }

      leaf received-index {
        type uint32;
        description
          "Value of the index received.";
      }

      leaf routing-protocol {
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/rt:name";
        }
        description
          "Routing protocol reference that received the event.";
      }
    }  // notification segment-routing-index-out-of-range
  }  // module ietf-segment-routing

Summary

  
  
Organization IETF SPRING Working Group
  
Module ietf-segment-routing
Version 2017-07-01
File ietf-segment-routing@2017-07-01.yang
  
Prefix sr
Namespace urn:ietf:params:xml:ns:yang:ietf-segment-routing
Reference
RFC XXXX
  
Cooked /cookedmodules/ietf-segment-routing/2017-07-01
YANG /src/ietf-segment-routing@2017-07-01.yang
XSD /xsd/ietf-segment-routing@2017-07-01.xsd
  
Abstract The YANG module defines a generic configuration model for Segment routing common across all of the vendor implementations. Copy...
  
Contact
WG Web:   <http://tools.ietf.org/wg/spring/>
WG List:  <mailto:spring@ietf.org>

Editor:    Stephane Litkowski
	  <mailto:stephane.litkowski@orange.com>
Editor:    Yingzhen Qu
	  <mailto:yingzhen.qu@huawei.com>

Author:    Acee Lindem
	  <mailto:acee@cisco.com>
Author:    Pushpasis Sarkar
	  <mailto:pushpasis.ietf@gmail.com>
Author:    Jeff Tantsura
	  <jefftant.ietf@gmail.com>

Description

 
The YANG module defines a generic configuration model for
Segment routing common across all of the vendor
implementations.

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

This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices.

Typedefs

Typedef Base type Abstract
router-id union OSPF/BGP router id or ISIS system ID.
system-id string This type defines ISIS system id using pattern, system id looks like : 0143.0438.AeF0.00

Groupings

Grouping Objects Abstract
controlplane-cfg segment-routing Defines protocol configuration.
igp-interface-cfg segment-routing Grouping for IGP interface cfg.
msd-cfg node-msd link-msd MSD configuration grouping.

Notifications

Notification Abstract
segment-routing-global-sid-collision This notification is sent when a new mapping is learned , containing mapping where the SID is already used. The notification generation must be throttled with at least a 5 second gap.
segment-routing-global-srgb-collision This notification is sent when received SRGB blocks from a router conflict.
segment-routing-index-out-of-range This notification is sent when a binding is received, containing a segment index which is out of the local configured ranges. The notification generation must be throttled with at least a 5 second gap.