-
Notifications
You must be signed in to change notification settings - Fork 694
Add BGP group/neighbor level and policy support for AIGP #1451
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
base: master
Are you sure you want to change the base?
Changes from all commits
c7991b4
94f6d47
0de01ee
dbab799
1e2b5ca
bb42bae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -1405,6 +1411,13 @@ 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)"; | ||
| } | ||
|
Comment on lines
+1415
to
+1420
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should consider modeling the action to allow doing arithmetic operations on the aigp metric even if the immediate use case doesn't need it, otherwise it may become hard to add that later. this will be similar to how setting the MED is done using Concretely, we should add |
||
| } | ||
|
|
||
| grouping bgp-actions-state { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -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 | ||||
|
|
@@ -1453,5 +1459,98 @@ module openconfig-network-instance { | |||
| in the network instance"; | ||||
| } | ||||
| } | ||||
|
|
||||
| grouping ni-bgp-afi-aigp-config { | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||||
jenna-mccampbell marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| 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; | ||||
| } | ||||
Uh oh!
There was an error while loading. Please reload this page.