netconfcentral logo

ietf-segment-routing-mpls

HTML

ietf-segment-routing-mpls@2020-08-17



  module ietf-segment-routing-mpls {

    yang-version 1.1;

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

    prefix sr-mpls;

    import ietf-inet-types {
      prefix inet;
      reference
        "RFC 6991: Common YANG Data Types";


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


    }
    import ietf-interfaces {
      prefix if;
      reference
        "RFC 8343: A YANG Data Model for Interface
        Management (NMDA Version)";


    }
    import ietf-routing-types {
      prefix rt-types;
      reference
        "RFC 8294: Common YANG Data Types for the
        Routing Area";


    }
    import ietf-segment-routing {
      prefix sr;
    }
    import ietf-segment-routing-common {
      prefix sr-cmn;
    }

    organization
      "IETF SPRING - SPRING Working Group";

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

     Author:    Stephane Litkowski
               <mailto:slitkows.ietf@gmail.com>
     Author:    Yingzhen Qu
               <mailto:yingzhen.qu@futurewei.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 MPLS data plane.

     This YANG model conforms to the Network Management
     Datastore Architecture (NMDA) as described in RFC 8242.

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

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

    reference
      "RFC XXXX";


    revision "2020-08-17" {
      description "Initial Version";
      reference
        "RFC XXXX: YANG Data Model for Segment Routing.";

    }


    feature mapping-server {
      description
        "Support for Segment Routing Mapping Server (SRMS).";
      reference
        "RFC 8661: Segment Routing MPLS Interworking with LDP";

    }

    feature protocol-srgb {
      description
        "Support for per-protocol Segment Routing Global Block
       (SRGB) configuration.";
      reference
        "RFC 8660: Segment Routing with the MPLS Data Plane";

    }

    feature max-sid-depth {
      description
        "Support for signaling MSD (Maximum SID Depth) in IGP.";
      reference
        "RFC 8476: Signaling Maximum SID Depth (MSD)
        Using OSPF
         RFC 8491: Signaling Maximum SID Depth (MSD)
        Using IS-IS";

    }

    typedef system-id {
      type string {
        pattern
          '[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}';
      }
      description
        "This type defines IS-IS system-id using pattern,
       An example system-id is 0143.0438.AEF0";
    }

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

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

        container bindings {
          if-feature mapping-server;
          description
            "Control of binding advertisement and reception.";
          container advertise {
            description
              "Control advertisement of local mappings
             in binding TLVs.";
            leaf-list policies {
              type leafref {
                path
                  "/rt:routing/sr:segment-routing/sr-mpls:sr-mpls"
                    + "/sr-mpls:bindings/sr-mpls:mapping-server"
                    + "/sr-mpls:policy/sr-mpls:name";
              }
              description
                "List of binding advertisement policies.";
            }
          }  // container advertise

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

    grouping igp-interface {
      description
        "Grouping for IGP interface configuration.";
      container segment-routing {
        description
          "Container for SR interface configuration.";
        container adjacency-sid {
          description
            "Adjacency SID configuration.";
          reference
            "RFC 8660: Segment Routing with the MPLS
            Data Plane";

          list adj-sids {
            key "value";
            description
              "List of adj-sid configuration.";
            uses sr-cmn:sid-value-type;

            leaf value {
              type uint32;
              description
                "Value of the Adj-SID.";
            }

            leaf protected {
              type boolean;
              default 'false';
              description
                "It is used to protect the manual adj-SID.";
            }

            leaf weight {
              type uint8;
              description
                "The load-balancing factor over parallel adjacencies.";
              reference
                "RFC 8402: Segment Routing Architecture
                 RFC 8665: OSPF Extensions for Segment Routing
                 RFC 8667: IS-IS Extensions for Segment Routing";

            }
          }  // list adj-sids

          list advertise-adj-group-sid {
            key "group-id";
            description
              "Control advertisement of S flag. Enable advertisement
             of 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 the interface is protected. In this case, will
                 be advertised with backup flag set, the other will
                 be advertised with the backup flag clear. In case
                 protection is not configured, single Adj-SID will
                 be advertised with the backup flag clear.";
              }
            }
            description
              "If set, the Adj-SID refers to a protected adjacency.";
          }
        }  // container adjacency-sid
      }  // container segment-routing
    }  // grouping igp-interface

    grouping max-sid-depth {
      description
        "Maximum SID Depth (MSD)D configuration grouping.";
      leaf node-msd {
        type uint8;
        description
          "Node MSD is the lowest MSD supported by the node.";
      }

      container link-msd {
        description
          "MSD supported by an individual interface.";
        list link-msds {
          key "interface";
          description "List of link MSDs.";
          leaf interface {
            type if:interface-ref;
            description
              "Reference to device interface.";
          }

          leaf msd {
            type uint8;
            description
              "MSD supported by the interface.";
          }
        }  // list link-msds
      }  // container link-msd
    }  // grouping max-sid-depth

    augment /rt:routing/sr:segment-routing {
      description
        "This augments routing data model (RFC 8349)
       with Segment Routing (SR).";
      container sr-mpls {
        description
          "Segment Routing global configuration.";
        uses sr-cmn:node-capabilities;

        container msd {
          if-feature max-sid-depth;
          description "MSD configuration.";
          uses max-sid-depth;
        }  // 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
                "List mapping-server policies.";
              leaf name {
                type string;
                description
                  "Name of the mapping policy.";
              }

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

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

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

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

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

        container srlb {
          description
            "Segment Routing Local Block (SRLB) configuration.";
          uses sr-cmn:srlb;
        }  // container srlb

        list label-blocks {
          config false;
          description
            "List of label 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 free indexes in the block.";
          }

          leaf used {
            type uint32;
            description
              "Number of indexes in use 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-db {
          config false;
          description
            "List of prefix and SID associations.";
          list sid {
            key "target sid source source-protocol binding-type";
            description "SID 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.";
              reference
                "RFC 8665: OSPF Extensions for Segment Routing
                 RFC 8667: IS-IS Extensions for Segment Routing";

            }

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

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

            leaf source-protocol {
              type leafref {
                path
                  "/rt:routing/rt:control-plane-protocols/"
                    + "rt:control-plane-protocol/rt:name";
              }
              description
                "Routing 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 "SID scoping.";
            }
          }  // list sid
        }  // container sid-db
      }  // container sr-mpls
    }

    notification segment-routing-global-srgb-collision {
      description
        "This notification is sent when SRGB blocks received from
       routers 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 for SRGB collision.";
        }

        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 s mapping where the SID is already used.
       The notification generation must be throttled with at least
       a 5 second gap between notifications.";
      leaf received-target {
        type string;
        description
          "Target received in the router advertisement that caused
         the SID collision.";
      }

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

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

      leaf original-sid-rtr-id {
        type router-id;
        description
          "Router-ID for the router that originally advertised the
         conflicting SID, i.e., the instance in the database.";
      }

      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 for conflicting SID.";
      }
    }  // 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 between
       notifications.";
      leaf received-target {
        type string;
        description
          "Target received in the router advertisement with
         the out-of-range index.";
      }

      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 for out-of-range indexd.";
      }
    }  // notification segment-routing-index-out-of-range
  }  // module ietf-segment-routing-mpls

