Skip to content

Add tag and track-id to static route next-hop attributes - #1536

Open
Verma-Anukul wants to merge 1 commit into
openconfig:masterfrom
Verma-Anukul:sroute-extension
Open

Add tag and track-id to static route next-hop attributes#1536
Verma-Anukul wants to merge 1 commit into
openconfig:masterfrom
Verma-Anukul:sroute-extension

Conversation

@Verma-Anukul

Copy link
Copy Markdown
Contributor

Add per-nexthop tag and track-id leaves to the
local-common-route-attributes grouping used by static route next-hop config and state.

Change Scope

This change adds two optional leaves to the local-common-route-attributes grouping in openconfig-local-routing.yang:

  • tag (uint32, range 1..4294967295) — per-nexthop administrative tag for route-map matching, redistribution filtering, and BGP export control. It does not affect route preference or nexthop selection.
  • track-id (string) — identifier of a reachability track object (e.g., IP SLA, NQA, RPM, active probe). The nexthop is eligible for installation only while the referenced track object reports an up state.

These leaves appear on static route next-hop config and state via existing uses local-static-nexthop-configuses local-common-route-attributes. They also appear on local aggregate config/state, which reuses the same grouping.

Backwards compatibility: Yes. Both leaves are optional additions with no changes to existing leaves or keys.

Platform Implementations

Route tag

Track Id

Tree View

Relevant portion of openconfig-network-instance tree under protocols/protocol/static-routes/static/next-hops/next-hop:

 module: openconfig-network-instance
   +--rw network-instances
      +--rw network-instance* [name]
         +--rw protocols
            +--rw protocol* [identifier name]
               +--rw static-routes
                  +--rw static* [prefix]
                     +--rw next-hops
                        +--rw next-hop* [index]
                           +--rw config
                           |  +--rw index?          string
                           |  +--rw next-hop?       union
                           |  +--rw recurse?        boolean
                           |  +--rw metric?         uint32
                           |  +--rw preference?     uint32
                           |  +--rw wecmp-weight?   union
+                          |  +--rw tag?            uint32
+                          |  +--rw track-id?       string
                           +--ro state
                           |  +--ro index?          string
                           |  +--ro next-hop?       union
                           |  +--ro recurse?        boolean
                           |  +--ro metric?         uint32
                           |  +--ro preference?     uint32
                           |  +--ro wecmp-weight?   union
+                          |  +--ro tag?            uint32
+                          |  +--ro track-id?       string
                           +--rw enable-bfd
                           +--rw interface-ref

Note: The same tag and track-id leaves also appear under local-aggregates/aggregate/{config,state} because that container reuses local-common-route-attributes.

@google-cla

google-cla Bot commented Aug 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the openconfig-local-routing.yang model to version 4.2.0, introducing tag and track-id leaves to the local-common-route-attributes grouping. Feedback highlights a design issue where these next-hop-specific attributes are incorrectly exposed under aggregate routes. It is recommended to move these leaves to a next-hop-specific grouping and to use oc-pt:tag-type for the tag leaf instead of a raw uint32 for consistency across OpenConfig models.

Comment thread release/models/local-routing/openconfig-local-routing.yang Outdated
@Verma-Anukul
Verma-Anukul force-pushed the sroute-extension branch 2 times, most recently from 408f92d to bf012c2 Compare August 24, 2026 13:04
Add tag (oc-pt:tag-type) and track-id leaves to
local-static-nexthop-config for static route next-hop config and
state. Leaves are scoped to next-hops only and are not exposed on
local aggregate routes.

Signed-off-by: Verma-Anukul <anukulverma2013@gmail.com>
@Verma-Anukul

Copy link
Copy Markdown
Contributor Author

@dplore
Please help in reviewing this PR

@akalluru1 akalluru1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the PR description says track-id leaf is present under local-aggregates/aggregate path but I don't seem to find it in the public repo. Is there some outstanding PR introducing this leaf in the above YANG path?

"Identifier of a reachability track object associated with this
nexthop. The static route nexthop is eligible for installation
only while the referenced track object reports an 'up' state.
The track object is defined separately (e.g., IP SLA, NQA,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a separate OC model for track object definition? If so, Let's please use leafref.

@nandanarista

Copy link
Copy Markdown

please remove this reference for track id, it's not a refernce to EOS

Arista EOS (Ansible): eos_static_routes — track parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants