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;
}
import ietf-routing {
prefix rt;
}
import ietf-interfaces {
prefix if;
}
import ietf-routing-types {
prefix rt-types;
}
import ietf-segment-routing {
prefix sr;
}
import ietf-segment-routing-common {
prefix sr-cmn;
}
organization
"IETF SPRING - SPRING Working Group";
contact
"WG Web:
WG List:
Editor: Stephane Litkowski
Editor: Yingzhen Qu
Author: Acee Lindem
Author: Pushpasis Sarkar
Author: Jeff Tantsura
";
description
"The YANG module defines a generic configuration model for
Segment Routing MPLS data plane.
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.";
reference "RFC XXXX";
revision 2020-01-09 {
description
"Initial Version";
reference "RFC XXXX: YANG Data Model for Segment Routing.";
}
feature mapping-server {
description
"Support for Segment Routing Mapping Server (SRMS).";
}
feature protocol-srgb {
description
"Support for per-protocol Segment Routing Global Block
(SRGB) configuration.";
}
feature max-sid-depth {
description
"Support for 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}';
}
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 {
description
"Control of binding advertisement and reception.";
container advertise {
description
"Control advertisement of local mappings
in binding TLVs.";
leaf-list policies {
type string;
description
"List of binding advertisement policies.";
}
}
leaf receive {
type boolean;
default "true";
description
"Allow the reception and usage of binding TLVs.";
}
}
}
}
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.";
list adj-sids {
key "value";
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 mannual adj-SID.";
}
description
"List of adj-sid configuration.";
}
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.";
}
}
leaf advertise-protection {
type enumeration {
enum "single" {
description
"A single Adj-SID is associated with the adjacency
and reflects the protection configuration.";
}
enum "dual" {
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 theo 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.";
}
}
}
}
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.";
}
}
}
}
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 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;
}
}
}
}
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;
}
}
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;
}
}
}
container global-srgb {
description
"Global SRGB configuration.";
uses sr-cmn:srgb;
}
container srlb {
description
"Segment Routing Local Block (SRLB) configuration.";
uses sr-cmn: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" {
description
"Global SID.";
}
enum "local" {
description
"Local SID.";
}
}
description
"Scope of this label block.";
}
}
container sid-db {
config false;
description
"List of prefix and SID associations.";
list sid {
key "target sid source source-protocol binding-type";
ordered-by system;
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.";
}
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" {
description
"Binding is learned from a prefix SID.";
}
enum "binding-tlv" {
description
"Binding is learned from a binding TLV.";
}
}
description
"Type of binding.";
}
leaf scope {
type enumeration {
enum "global" {
description
"Global SID.";
}
enum "local" {
description
"Local SID.";
}
}
description
"SID scoping.";
}
}
}
}
}
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.";
}
}
}
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-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.";
}
}
}