Add Conditional Routes - #1533
Open
rolandphung wants to merge 1 commit into
Open
Conversation
Contributor
Author
ExampleAs an example, here's the rough configuration tree that would be for RT-10.1 https://github.com/openconfig/featureprofiles/tree/HEAD/feature/networkinstance/local\_aggregates/tests/policy\_advertise\_aggregate\_test |
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces conditional routing capabilities to OpenConfig by adding conditional prefix sets and routes across local routing, network instance, and routing policy models. The feedback focuses on improving the quality and accuracy of the YANG models, including correcting a mismatch in a revision description, updating description strings to reference correct leaf names, removing redundant empty config/state containers, and fixing several grammatical errors and typos.
Adding conditional-prefix-sets and conditional-routes to inject routes into the RIB. The conditions are matched against the routes in the RIB.
rolandphung
force-pushed
the
conditional-routes
branch
from
August 15, 2026 02:19
25bab1f to
ffc8af4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Scope
This proposal introduces OpenConfig support for conditional routes and conditional prefix-sets, enabling more granular, policy-driven route management. In some ways, this is a more descriptive configuration model for
local-aggregates.This implementation decouples the condition definition from its application for better reusability:
conditional-prefix-sets(located under/routing-policy/defined-sets/) serve as the definition layer. It is a combination of a definedprefix-setandpolicy-definition. The attachedpolicy-definitionis matched against the whole RIB or protocol table specified bymatch-source-protocolunder a specificmatch-policy-network-instance.conditional-routes(located under/network-instances/.../protocols/) serve as an application layer. These conditional prefix sets are applied to thenetwork-instancewith the configuredaction. Currently this proposal only supportsINSTALL_DROP_NEXTHOPwhich would install these prefixes as local routes with a drop next-hop to discard all traffic.conditional-prefix-set-refsis following the precedence ofcommunity-set-refsandext-community-set-refs.table-connections(located under/network-instances/network-instances/) can be used to redistribute and advertise these routes.These changes are backwards compatible.
Platform Implementations
Tree View
/routing-policy/defined-sets/conditional-prefix-sets//network-instances/network-instance/protocols/protocol/conditional-routes