Skip to content

Add tunnel-processing-mode leaves for dscp and ttl - #1506

Closed
tasaleh wants to merge 2 commits into
openconfig:masterfrom
tasaleh:oc_tunnel_processing_mode
Closed

Add tunnel-processing-mode leaves for dscp and ttl#1506
tasaleh wants to merge 2 commits into
openconfig:masterfrom
tasaleh:oc_tunnel_processing_mode

Conversation

@tasaleh

@tasaleh tasaleh commented Jun 11, 2026

Copy link
Copy Markdown

Change Scope

TTL, Hop Limit, and DSCP/Traffic Class can be viewed as tunnel header fields whose values are processed according to defined tunnel conceptual models, most notably Uniform and Pipe modes.

These changes have been discussed as part of PR review #1492

Overview of tunnel header processing modes

  • Uniform mode (Propagation): The corresponding field from the inner packet is propagated into the outer tunnel header during encapsulation. Where field-specific de-capsulation behavior is defined, the tunnel header field may also influence the forwarded packet at tunnel egress.
  • Pipe mode: The outer tunnel header field is processed independently from the corresponding inner packet field. The outer field is set using an explicitly configured value, a default value, or another field-specific policy, and changes within the tunnel are not propagated back to the inner packet at tunnel egress.

These conceptual tunnel models are used across multiple specifications and header fields. Since the same tunnel processing concept applies to multiple header fields (IPv4 TTL, IPv6 Hop Limit, and DSCP/Traffic Class), it is preferable to model this as a generic reusable identity that can be set explicitly by configuration leaves rather than encoding it implicitly.

Proposed Configuration Leaves

We suggest explicit configurable leaves to set the tunnel processing models:

  • ttl-processing-mode
  • dscp-processing-mode

These leaves are of type tunnel-header-field-mode-type, defined as follows:

typedef tunnel-header-field-mode-type {
type identityref {
base TUNNEL_HEADER_FIELD_MODE;
}
}

Derived Identities

  • TUNNEL_HEADER_FIELD_MODE_UNIFORM
  • TUNNEL_HEADER_FIELD_MODE_PIPE

We also suggest setting a default value for the ip-ttl and dscp leaves. This terminology is aligned with RFC 3270, RFC 2983, RFC 3443, and RFC 2473.

Generic Behavior Table

processing-mode Field-specific value configured? Outer tunnel header-field behavior
TUNNEL_HEADER_FIELD_MODE_UNIFORM Yes or no Propagate the corresponding value from the inner packet header to the outer tunnel header. The field-specific configured value is ignored for encapsulation.
TUNNEL_HEADER_FIELD_MODE_PIPE Yes Use the explicitly configured field-specific value in the outer tunnel header.
TUNNEL_HEADER_FIELD_MODE_PIPE No Use the field-specific default value or policy-defined value in the outer tunnel header.

References

RFC Context
RFC 3270 Defines the Uniform, Pipe, and Short Pipe tunnel models in the context of MPLS DiffServ/QoS treatment.
RFC 2983 Discusses DiffServ behavior across tunnels, including how DSCP/DS field values may be copied, preserved, or independently set across tunnel boundaries.
RFC 3443 Applies the Uniform and Pipe tunnel model concepts to TTL processing in MPLS networks.
RFC 2473 Defines generic IPv6 tunneling behavior, including outer IPv6 Hop Limit handling.
RFC 2474 Defines the DS field/DSCP semantics used by the DiffServ tunneling behavior described in RFC 2983 and RFC 3270.

Tree View

       |     +--ro udp-v4
       |     |  +--ro state
       |     |     +--ro src-ip?         oc-inet:ipv4-address
       |     |     +--ro dst-ip?         oc-inet:ipv4-address
+      |     |     +--ro dscp-processing-mode?   oc-aftt:tunnel-header-field-mode-type
       |     |     +--ro dscp?           oc-inet:dscp
       |     |     +--ro src-udp-port?   oc-inet:port-number
       |     |     +--ro dst-udp-port?   oc-inet:port-number
+      |     |     +--ro ttl-processing-mode?    oc-aftt:tunnel-header-field-mode-type
       |     |     +--ro ip-ttl?         uint8
       |     +--ro udp-v6
       |     |  +--ro state
       |     |     +--ro src-ip?         oc-inet:ipv6-address
       |     |     +--ro dst-ip?         oc-inet:ipv6-address
+      |     |     +--ro dscp-processing-mode?   oc-aftt:tunnel-header-field-mode-type
       |     |     +--ro dscp?           oc-inet:dscp
       |     |     +--ro src-udp-port?   oc-inet:port-number
       |     |     +--ro dst-udp-port?   oc-inet:port-number
+      |     |     +--ro ttl-processing-mode?    oc-aftt:tunnel-header-field-mode-type
       |     |     +--ro ip-ttl?         uint8

@tasaleh
tasaleh requested a review from a team as a code owner June 11, 2026 17:20
@google-cla

google-cla Bot commented Jun 11, 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 introduces tunnel header-field processing modes and default TTL/DSCP values for UDP encapsulation within the OpenConfig AFT models. The feedback recommends specifying TUNNEL_HEADER_FIELD_MODE_UNIFORM as the default for both dscp-processing-mode and ttl-processing-mode to maintain backward compatibility. Additionally, since these models support both IPv4 and IPv6, the reviewer suggests updating the descriptions of ttl-processing-mode, ip-ttl, and the base identity TUNNEL_HEADER_FIELD_MODE to refer generically to 'IP TTL / Hop Limit' instead of 'IPv4 TTL'.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread release/models/aft/openconfig-aft-common.yang
Comment thread release/models/aft/openconfig-aft-common.yang
Comment thread release/models/aft/openconfig-aft-common.yang
Comment thread release/models/aft/openconfig-aft-types.yang
@tasaleh

tasaleh commented Jul 8, 2026

Copy link
Copy Markdown
Author

Cancel this change. Stick to the current model and update the description of the ip-ttl and dscp to explicitly state the expected behavior.
#1511

@tasaleh tasaleh closed this Jul 8, 2026
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.

1 participant