module ietf-isis-sr-mpls {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-isis-sr-mpls";
prefix isis-sr-mpls;
import ietf-routing {
prefix rt;
reference
"RFC 8349: A YANG Data Model for Routing
Management (NMDA Version)";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-segment-routing-common {
prefix sr-cmn;
reference
"RFC 9020: YANG Data Model for Segment Routing";
}
import ietf-segment-routing-mpls {
prefix sr-mpls;
reference
"RFC 9020: YANG Data Model for Segment Routing";
}
import ietf-isis {
prefix isis;
reference
"RFC 9130: YANG Data Model for IS-IS Protocol";
}
import iana-routing-types {
prefix iana-rt-types;
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
import ietf-routing-types {
prefix rt-types;
reference
"RFC 8294: Common YANG Data Types for the Routing Area";
}
organization
"IETF LSR - Link State Routing Working Group";
contact
"WG Web:
WG List:
Author: Stephane Litkowski
Author: Yingzhen Qu
Author: Acee Lindem
Author: Ing-Wher Chen
Author: Jeff Tantsura
";
description
"This YANG module defines the generic configuration and
operational state for SR IS-IS extensions for the
MPLS data plane.
Copyright (c) 2025 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 Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9902;
see the RFC itself for full legal notices.";
revision 2025-12-09 {
description
"Initial revision.";
reference
"RFC 9902: A YANG Data Model for IS-IS Segment Routing over
the MPLS Data Plane";
}
/* Features */
feature remote-lfa-sr {
description
"Enhance RLFA to use SR path.";
reference
"RFC 8102: Remote-LFA Node Protection and Manageability";
}
feature ti-lfa {
description
"Topology Independent Loop-Free Alternate (TI-LFA)
computation using SR.";
reference
"RFC 9855: Topology Independent Fast Reroute Using Segment
Routing";
}
/* Identities */
identity sr-capability {
description
"Base identity for IS-IS SR-Capabilities sub-TLV flags.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing";
}
identity mpls-ipv4 {
base sr-capability;
description
"If set, then the router is capable of
processing SR-MPLS-encapsulated IPv4 packets
on all interfaces.";
}
identity mpls-ipv6 {
base sr-capability;
description
"If set, then the router is capable of
processing SR-MPLS-encapsulated IPv6 packets
on all interfaces.";
}
identity prefix-sid-flag {
description
"Base identity for Prefix Segment Identifier (Prefix-SID)
sub-TLV flags.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity r-flag {
base prefix-sid-flag;
description
"Re-advertisement Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity n-flag {
base prefix-sid-flag;
description
"Node-SID Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity p-flag {
base prefix-sid-flag;
description
"No-PHP (No Penultimate Hop-Popping) Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity e-flag {
base prefix-sid-flag;
description
"Explicit NULL Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity v-flag {
base prefix-sid-flag;
description
"Value Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity l-flag {
base prefix-sid-flag;
description
"Local Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
}
identity adj-sid-flag {
description
"Base identity for Adjacency Segment Identifier (Adj-SID)
sub-TLV flags.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity f-flag {
base adj-sid-flag;
description
"Address-Family Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity b-flag {
base adj-sid-flag;
description
"Backup Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity vi-flag {
base adj-sid-flag;
description
"Value/Index Flag - corresponds to V-Flag in reference.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity lg-flag {
base adj-sid-flag;
description
"Local/Global Flag - corresponds to L-Flag in reference.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity s-flag {
base adj-sid-flag;
description
"Set Flag - corresponds to S-Flag in reference.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity pe-flag {
base adj-sid-flag;
description
"Persistent Flag - corresponds to P-Flag in reference.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
}
identity sid-binding-flag {
description
"Base identity for SID Binding TLV flags.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.4";
}
identity af-flag {
base sid-binding-flag;
description
"Address-Family Flag - corresponds to F-Flag in reference.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.4";
}
identity m-flag {
base sid-binding-flag;
description
"Mirror Context Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.4";
}
identity sf-flag {
base sid-binding-flag;
description
"S-Flag. If set, the Label Binding TLV should be flooded
across the entire routing domain - corresponds to S-Flag in
reference.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.4";
}
identity d-flag {
base sid-binding-flag;
description
"Leaking Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.4";
}
identity a-flag {
base sid-binding-flag;
description
"Attached Flag.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.4";
}
/* Groupings */
grouping sid-tlv-encoding {
description
"SID TLV Encoding - 20-bit label or 32-bit SID index whose
interpretation is dependent on the TLV length (3 for an
MPLS label or 4 for a 32-bit value) or the TLV V-Flag and
L-Flag settings:
If the V-Flag is set to 0 and L-Flag is set to 0:
The SID/Index/Label field is a 4-octet index defining
the offset in the SID/Label space advertised by this
router.
If the V-Flag is set to 1 and L-Flag is set to 1:
The SID/Index/Label field is a 3-octet local label where the
20 rightmost bits are used for encoding the label value.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing,
Section 2.1.1.1";
choice sid {
case sid-label {
leaf label-value {
type uint32 {
range "0 .. 1048575";
}
description
"A 20-bit MPLS label.";
}
}
case sid-index {
leaf index-value {
type uint32;
description
"Index into a label space advertised by this router.";
}
}
description
"Choice of either a 20-bit MPLS label or 32-bit index into
an advertised label space.";
}
}
grouping sr-capability {
description
"SR-Capability grouping.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 3.1";
container sr-capability {
description
"SR-Capability flags.";
leaf-list sr-capability-flag {
type identityref {
base sr-capability;
}
description
"SR-Capability sub-TLV flags.";
}
container global-blocks {
description
"Segment Routing Global Blocks (SRGBs).";
list global-block {
description
"Segment Routing Global Block.";
leaf range-size {
type rt-types:uint24;
description
"The SID range.";
}
uses sid-tlv-encoding;
}
}
}
}
grouping sr-algorithm {
description
"SR algorithm grouping.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 3.2";
container sr-algorithms {
description
"All SR algorithms.";
leaf-list sr-algorithm {
type identityref {
base sr-cmn:prefix-sid-algorithm;
}
description
"The SR algorithms that the router is
currently using.";
}
}
}
grouping srlb {
description
"SR Local Block grouping.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 3.3";
container local-blocks {
description
"List of Segment Routing Local Blocks (SRLBs).";
list local-block {
description
"Segment Routing Local Block.";
leaf range-size {
type rt-types:uint24;
description
"The SID range.";
}
uses sid-tlv-encoding;
}
}
}
grouping srms-preference {
description
"The SR Mapping Server (SRMS) Preference TLV is used to
advertise a preference associated with the node that acts as
an SRMS.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 3.4";
container srms-preference {
description
"SRMS Preference TLV.";
leaf preference {
type uint8;
description
"SRMS Preference TLV, value from 0 to 255 with
255 being the most preferred.";
}
}
}
grouping adjacency-state {
description
"This grouping extends adjacency state.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
list adjacency-sid {
config false;
description
"List of Adj-SIDs.";
leaf value {
type uint32;
description
"Value of the Adj-SID.";
}
leaf address-family {
type iana-rt-types:address-family;
description
"Address-family associated with the
segment ID.";
}
leaf weight {
type uint8;
description
"Weight associated with
the Adj-SID.";
}
leaf protection-requested {
type boolean;
description
"Describe if the Adj-SID
must be protected.";
}
}
}
grouping prefix-sid-sub-tlv {
description
"This grouping defines the SR Prefix Segment
Identifier (Prefix-SID) sub-TLV.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.1";
container prefix-sid-sub-tlvs {
description
"Prefix-SID sub-TLVs.";
list prefix-sid-sub-tlv {
description
"List of Prefix-SID sub-TLVs.";
container prefix-sid-flags {
description
"Describes flags associated with the
segment ID.";
leaf-list flag {
type identityref {
base prefix-sid-flag;
}
description
"Prefix-SID sub-TLV flags.";
}
}
leaf algorithm {
type identityref {
base sr-cmn:prefix-sid-algorithm;
}
description
"Algorithm to be used for path computation.";
}
uses sid-tlv-encoding;
}
}
}
grouping adjacency-segment-id {
description
"This grouping defines SR extensions
for adjacencies.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing, Section 2.2";
container adj-sid-sub-tlvs {
description
"Adj-SID optional sub-TLVs.";
list adj-sid-sub-tlv {
description
"List of segments.";
container adj-sid-flags {
description
"Adj-SID sub-TLV flags.";
leaf-list flag {
type identityref {
base adj-sid-flag;
}
description
"Adj-SID sub-TLV flags list.";
}
}
leaf weight {
type uint8;
description
"The value represents the weight of the Adj-SID
for the purpose of load balancing.";
}
leaf neighbor-id {
type isis:system-id;
description
"Describes the system ID of the neighbor
associated with the SID value. This is only
used on LAN adjacencies.";
}
uses sid-tlv-encoding;
}
}
}
grouping sid-binding-tlv {
description
"SID/Label Binding TLV, type 149.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing,
Section 2.4";
leaf prefix {
type inet:ip-prefix;
description
"The prefix represents the Forwarding Equivalence
Class (FEC) at the tail end of the advertised path.";
}
leaf range {
type uint16;
description
"Provides the ability to specify a range of addresses
and their associated Prefix-SIDs.";
}
container sid-binding-flags {
description
"Binding TLV flags.";
leaf-list flag {
type identityref {
base sid-binding-flag;
}
description
"SID Binding TLV flags.";
}
}
list prefix-sid-sub-tlvs {
description
"List of Prefix-SID sub-TLVs.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing,
Section 2.4.4";
uses prefix-sid-sub-tlv;
}
list sid-sub-tlv {
description
"List of Prefix-SID sub-TLVs.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing,
Section 2.4.5";
uses sid-tlv-encoding;
}
uses isis:unknown-tlvs;
}
/* Configuration */
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis" {
when "derived-from-or-self(../rt:type, 'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol configuration
with SR for the MPLS data plane.";
uses sr-mpls:sr-control-plane;
container protocol-srgb {
if-feature "sr-mpls:protocol-srgb";
description
"Per-protocol SRGB.";
reference
"RFC 8402: Segment Routing Architecture, Section 2";
uses sr-cmn:srgb;
}
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:interfaces/isis:interface" {
when "derived-from-or-self(../../../rt:type, 'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol configuration
with SR.";
uses sr-mpls:igp-interface {
augment "segment-routing/adjacency-sid/adj-sids" {
when "../../../isis:interface-type = 'broadcast'" {
description
"This augments the broadcast interface.";
}
description
"This augments the LAN interface adj-sid with system-id.";
leaf neighbor-system-id {
type isis:system-id;
mandatory true;
description
"Neighbor system ID.";
}
}
}
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:interfaces/isis:interface"
+ "/isis:fast-reroute/isis:lfa" {
when "derived-from-or-self(../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS interface IP Fast Reroute (IP-FRR)
with TI-LFA.";
container ti-lfa {
if-feature "ti-lfa";
description
"Topology Independent Loop-Free Alternate
(TI-LFA) support.";
leaf enabled {
type boolean;
default "false";
description
"Enables TI-LFA computation.";
}
container selection-tie-breakers {
description
"Configure path selection tie-breakers and their
respective priorities for the TI-LFA computation.";
container node-protection {
presence "Presence of container enables the node
protection tie-breaker.";
description
"Enable node protection as a TI-LFA path
selection tie-breaker. A path providing node
protection will be selected over one that
doesn't provide node protection.";
leaf priority {
type uint8;
default "128";
description
"Priority for node protection tie-breaker with
a lower priority being more preferred.";
}
}
container srlg-disjoint {
presence "Presence of container enables the SRLG
disjoint tie-breaker.";
description
"Enable Shared Risk Link Group (SRLG)
disjoint as a TI-LFA path selection tie-breaker.
A path providing a node with a disjoint path for SRLG
links from the primary path will be selected over
a path that doesn't provide an SRLG disjoint path.";
leaf priority {
type uint8;
default "128";
description
"Priority for SRLG disjoint tie-breaker with
a lower priority being more preferred.";
}
}
}
}
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:interfaces/isis:interface"
+ "/isis:fast-reroute/isis:lfa/isis:level-1" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS interface level-1 IP FRR with
TI-LFA.";
container ti-lfa {
if-feature "ti-lfa";
description
"TI-LFA configuration.";
leaf enabled {
type boolean;
default "false";
description
"Enables TI-LFA computation.";
}
}
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:interfaces/isis:interface"
+ "/isis:fast-reroute/isis:lfa/isis:level-2" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS interface level-2 IP FRR with
TI-LFA.";
container ti-lfa {
if-feature "ti-lfa";
description
"TI-LFA configuration.";
leaf enabled {
type boolean;
default "false";
description
"Enables TI-LFA computation.";
}
}
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:interfaces/isis:interface"
+ "/isis:fast-reroute/isis:lfa/isis:remote-lfa" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS RLFA configuration with
use of the SR path.";
leaf use-segment-routing-path {
if-feature "remote-lfa-sr";
type boolean;
default "false";
description
"Force RLFA to use the SR path instead of
LDP path. The value of this leaf is in effect only when
remote-lfa is enabled.";
}
}
/* Operational states */
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:interfaces/isis:interface"
+ "/isis:adjacencies/isis:adjacency" {
when "derived-from-or-self(../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol configuration
with SR.";
uses adjacency-state;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:router-capabilities/isis:router-capability" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol Link State Database (LSDB)
router capability.";
uses sr-capability;
uses sr-algorithm;
uses srlb;
uses srms-preference;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:extended-is-neighbor/isis:neighbor/isis:instances"
+ "/isis:instance" {
when "derived-from-or-self(../../../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB neighbor.";
uses adjacency-segment-id;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:mt-is-neighbor/isis:neighbor/isis:instances"
+ "/isis:instance" {
when "derived-from-or-self(../../../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB neighbor.";
uses adjacency-segment-id;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:extended-ipv4-reachability/isis:prefixes" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB prefix.";
uses prefix-sid-sub-tlv;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:mt-extended-ipv4-reachability/isis:prefixes" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB prefix.";
uses prefix-sid-sub-tlv;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:ipv6-reachability/isis:prefixes" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB prefix.";
uses prefix-sid-sub-tlv;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp"
+ "/isis:mt-ipv6-reachability/isis:prefixes" {
when "derived-from-or-self(../../../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB prefix.";
uses prefix-sid-sub-tlv;
}
augment "/rt:routing/"
+ "rt:control-plane-protocols/rt:control-plane-protocol"
+ "/isis:isis/isis:database/isis:levels/isis:lsp" {
when "derived-from-or-self(../../../../rt:type,"
+ "'isis:isis')" {
description
"This augments the IS-IS routing protocol when used.";
}
description
"This augments the IS-IS protocol LSDB.";
container sid-binding-tlvs {
description
"List of SID/Label Binding TLVs.";
list sid-binding-tlv {
key "prefix";
description
"SID/Label Binding TLV, type 149.";
uses sid-binding-tlv;
}
}
container mt-sid-binding-tlvs {
description
"List of Multi-Topology SID/Label Binding TLVs.";
list mt-sid-binding-tlv {
key "prefix mt-id";
description
"Multi-Topology SID/Label Binding TLV, type 150.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing,
Section 2.5";
uses sid-binding-tlv;
leaf mt-id {
type uint16;
description
"A 12-bit field containing the non-zero ID
of the topology.";
}
}
}
}
}