module ietf-segment-routing {
namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing";
prefix sr;
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-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 common across all of the vendor
implementations.
Copyright (c) 2018 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 2018-06-25 {
description
"";
reference "RFC XXXX: YANG Data Model for Segment Routing.";
}
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 rt-types:router-id;
}
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.";
}
}
leaf receive {
type boolean;
default "true";
description
"Authorize the reception and usage
of binding TLV.";
}
}
}
}
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.";
}
}
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 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.";
}
}
}
}
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.";
}
}
}
}
augment "/rt:routing" {
description
"This augments routing data model (RFC 8349)
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 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;
}
}
container ipv6 {
description
"IPv6 mapping entries.";
list mapping-entry {
key "prefix algorithm";
description
"Mapping entries.";
uses sr-cmn:ipv6-sid-cfg;
}
}
}
}
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;
}
}
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;
}
}
}
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;
}
}
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;
}
}
}
}
container global-srgb {
description
"Global SRGB configuration.";
uses sr-cmn:srgb-cfg;
}
container srlb {
description
"SR Local Block configuration.";
uses sr-cmn:srlb-cfg;
}
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" {
description
"Global sid.";
}
enum "local" {
description
"Local sid.";
}
}
description
"Scope of this label block.";
}
}
container sid-list {
config false;
description
"List of prefix and SID associations.";
list sid {
key "target sid source source-protocol binding-type";
ordered-by system;
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" {
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
"The sid is local or global.";
}
}
}
}
}
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.";
}
}
}
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-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.";
}
}
}