Skip to content
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-errors.yang
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ submodule openconfig-bgp-errors {
"This module defines BGP NOTIFICATION message error codes
and subcodes";

oc-ext:openconfig-version "6.1.0";
oc-ext:openconfig-version "6.2.0";

revision "2026-03-31" {
description
"Add bgp-aigp-metric typedef.";
reference "6.2.0";
}

revision "2024-09-06" {
description
Expand Down
41 changes: 40 additions & 1 deletion release/models/bgp/openconfig-bgp-policy.yang
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ module openconfig-bgp-policy {
It augments the base routing-policy module with BGP-specific
options for conditions and actions.";

oc-ext:openconfig-version "8.2.0";
oc-ext:openconfig-version "8.3.0";

revision "2026-03-17" {
description
"Add set-aigp to BGP policy actions.";
reference "8.3.0";
}

revision "2025-05-23" {
description
Expand Down Expand Up @@ -265,6 +271,17 @@ module openconfig-bgp-policy {
bgp-set-med-type.";
}

typedef bgp-set-aigp-action {
type enumeration {
enum SET {
description "Action to set the AIGP to a specific value.";
}
}
description
"Specifies which action to take on the value specified by the
set-aigp leaf.";
}

// grouping statements

grouping match-as-path-config {
Expand Down Expand Up @@ -1405,6 +1422,20 @@ module openconfig-bgp-policy {
valid options. When set to 'IGP', this action must be set to
'SET'.";
}

leaf set-aigp {
type oc-bgp-types:bgp-aigp-metric;
description
"Set the AIGP metric attribute in the route update (RFC 7311,
Section 3.4)";
}

leaf set-aigp-action {
type bgp-set-aigp-action;
description
"This leaf is mandatory when `set-aigp` is specified. When
`set-aigp` is specified, the action must be set to 'SET'.";
}
}

grouping bgp-actions-state {
Expand Down Expand Up @@ -1433,6 +1464,10 @@ module openconfig-bgp-policy {
"otherwise any action must be specified if set-med is an " +
"integer value.";
}

must "(not(set-aigp) or set-aigp-action)" {
error-message "set-aigp-action must be specified when set-aigp is set";
}
}

container state {
Expand All @@ -1452,6 +1487,10 @@ module openconfig-bgp-policy {
"otherwise any action must be specified if set-med is an " +
"integer value.";
}

must "(not(set-aigp) or set-aigp-action)" {
error-message "set-aigp-action must be specified when set-aigp is set";
}
}
uses as-path-prepend-top;
uses set-community-action-top;
Expand Down
17 changes: 16 additions & 1 deletion release/models/bgp/openconfig-bgp-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ module openconfig-bgp-types {
policy. It can be imported by modules that make use of BGP
attributes";

oc-ext:openconfig-version "6.1.0";
oc-ext:openconfig-version "6.2.0";

revision "2026-03-24" {
description
"Add bgp-aigp-metric typedef.";
reference "6.2.0";
}

revision "2024-09-06" {
description
Expand Down Expand Up @@ -841,4 +847,13 @@ module openconfig-bgp-types {
description
"Defines the types of BGP AS path segments.";
}

typedef bgp-aigp-metric {
type uint64;
description
"Higher-precision metric, also known as Accumulated IGP
Metric [RFC7311].";
reference
"RFC 7311 - The Accumulated IGP Metric Attribute for BGP";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ submodule openconfig-network-instance-l2 {
parameters.";


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

revision "2026-03-31" {
description
"Add enable-aigp to BGP address families in neighbors and peer-groups.";
reference "4.7.0";
}

revision "2025-03-26" {
description
Expand Down
101 changes: 100 additions & 1 deletion release/models/network-instance/openconfig-network-instance.yang
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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 "2026-03-17" {
description
"Add enable-aigp to BGP address families in neighbors and peer-groups.";
reference "4.7.0";
}

revision "2025-03-26" {
description
Expand Down Expand Up @@ -1453,5 +1459,98 @@ module openconfig-network-instance {
in the network instance";
}
}

grouping ni-bgp-afi-aigp-config {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of adding a new group in the network-instance.yang and augmenting, this leaf can probably be added to this grouping for a more simple addition.

grouping bgp-common-mp-afi-safi-config {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this first, but it caused some additional diffs. It enabled the same leaf in the global afi-safis as well, which is outside the scope of this augment. It seems to me that AIGP enablement at the global afi-safi level already exists here: https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-network-instance.html#network-instances-network-instance-protocols-protocol-bgp-global-afi-safis-afi-safi-route-selection-options-config-enable-aigp

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have re-analyzed grouping usage:

If we use bgp-common-mp-afi-safi-config, enable-aigp becomes available in all address families, which causes unintended scope creep beyond just the use case (the use case requires only ipv4 and ipv6 unicast).

We could instead use bgp-common-mp-ipv4-ipv6-unicast-common-config, however that configuration also causes unintended scope creep because it applies the config to all ipv4 and ipv6 unicast address families including those under the global configuration (the use case requires the configuration only at the group and neighbor level)

Although it is less clean, I think going with the original implementation here best preserves the intended scope of the change.

description
"Grouping for enable-aigp leaf";
leaf enable-aigp {
type boolean;
description
"Flag to enable sending / receiving accumulated IGP
attribute in routing updates for the address family as
stipulated by RFC 7311 Section 3.3";
}
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:neighbors/oc-netinst:neighbor/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv4-unicast/oc-netinst:config" {
description
"Add enable-aigp to BGP neighbor IPv4 unicast config";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:neighbors/oc-netinst:neighbor/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv4-unicast/oc-netinst:state" {
description
"Add enable-aigp to BGP neighbor IPv4 unicast state";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:neighbors/oc-netinst:neighbor/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv6-unicast/oc-netinst:config" {
description
"Add enable-aigp to BGP neighbor IPv6 unicast config";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:neighbors/oc-netinst:neighbor/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv6-unicast/oc-netinst:state" {
description
"Add enable-aigp to BGP neighbor IPv6 unicast state";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:peer-groups/oc-netinst:peer-group/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv4-unicast/oc-netinst:config" {
description
"Add enable-aigp to BGP peer-group IPv4 unicast config";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:peer-groups/oc-netinst:peer-group/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv4-unicast/oc-netinst:state" {
description
"Add enable-aigp to BGP peer-group IPv4 unicast state";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:peer-groups/oc-netinst:peer-group/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv6-unicast/oc-netinst:config" {
description
"Add enable-aigp to BGP peer-group IPv6 unicast config";
uses ni-bgp-afi-aigp-config;
}

augment "/oc-netinst:network-instances/oc-netinst:network-instance/" +
"oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" +
"oc-netinst:peer-groups/oc-netinst:peer-group/" +
"oc-netinst:afi-safis/oc-netinst:afi-safi/" +
"oc-netinst:ipv6-unicast/oc-netinst:state" {
description
"Add enable-aigp to BGP peer-group IPv6 unicast state";
uses ni-bgp-afi-aigp-config;
}

uses network-instance-top;
}
12 changes: 8 additions & 4 deletions release/models/rib/openconfig-rib-bgp-attributes.yang
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ submodule openconfig-rib-bgp-attributes {
attributes for use in BGP RIB tables.";


oc-ext:openconfig-version "0.9.0";
oc-ext:openconfig-version "0.10.0";

revision "2026-03-24" {
description
"Update aigp to use common AIGP metric typedef.";
reference "0.10.0";
}

revision "2022-12-20" {
description
Expand Down Expand Up @@ -350,12 +356,10 @@ submodule openconfig-rib-bgp-attributes {
}

leaf aigp {
type uint64;
type oc-bgpt:bgp-aigp-metric;
description
"BGP path attribute representing the accumulated IGP metric
for the path";
reference
"RFC 7311 - The Accumulated IGP Metric Attribute for BGP";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ submodule openconfig-rib-bgp-shared-attributes {
"This submodule contains structural data definitions for
attribute sets shared across routes.";

oc-ext:openconfig-version "0.9.0";
oc-ext:openconfig-version "0.10.0";

revision "2026-03-24" {
description
"Add BGP AIGP support.";
reference "0.10.0";
}

revision "2022-12-20" {
description
Expand Down
8 changes: 4 additions & 4 deletions release/models/rib/openconfig-rib-bgp-table-attributes.yang
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ submodule openconfig-rib-bgp-table-attributes {
"This submodule contains common data definitions for data
related to a RIB entry, or RIB table.";

oc-ext:openconfig-version "0.9.0";
oc-ext:openconfig-version "0.10.0";

revision "2022-12-20" {
revision "2026-03-24" {
description
"Convert as-segment and as4-segment to keyed lists.";
reference "0.9.0";
"Add BGP AIGP support.";
reference "0.10.0";
}
Comment on lines 25 to 30
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should leave in the old revision statement. The PR should add a revision statement and not remove any previous revision statements.


revision "2022-06-06" {
Expand Down
8 changes: 7 additions & 1 deletion release/models/rib/openconfig-rib-bgp-tables.yang
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ submodule openconfig-rib-bgp-tables {
"This submodule contains structural data definitions for
BGP routing tables.";

oc-ext:openconfig-version "0.9.0";
oc-ext:openconfig-version "0.10.0";

revision "2026-03-24" {
description
"Add BGP AIGP support.";
reference "0.10.0";
}

revision "2022-12-20" {
description
Expand Down
8 changes: 7 additions & 1 deletion release/models/rib/openconfig-rib-bgp.yang
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ module openconfig-rib-bgp {
eligible for sending (advertising) to the neighbor after output
policy rules have been applied.";

oc-ext:openconfig-version "0.9.0";
oc-ext:openconfig-version "0.10.0";

revision "2026-03-24" {
description
"Add BGP AIGP support.";
reference "0.10.0";
}

revision "2022-12-20" {
description
Expand Down
Loading