ietf-sr-mpls-topology

YANG data model for representing and manipulating Segment Routing Topologies on MPLS Data Plane. Copyright (c) 2022 IETF Trust ...

  • Version: 2022-10-22

    ietf-sr-mpls-topology@2022-10-22


    
      module ietf-sr-mpls-topology {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-sr-mpls-topology";
    
        prefix srmt;
    
        import ietf-network {
          prefix nw;
          reference
            "RFC 8345: A YANG Data Model for Network Topologies";
    
    
        }
        import ietf-network-topology {
          prefix nt;
          reference
            "RFC 8345: A YANG Data Model for Network Topologies";
    
    
        }
        import ietf-l3-unicast-topology {
          prefix l3t;
          reference
            "RFC 8346: A YANG Data Model for Layer 3 Topologies";
    
    
        }
        import ietf-segment-routing-common {
          prefix sr-cmn;
          reference
            "RFC 9020: YANG Data Model for Segment Routing";
    
    
        }
    
        organization
          "IETF Traffic Engineering Architecture and Signaling (TEAS)
         Working Group";
    
        contact
          "WG Web:   <http://tools.ietf.org/wg/teas/>
         WG List:  <mailto:teas@ietf.org>
    
         Editor:   Xufeng Liu
                   <mailto:xufeng.liu.ietf@gmail.com>
    
         Editor:   Igor Bryskin
                   <mailto:Igor.Bryskin@huawei.com>
    
         Editor:   Vishnu Pavan Beeram
                   <mailto:vbeeram@juniper.net>
    
         Editor:   Tarek Saad
                   <mailto:tsaad@cisco.com>
    
         Editor:   Himanshu Shah
                   <mailto:hshah@ciena.com>
    
         Editor:   Stephane Litkowski
                   <mailto:stephane.litkowski@orange.com>";
    
        description
          "YANG data model for representing and manipulating Segment
         Routing Topologies on MPLS Data Plane.
    
         Copyright (c) 2022 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.";
    
        revision "2022-10-22" {
          description "Initial revision";
          reference
            "RFC XXXX: YANG Data Model for SR and SR TE Topologies on MPLS
            Data Plane";
    
        }
    
    
        feature msd {
          description
            "Support of 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.
             RFC 8814: Signaling Maximum SID Depth (MSD) Using the Border
            Gateway Protocol - Link State.";
    
        }
    
        identity msd-base-type {
          description
            "Base identity for Maximum SID Depth (MSD) Type";
        }
    
        identity msd-mpls {
          base msd-base-type;
          description
            "Base MPLS Imposition MSD.";
          reference
            "RFC 8491: Signaling Maximum SID Depth (MSD) using IS-IS.
             RFC 8476: Signaling Maximum SID Depth (MSD) using OSPF.";
    
        }
    
        identity msd-erld {
          base msd-base-type;
          description
            "msd-erld is defined to advertise the Entropy Readable
           Label Depth (ERLD).";
          reference
            "RFC 8662: Entropy Label for Source Packet Routing in
            Networking (SPRING) Tunnels";
    
        }
    
        grouping sr-mpls-topology-type {
          description
            "Identifies the SR-MPLS topology type. This type of network
           topologies use Segment Routing (SR) technology over the MPLS
           data plane";
          container sr-mpls {
            presence
              "Indicates SR-MPLS topology";
            description
              "Its presence identifies the SR MPLS topology type.";
          }  // container sr-mpls
        }  // grouping sr-mpls-topology-type
    
        grouping sr-mpls-topology-attributes {
          description
            "SR MPLS topology scope attributes.";
          container sr-mpls {
            description
              "Containing SR attributes.";
            uses sr-cmn:srgb;
          }  // container sr-mpls
        }  // grouping sr-mpls-topology-attributes
    
        grouping information-source-attributes {
          description
            "The attributes identifying source that has provided the
           related information, and the source credibility.";
          leaf information-source {
            type enumeration {
              enum "unknown" {
                value 0;
                description
                  "The source is unknown.";
              }
              enum "locally-configured" {
                value 1;
                description "Configured entity.";
              }
              enum "ospfv2" {
                value 2;
                description "OSPFv2.";
                reference
                  "RFC 8665: OSPF Extensions for Segment Routing.";
    
              }
              enum "ospfv3" {
                value 3;
                description "OSPFv3.";
                reference
                  "RFC 8666: OSPFv3 Extensions for Segment Routing.";
    
              }
              enum "isis" {
                value 4;
                description "ISIS.";
                reference
                  "RFC 8667: IS-IS Extensions for Segment Routing.";
    
              }
              enum "bgp-ls" {
                value 5;
                description "BGP-LS.";
                reference
                  "RFC 7752: North-Bound Distribution of Link-State and
                  Traffic Engineering (TE) Information Using BGP.
                  I-D.ietf-idr-bgp-ls-segment-routing-ext:
                  BGP Link-State extensions for Segment Routing.";
    
              }
              enum "system-processed" {
                value 6;
                description
                  "System processed entity.";
              }
              enum "other" {
                value 7;
                description "Other source.";
              }
            }
            config false;
            description
              "Indicates the type of the information source.";
          }
    
          leaf information-source-instance {
            type string;
            config false;
            description
              "The name indicating the instance of the information
             source.";
          }
    
          container information-source-state {
            config false;
            description
              "The container contains state attributes related to
             the information source.";
            leaf credibility-preference {
              type uint16;
              description
                "The preference value to calculate the traffic
               engineering database credibility value used for
               tie-break selection between different
               information-source values.
               Higher value is more preferable.";
            }
          }  // container information-source-state
        }  // grouping information-source-attributes
    
        grouping sr-node-attributes {
          description
            "SR node scope attributes.";
          container sr-mpls {
            presence
              "Presence indicates SR is enabled.";
            description
              "Containing SR attributes.";
            uses sr-cmn:srgb;
    
            uses sr-cmn:srlb;
    
            container msds {
              if-feature msd;
              description "MSDs on the node.";
              list node-msd {
                key "msd-type";
                description
                  "List of node MSDs. A node may have a list of MSD values,
                 with at most one value for each msd-type.";
                reference
                  "RFC 8491: Signaling Maximum SID Depth (MSD) Using
                  IS-IS";
    
                leaf msd-type {
                  type identityref {
                    base msd-base-type;
                  }
                  description "MSD Type.";
                }
    
                leaf msd-value {
                  type uint8;
                  description
                    "MSD value, in the range of 0-255. Node MSD is the
                   lowest MSD supported by the node.";
                }
              }  // list node-msd
            }  // container msds
    
            uses information-source-attributes;
          }  // container sr-mpls
        }  // grouping sr-node-attributes
    
        grouping sr-node-prefix-attributes {
          description
            "Containing SR attributes for a prefix.";
          container sr-mpls {
            presence
              "Presence indicates SR is enabled.";
            description
              "Containing SR attributes for a prefix.";
            container sids {
              description
                "Containing Prefix SIDs assigned to this prefix.";
              list sid {
                key "algorithm";
                description
                  "A list of SIDs with their properties.";
                uses sr-cmn:prefix-sid-attributes;
    
                uses sr-cmn:last-hop-behavior;
    
                leaf is-local {
                  type boolean;
                  default 'false';
                  description
                    "'true' if the SID is local.";
                }
    
                leaf is-node {
                  type boolean;
                  default 'false';
                  description
                    "'true' if the Prefix-SID refers to the router
                   identified by the prefix.  Typically, the leaf
                   'is-node' (N-Flag) is set on Prefix-SIDs attached to a
                   router loopback address.";
                }
    
                leaf is-readvertisment {
                  type boolean;
                  config false;
                  description
                    "'true' if the prefix to which this Prefix-SID is
                    attached, has been propagated by the router from
                    another topology by redistribution.";
                  reference
                    "RFC 8667: IS-IS Extensions for Segment Routing.
                    Sec 2.1.";
    
                }
              }  // list sid
            }  // container sids
          }  // container sr-mpls
        }  // grouping sr-node-prefix-attributes
    
        grouping sr-link-attributes {
          description "SR link scope attributes";
          container sr-mpls {
            presence
              "Presence indicates SR is enabled.";
            description
              "Containing SR attributes.";
            container msds {
              if-feature msd;
              description "MSDs on the link.";
              list link-msd {
                key "msd-type";
                description
                  "List of link MSDs. A link may have a list of MSD values,
                 with at most one value for each msd-type.";
                reference
                  "RFC 8491: Signaling Maximum SID Depth (MSD) Using
                  IS-IS";
    
                leaf msd-type {
                  type identityref {
                    base msd-base-type;
                  }
                  description "MSD Type.";
                }
    
                leaf msd-value {
                  type uint8;
                  description
                    "MSD value, in the range of 0-255.";
                }
              }  // list link-msd
            }  // container msds
    
            container sids {
              description
                "Containing Adjacency SIDs assigned to this link.";
              list sid {
                key "value-type sid";
                description
                  "A list of SIDs with their properties.";
                uses sr-cmn:sid-value-type;
    
                leaf sid {
                  type uint32;
                  mandatory true;
                  description
                    "Adjacency SID, which can be either IGP-Adjacency SID
                   or BGP PeerAdj SID, depending on the context.";
                }
    
                leaf address-family {
                  type enumeration {
                    enum "ipv4" {
                      value 0;
                      description
                        "The Adj-SID refers to an adjacency with outgoing
                       IPv4 encapsulation.";
                    }
                    enum "ipv6" {
                      value 1;
                      description
                        "The Adj-SID refers to an adjacency with outgoing
                       IPv6 encapsulation.";
                    }
                  }
                  default "ipv4";
                  description
                    "This leaf defines the F-Flag (Address-Family flag) of
                   the SID.";
                }
    
                leaf is-eligible-for-protection {
                  type boolean;
                  default 'false';
                  description
                    "'true' if the SID is is eligible for protection.";
                  reference
                    "RFC 8402: Segment Routing Architecture. Sec. 3.4.";
    
                }
    
                leaf is-local {
                  type boolean;
                  default 'false';
                  description
                    "'true' if the SID is local.";
                }
    
                leaf is-part-of-set {
                  type boolean;
                  default 'false';
                  description
                    "'true' if the SID is part of a set.";
                }
    
                leaf is-persistent {
                  type boolean;
                  default 'true';
                  description
                    "'true' if the SID is persistently allocated.";
                }
    
                leaf is-on-lan {
                  type boolean;
                  default 'false';
                  description
                    "'true' if on a lan.";
                }
    
                leaf weight {
                  type uint8;
                  description
                    "The value represents the weight of the SID for the
                   purpose of load balancing.  The use of the weight
                   is defined in RFC 8402.";
                  reference
                    "RFC 8402: Segment Routing Architecture. Sec. 3.4.";
    
                }
              }  // list sid
            }  // container sids
    
            uses information-source-attributes;
          }  // container sr-mpls
        }  // grouping sr-link-attributes
    
        augment /nw:networks/nw:network/nw:network-types/l3t:l3-unicast-topology {
          description
            "Defines the SR MPLS topology type.";
          uses sr-mpls-topology-type;
        }
    
        augment /nw:networks/nw:network/l3t:l3-topology-attributes {
          when
            "../nw:network-types/l3t:l3-unicast-topology/srmt:sr-mpls" {
            description
              "Augment only for SR MPLS topology.";
          }
          description
            "Augment topology configuration";
          uses sr-mpls-topology-attributes;
        }
    
        augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes {
          when
            "../../nw:network-types/l3t:l3-unicast-topology/"
              + "srmt:sr-mpls" {
            description
              "Augment only for SR MPLS topology.";
          }
          description
            "Augment node configuration.";
          uses sr-node-attributes;
        }
    
        augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes/l3t:prefix {
          when
            "../../../nw:network-types/l3t:l3-unicast-topology/"
              + "srmt:sr-mpls" {
            description
              "Augment only for SR MPLS topology.";
          }
          description "Augment node prefix.";
          uses sr-node-prefix-attributes;
        }
    
        augment /nw:networks/nw:network/nt:link/l3t:l3-link-attributes {
          when
            "../../nw:network-types/l3t:l3-unicast-topology/"
              + "srmt:sr-mpls" {
            description
              "Augment only for SR MPLS topology.";
          }
          description
            "Augment link configuration";
          uses sr-link-attributes;
        }
      }  // module ietf-sr-mpls-topology
    

© 2023 YumaWorks, Inc. All rights reserved.