Skip to content

Add ingress low-TTL discard counter to interface and subinterface counters - #1527

Open
ostromart wants to merge 4 commits into
openconfig:masterfrom
ostromart:feature/subif-in-low-ttl-discards
Open

Add ingress low-TTL discard counter to interface and subinterface counters#1527
ostromart wants to merge 4 commits into
openconfig:masterfrom
ostromart:feature/subif-in-low-ttl-discards

Conversation

@ostromart

@ostromart ostromart commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Add ingress low-TTL discard counter to interface and subinterface counters

This change introduces a new operational state counter in-low-ttl-discards under common interface counters (/interfaces/interface/state/counters/in-low-ttl-discards and /interfaces/interface/subinterfaces/subinterface/state/counters/in-low-ttl-discards) to track ingress packets dropped due to Time-To-Live (TTL) or Hop Limit expiration during transit forwarding.
The version has been bumped to 3.9.0 in openconfig-interfaces.yang.

Change-Id: I2eb15fbed7f42d17dbca3e6a789befd41993f6f9

Change Scope

  • Description: This PR introduces in-low-ttl-discards to openconfig-interfaces.yang (under interface-common-counters-state) to count ingress packets discarded on a routed interface or subinterface due to TTL or Hop Limit expiration.
  • Backwards Compatibility: This change is fully backward compatible as it only adds a new read-only operational state leaf counter to the existing interface-common-counters-state grouping.

Use case

This counter is designed for production network debugging and automated failure pinpointing. Silent packet discards in routed fabrics are difficult to diagnose using generic discard counters alone. Providing an explicit counter for TTL expiration drops (in-low-ttl-discards) allows network operators and SRE tools to quickly identify routing loops and TTL-expired discards at both interface and subinterface granularity.

Platform Implementations

  • SAI Specification: SAI specification defines an explicit debug drop reason for TTL expiration: SAI_IN_DROP_REASON_TTL (SAI Debug Counters Proposal).
  • Google Switch Telemetry: Google network switches export granular ingress TTL drop telemetry via UMF and SAI debug counters.
  • Cisco IOS-XE: Exposes bad hop count traffic statistics (show ip traffic).
  • Nvidia / Mellanox (WJH): Tracks router drops due to TTL expiration (Router Drops -> TTL value is too small).
  • SONiC / Broadcom Telemetry: Pipeline counters support per-port ingress drop counting for TTL expiration events.

Tree View

 module: openconfig-interfaces
   +--rw interfaces
      +--rw interface* [name]
         ...
         +--ro state
         |  +--ro counters
         |     +--ro out-discards?            oc-yang:counter64
         |     +--ro out-errors?              oc-yang:counter64
         |     +--ro last-clear?              oc-types:timeticks64
+        |     +--ro in-low-ttl-discards?     oc-yang:counter64
         ...
         +--rw subinterfaces
            +--rw subinterface* [index]
               ...
               +--ro state
                  +--ro counters
                     +--ro out-discards?           oc-yang:counter64
                     +--ro out-errors?             oc-yang:counter64
                     +--ro last-clear?             oc-types:timeticks64
+                    +--ro in-low-ttl-discards?    oc-yang:counter64

This change introduces a new operational state counter in-low-ttl-discards under subinterface counters (/interfaces/interface/subinterfaces/subinterface/state/counters/in-low-ttl-discards) to track ingress packets dropped due to TTL or Hop Limit expiration.
The version has been bumped to 3.9.0 in openconfig-interfaces.yang.

Change-Id: I2eb15fbed7f42d17dbca3e6a789befd41993f6f9

@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-interfaces YANG module to version 3.9.0 and introduces a new in-low-ttl-discards counter to track inbound packets dropped due to expired TTL or Hop Limit. The reviewer suggested a wording improvement in the counter's description to make it more implementation-agnostic, changing 'upon routing lookup' to 'during transit forwarding'.

Comment thread release/models/interfaces/openconfig-interfaces.yang Outdated
ostromart and others added 2 commits July 28, 2026 17:20
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@navaneethyv navaneethyv moved this to Ready to discuss in OC Operator Review Jul 28, 2026
@navaneethyv

Copy link
Copy Markdown
Contributor

OC operator review 28th. Looks good.

Keeping in ready to discuss for further comments.

@ostromart ostromart changed the title Add ingress low-TTL discard counter to subinterface counters Add ingress low-TTL discard counter to interface and subinterface counters Jul 31, 2026
@ostromart
ostromart force-pushed the feature/subif-in-low-ttl-discards branch from 812813b to 39b09a8 Compare July 31, 2026 00:47
This change moves in-low-ttl-discards to grouping interface-common-counters-state in openconfig-interfaces.yang so that it is visible under both /interfaces/interface/state/counters/in-low-ttl-discards and /interfaces/interface/subinterfaces/subinterface/state/counters/in-low-ttl-discards.

Change-Id: I90ec73ae65c0c7f611c8f56cc230ad653ad03781
@ostromart
ostromart force-pushed the feature/subif-in-low-ttl-discards branch from 39b09a8 to 0c999f7 Compare July 31, 2026 00:50
@navaneethyv

Copy link
Copy Markdown
Contributor

OC operator review August 4th : no comments yet, keeping it for a week before we move to the next phase.

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

Projects

Status: Ready to discuss

Development

Successfully merging this pull request may close these issues.

2 participants