Skip to content

Added OpenConfig Support for Static Multicast RPF Routes #1305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 180 additions & 0 deletions release/models/multicast/openconfig-mrib.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
module openconfig-mrib {
yang-version "1";

// namespace
namespace "http://openconfig.net/yang/mrib";

prefix "oc-mrib";

// import some basic types/interfaces
import openconfig-extensions { prefix "oc-ext"; }
import openconfig-interfaces { prefix "oc-if"; }
import openconfig-inet-types { prefix "openconfig-inet-types"; }
import openconfig-interfaces { prefix "openconfig-interfaces"; }

// meta
organization
"OpenConfig working group";

contact
"OpenConfig working group
www.openconfig.net";

description
"Support for Static MRIB Routes.";

oc-ext:openconfig-version "0.1.0";

revision "2025-05-12" {
description
"Initial revision";
reference "0.1.0";
}

grouping mrib-next-hop-config {
description
"Configuration parameters relating to the next-hop entry.";

leaf index {
type string;
description
"An user-specified identifier utilised to uniquely reference the next-hop
entry in the next-hop list. The value of this index has no semantic meaning
other than for referencing the entry. It is observed that implementations
typically only support a numeric value for this string.";
}

leaf next-hop-addr {
type openconfig-inet-types:ip-address;
description
"The next-hop that is to be used for the static MRIB route - this one is
specified as an IP address.";
}

leaf preference {
type uint8;
description
"Administrative Distance (preference) of the entry. The preference defines
the order of selection when multiple sources (protocols, static, etc.)
contribute to the same prefix entry. The lower the preference, the more
preferable the prefix is. When this value is not specified, the preference
is inherited from the default preference of the implementation for
static MRIB routes.";
}
}

grouping static-mrib-config {
description
"Configuration data for static MRIB routes.";

leaf prefix {
type openconfig-inet-types:ip-prefix;
description
"Reference to the source prefix.";
}
}

grouping mrib-nexthops-container {
description
"Grouping for the next-hops container.";

container next-hops {
description
"Configuration and state parameters relating to the
next-hops that are to be utilised for the MRIB route being specified.";

list next-hop {
key "index";
description
"A list of next-hops to be utilised for the static MRIB
route being specified.";

leaf index {
type leafref {
path "../config/index";
}
description
"A reference to the index of the current next-hop.
The index is intended to be a user-specified value
which can be used to reference the next-hop in
question, without any other semantics being
assigned to it.";
}

container config {
description
"Configuration parameters relating to the
next-hop entry.";

uses mrib-next-hop-config;
}

container state {
config false;
description
"Operational state parameters relating to the next-hop entry.";

uses mrib-next-hop-config;
}

uses oc-if:interface-ref;
}
}
}

grouping mrib-routes-list {
description
"Grouping for the list of Static MRIB Routes.";

container routes {
description
"Enclosing container for the list of Static MRIB Routes.";

list route {
key "prefix";
description
"List of MRIB routes.";

leaf prefix {
type leafref {
path "../config/prefix";
}
description
"Reference to the source prefix.";
}

container config {
description
"Configuration data for static MRIB routes.";

uses static-mrib-config;
}

container state {
config false;
description
"Operational state data for static MRIB routes.";

uses static-mrib-config;
}

uses mrib-nexthops-container;
}
}
}

grouping mrib-top {
description
"Top-level grouping for Static MRIB Routes.";

container static-mrib {
description
"Top-level container to globally configure all Static MRIB routes.";
reference
"section 2.1 of RFC 4601";

uses mrib-routes-list;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module openconfig-network-instance {
import openconfig-isis { prefix "oc-isis"; }
import openconfig-aft { prefix "oc-aft"; }
import openconfig-pim { prefix "oc-pim"; }
import openconfig-mrib { prefix "oc-mrib"; }
import openconfig-igmp { prefix "oc-igmp"; }
import openconfig-evpn { prefix "oc-evpn"; }
import openconfig-pcep { prefix "oc-pcep"; }
Expand All @@ -50,7 +51,13 @@ module openconfig-network-instance {
virtual switch instance (VSI). Mixed Layer 2 and Layer 3
instances are also supported.";

oc-ext:openconfig-version "4.6.0";
oc-ext:openconfig-version "4.7.0";

revision "2025-05-12" {
description
"Add Static MRIB Routes to network instance";
reference "4.7.0";
}

revision "2025-03-26" {
description
Expand Down Expand Up @@ -995,6 +1002,16 @@ module openconfig-network-instance {
Indepdendent Multicast (PIM).";
}

uses oc-mrib:mrib-top {
when "./config/identifier = 'oc-pol-types:MRIB'" {
description
"Include MRIB configuration when the protocol is of type
MRIB";
}
description
"Configuration and state parameters relating to MRIB";
}

uses oc-igmp:igmp-top {
when "./config/identifier = 'oc-pol-types:IGMP'" {
description
Expand Down
16 changes: 15 additions & 1 deletion release/models/policy/openconfig-policy-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ module openconfig-policy-types {
policy. It can be imported by modules that contain protocol-
specific policy conditions and actions.";

oc-ext:openconfig-version "3.3.0";
oc-ext:openconfig-version "3.4.0";

revision "2025-05-12" {
description
"Add MRIB to INSTALL_PROTOCOL_TYPE";
reference "3.4.0";
}

revision "2024-05-14" {
description
Expand Down Expand Up @@ -250,6 +256,14 @@ revision "2022-11-08" {
"RFC 7761";
}

identity MRIB {
base INSTALL_PROTOCOL_TYPE;
description
"Static MRIB Routes";
reference
"RFC 4601: Section 2.1";
}

identity IGMP {
base INSTALL_PROTOCOL_TYPE;
description
Expand Down