Summary

  
  
Organization IETF SPRING - SPRING Working Group
  
Module ietf-segment-routing-mpls
Version 2020-08-17
File ietf-segment-routing-mpls@2020-08-17.yang
  
Prefix sr-mpls
Namespace urn:ietf:params:xml:ns:yang:ietf-segment-routing-mpls
Reference
RFC XXXX
  
Cooked /cookedmodules/ietf-segment-routing-mpls/2020-08-17
YANG /src/ietf-segment-routing-mpls@2020-08-17.yang
XSD /xsd/ietf-segment-routing-mpls@2020-08-17.xsd
  
Abstract The YANG module defines a generic configuration model for Segment Routing MPLS data plane. This YANG model conforms to the Netw...
  
Contact
WG Web:   <http://tools.ietf.org/wg/spring/>
WG List:  <mailto:spring@ietf.org>

Author:    Stephane Litkowski
	  <mailto:slitkows.ietf@gmail.com>
Author:    Yingzhen Qu
	  <mailto:yingzhen.qu@futurewei.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 MPLS data plane.

This YANG model conforms to the Network Management
Datastore Architecture (NMDA) as described in RFC 8242.

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

The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.

Typedefs

Typedef Base type Abstract
router-id union OSPF/BGP router-id or ISIS system ID.
system-id string This type defines IS-IS system-id using pattern, An example system-id is 0143.0438.AEF0

Groupings

Grouping Objects Abstract
igp-interface segment-routing Grouping for IGP interface configuration.
max-sid-depth node-msd link-msd Maximum SID Depth (MSD)D configuration grouping.
sr-controlplane segment-routing Defines protocol configuration.

Notifications

Notification Abstract
segment-routing-global-sid-collision This notification is sent when a new mapping is learned containing s mapping where the SID is already used. The notification generation must be throttled with at least a 5 second gap between notifications.
segment-routing-global-srgb-collision This notification is sent when SRGB blocks received from routers 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 between notifications.