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 8242.
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 2020-06-25 {
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
"The metric is a numeric value that indicating the
cost of the route from the perspective of the routing
protocol installing the route. In general, routes with
a lower metric installed by the same routing protocol
are lower cost to reach and are preferable to routes
with a higher metric. However, metrics from different
routing protocols are not directly comparable.";
}
leaf tag {
type uint32;
description
"The tag is a 32-bit opaque value associate with the
route that can be used for policy decisions such as
advertisement and filtering of the route.";
}
leaf application-tag {
type uint32;
description
"The application-specific tag is an additional tag that
can be used applications that require semantics and/or
policy different from that of the tag. For example,
the tag is usually automatically advertised in OSPF
AS-External Link State Advertisements (LSAs) while this
application-specific tag is not advertised implicitly.";
}
}
grouping repair-path {
container repair-path {
description
"IP Fast Reroute next-hop repair path";
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
"The metric for the repair path. While the IP Fast
Reroute re-route repair is local and the metric is
not advertised externally, the metric for repair path
is useful for troubleshooting purposes.";
}
reference
"RFC 5714: IP Fast Reroute Framework.";
}
}
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
"The preference is used to select among multiple static
routes, Routes with a lower preference next-hop are
preferred and equal preference routes result in
Equal-Cost-Mult-Path (ECMP) static routes.";
}
leaf tag {
type uint32;
default "0";
description
"The tag is a 32-bit opaque value associate with the
route that can be used for policy decisions such as
advertisement and filtering of the route.";
}
}
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
"The preference is used to select among multiple static
routes, Routes with a lower preference next-hop are
preferred and equal preference routes result in
Equal-Cost-Mult-Path (ECMP) static routes.";
}
leaf tag {
type uint32;
default "0";
description
"The tag is a 32-bit opaque value associate with the
route that can be used for policy decisions such as
advertisement and filtering of the route.";
}
}
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
"The preference is used to select among multiple static
routes, Routes with a lower preference next-hop are
preferred and equal preference routes result in
Equal-Cost-Mult-Path (ECMP) static routes.";
}
leaf tag {
type uint32;
default "0";
description
"The tag is a 32-bit opaque value associate with the
route that can be used for policy decisions such as
advertisement and filtering of the route.";
}
}
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
"The preference is used to select among multiple static
routes, Routes with a lower preference next-hop are
preferred and equal preference routes result in
Equal-Cost-Mult-Path (ECMP) static routes.";
}
leaf tag {
type uint32;
default "0";
description
"The tag is a 32-bit opaque value associate with the
route that can be used for policy decisions such as
advertisement and filtering of the route.";
}
}
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/rt:route/rt:next-hop/rt:next-hop-options/"
+ "rt:simple-next-hop"
{
description
"Add more parameters to a path.";
uses repair-path;
}
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 repair-path;
}
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 repair-path;
}
}