module ietf-rib-extension {
yang-version "1.1";
namespace "urn:ietf:params:xml:ns:yang:ietf-rib-extension";
prefix rib-ext;
import ietf-inet-types {
prefix "inet";
}
import ietf-interfaces {
prefix "if";
}
import ietf-routing {
prefix "rt";
}
import ietf-ipv4-unicast-routing {
prefix "v4ur";
}
import ietf-ipv6-unicast-routing {
prefix "v6ur";
}
organization
"IETF RTGWG - Routing Working Group";
contact
"WG Web:
WG List:
Author: Acee Lindem
Author: Yingzhen Qu
";
description
"This YANG module extends the generic data model for
RIB by augmenting the ietf-netmod-routing-cfg
model. It is intended that the module will be extended
by vendors to define vendor-specific RIB parameters.
This YANG model conforms to the Network Management
Datastore Architecture (NDMA) as described in RFC 8342.
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.";
revision 2019-03-01 {
description
"Initial RFC Version";
reference
"RFC XXXX: A YANG Data Model for RIB Extensions.";
}
/* Groupings */
grouping rib-statistics {
description "Statistics grouping used for RIB augmentation";
container rib-summary-statistics {
config false;
description "Container for RIB statistics";
leaf total-routes {
type uint32;
description
"Total routes in the RIB from all protocols";
}
leaf total-active-routes {
type uint32;
description
"Total active routes in the RIB";
}
leaf total-route-memory {
type uint64;
description
"Total memory for all routes in the RIB from all
protocol clients";
}
list protocol-rib-statistics {
description "List protocol statistics";
leaf rib-protocol {
type identityref {
base rt:routing-protocol;
}
description "Routing protocol for statistics";
}
leaf protocol-total-routes {
type uint32;
description
"Total number routes for protocol in the RIB";
}
leaf protocol-active-routes {
type uint32;
description
"Number active routes for protocol in the RIB";
}
leaf protocol-route-memory {
type uint64;
description
"Total memory for all routes in the RIB for protocol";
}
}
}
}
grouping next-hop {
description
"Next-hop grouping";
leaf interface {
type if:interface-ref;
description
"Outgoing interface";
}
leaf address {
type inet:ip-address;
description
"IPv4 or IPv6 Address of the next-hop";
}
}
grouping attributes {
description
"Common attributes applicable to all paths";
leaf metric {
type uint32;
description "Route metric";
}
leaf tag {
type uint32;
description "Route tag";
}
leaf application-tag {
type uint32;
description "Additional Application-Specific Route tag";
}
}
grouping path-attribute {
description
"Path attribute grouping";
leaf repair-path {
type leafref {
path "/rt:routing/rt:ribs/rt:rib/"
+ "rt:routes/repair-route/id";
}
description
"IP Fast ReRoute (IPFRR) repair path, use a path
from repair-route list";
}
}
augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/"
+ "v4ur:route/v4ur:next-hop/v4ur:next-hop-options/"
+ "v4ur:simple-next-hop"
{
description
"Augment 'simple-next-hop' case in IPv4 unicast route.";
leaf preference {
type uint32;
default "1";
description "Route preference - Used to select among multiple
static routes with a lower preference next-hop
preferred and equal preference paths yielding
Equal Cost Multi-Path (ECMP).";
}
leaf tag {
type uint32;
default "0";
description "Route tag";
}
leaf application-tag {
type uint32;
description "Additional Application-Specific Route tag";
}
}
augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/"
+ "v4ur:route/v4ur:next-hop/v4ur:next-hop-options/"
+ "v4ur:next-hop-list/v4ur:next-hop-list/v4ur:next-hop"
{
description
"Augment static route configuration 'next-hop-list'.";
leaf preference {
type uint32;
default "1";
description "Route preference - Used to select among multiple
static routes with a lower preference next-hop
preferred and equal preference paths yielding
Equal Cost Multi-Path (ECMP).";
}
leaf tag {
type uint32;
default "0";
description "Route tag";
}
leaf application-tag {
type uint32;
description "Additional Application-Specific Route tag";
}
}
augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/"
+ "v6ur:route/v6ur:next-hop/v6ur:next-hop-options/"
+ "v6ur:simple-next-hop"
{
description
"Augment 'simple-next-hop' case in IPv6 unicast route.";
leaf preference {
type uint32;
default "1";
description "Route preference - Used to select among multiple
static routes with a lower preference next-hop
preferred and equal preference paths yielding
Equal Cost Multi-Path (ECMP).";
}
leaf tag {
type uint32;
default "0";
description "Route tag";
}
leaf application-tag {
type uint32;
description "Additional Application-Specific Route tag";
}
}
augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/"
+ "v6ur:route/v6ur:next-hop/v6ur:next-hop-options/"
+ "v6ur:next-hop-list/v6ur:next-hop-list/v6ur:next-hop"
{
description
"Augment static route configuration 'next-hop-list'.";
leaf preference {
type uint32;
default "1";
description "Route preference - Used to select among multiple
static routes with a lower preference next-hop
preferred and equal preference paths yielding
Equal Cost Multi-Path (ECMP).";
}
leaf tag {
type uint32;
default "0";
description "Route tag";
}
leaf application-tag {
type uint32;
description "Additional Application-Specific Route tag";
}
}
augment "/rt:routing/rt:ribs/rt:rib"
{
description "Augment a RIB with statistics";
uses rib-statistics;
}
augment "/rt:routing/rt:ribs/rt:rib/"
+ "rt:routes/rt:route"
{
description
"Augment a route in RIB with tag.";
uses attributes;
}
augment "/rt:routing/rt:ribs/rt:rib/"
+ "rt:routes"
{
description
"Augment a route with a list of repair-paths.";
list repair-route {
key "id";
description
"A repair-path entry, which can be referenced
by a repair-path.";
leaf id {
type string;
description
"A unique identifier.";
}
container next-hop {
description
"Route's next-hop attribute.";
leaf outgoing-interface {
type if:interface-state-ref;
description
"Name of the outgoing interface.";
}
leaf next-hop-address {
type inet:ip-address;
description
"IP address of the next hop.";
}
}
leaf metric {
type uint32;
description "Route metric";
}
}
}
augment "/rt:routing/rt:ribs/rt:rib/"
+ "rt:routes/rt:route/rt:next-hop/rt:next-hop-options/"
+ "rt:simple-next-hop"
{
description
"Add more parameters to a path.";
uses path-attribute;
}
augment "/rt:routing/rt:ribs/rt:rib/"
+ "rt:routes/rt:route/rt:next-hop/rt:next-hop-options/"
+ "rt:special-next-hop"
{
description
"Add more parameters to a path.";
uses path-attribute;
}
augment "/rt:routing/rt:ribs/rt:rib/"
+ "rt:routes/rt:route/rt:next-hop/rt:next-hop-options/"
+ "rt:next-hop-list/rt:next-hop-list/rt:next-hop"
{
description
"This case augments the 'next-hop-options' in the routing
model.";
uses path-attribute;
}
}