Adding Ipv6 header encapsulation support to static GUE tunnel#1492
Adding Ipv6 header encapsulation support to static GUE tunnel#1492nupkanoi wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the openconfig-network-instance-static YANG module to version 0.2.2, introducing a new udp-v6 container to support static encapsulation headers for UDP in IPv6. The review feedback suggests improving the clarity and consistency of the module's documentation by correcting a typo in the revision history and providing more specific descriptions for the newly added configuration and state containers.
…atic.yang Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…atic.yang Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gcbrun |
…atic.yang Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
No major YANG version changes in commit 8cd39ba |
|
/gcbrun |
|
/gcbrun |
|
#1234 has links to implementation references |
|
Reviewed in OC Operators Meeting May 19th, 2026: Note* - Otherwise, just the minor version bump as suggested in review. Should be good to move to last-call in 2 weeks. |
|
For reviewer convenience: +--rw network-instances
+--rw network-instance* [name]
[...]
+--rw static
| +--rw next-hops
| +--rw next-hop* [index]
| +--rw encap-headers
| +--rw encap-header* [index]
[...]
| +--rw udp-v4
| | +--rw config
| | | +--rw src-ip? oc-inet:ipv4-address
| | | +--rw dst-ip? oc-inet:ipv4-address
| | | +--rw dscp? oc-inet:dscp
| | | +--rw src-udp-port? oc-inet:port-number
| | | +--rw dst-udp-port? oc-inet:port-number
| | | +--rw ip-ttl? uint8
| | +--ro state
| | +--ro src-ip? oc-inet:ipv4-address
| | +--ro dst-ip? oc-inet:ipv4-address
| | +--ro dscp? oc-inet:dscp
| | +--ro src-udp-port? oc-inet:port-number
| | +--ro dst-udp-port? oc-inet:port-number
| | +--ro ip-ttl? uint8
+ | +--rw udp-v6
+ | | +--rw config
+ | | | +--rw src-ip? oc-inet:ipv6-address
+ | | | +--rw dst-ip? oc-inet:ipv6-address
+ | | | +--rw dscp? oc-inet:dscp
+ | | | +--rw src-udp-port? oc-inet:port-number
+ | | | +--rw dst-udp-port? oc-inet:port-number
+ | | | +--rw ip-ttl? uint8
+ | | +--ro state
+ | | +--ro src-ip? oc-inet:ipv6-address
+ | | +--ro dst-ip? oc-inet:ipv6-address
+ | | +--ro dscp? oc-inet:dscp
+ | | +--ro src-udp-port? oc-inet:port-number
+ | | +--ro dst-udp-port? oc-inet:port-number
+ | | +--ro ip-ttl? uint8
| +--rw gre
| | +--rw config
| | | +--rw src-ip? oc-inet:ip-address
| | | +--rw dst-ip? oc-inet:ip-address
| | | +--rw ttl? uint8
| | +--ro state
| | +--ro src-ip? oc-inet:ip-address
[...]
|
…atic.yang Co-authored-by: Caleb Geiger <48812321+ElodinLaarz@users.noreply.github.com>
…atic.yang Co-authored-by: Caleb Geiger <48812321+ElodinLaarz@users.noreply.github.com>
|
/gcbrun |
|
FYI Last call deadline is June 2, 2026 |
|
As per RFC8200, IPv6 header defines Hop Limit field which is equivalent to the IPv4 Time To Live (TTL) field. |
|
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. Overview
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 LeavesWe suggest explicit configurable leaves to set the tunnel processing models:
These leaves are of type typedef tunnel-header-field-mode-type { Derived Identities
We also suggest setting a default value for the Generic Behavior Table
References
Suggested YANG Implementation for the above changesidentity TUNNEL_HEADER_FIELD_MODE {
description
"Base identity for tunnel header-field processing modes.
Tunnel header-field processing modes describe how a packet header
field is handled across a tunnel encapsulation or decapsulation
boundary. Examples of such fields include IPv4 TTL, IPv6 Hop Limit,
and DSCP/Traffic Class.
The mode determines whether the selected field is propagated between
the inner and outer headers, or whether the tunnel header uses an
independently configured/default value.";
reference
"RFC 3270: Multi-Protocol Label Switching (MPLS) Support of
Differentiated Services.
RFC 2983: Differentiated Services and Tunnels.
RFC 3443: Time To Live (TTL) Processing in Multi-Protocol
Label Switching (MPLS) Networks.";
}
identity TUNNEL_HEADER_FIELD_MODE_UNIFORM {
base TUNNEL_HEADER_FIELD_MODE;
description
"Uniform tunnel header-field processing mode.
In uniform mode, the selected header field is propagated across
the tunnel boundary. At tunnel ingress, the outer tunnel header
field is derived from the corresponding inner packet header field.
Where field-specific decapsulation behavior is defined, changes to
the tunnel header field may be reflected back to the forwarded
packet at tunnel egress.
This mode is also commonly described as propagation.";
reference
"RFC 3270: Multi-Protocol Label Switching (MPLS) Support of
Differentiated Services.
RFC 2983: Differentiated Services and Tunnels.
RFC 3443: Time To Live (TTL) Processing in Multi-Protocol
Label Switching (MPLS) Networks.";
}
identity TUNNEL_HEADER_FIELD_MODE_PIPE {
base TUNNEL_HEADER_FIELD_MODE;
description
"Pipe tunnel header-field processing mode.
In pipe mode, the selected outer tunnel header field is independent
of the corresponding inner packet header field. At tunnel ingress,
the outer tunnel header field is set from an explicitly configured
value, a default value, or other field-specific policy, rather than
being copied from the inner packet.
Where field-specific decapsulation behavior is defined, changes to
the tunnel header field are not propagated back to the forwarded
inner packet.";
reference
"RFC 3270: Multi-Protocol Label Switching (MPLS) Support of
Differentiated Services.
RFC 2983: Differentiated Services and Tunnels.
RFC 3443: Time To Live (TTL) Processing in Multi-Protocol
Label Switching (MPLS) Networks.";
}
typedef tunnel-header-field-mode-type {
type identityref {
base TUNNEL_HEADER_FIELD_MODE;
}
description
"Type definition for tunnel header-field processing modes.
This type is intended for use by configuration leaves that control
whether a specific packet header field, such as IPv4 TTL, IPv6 Hop
Limit, or DSCP/Traffic Class, is propagated across a tunnel boundary
or independently set by the tunnel.";
reference
"RFC 3270: Multi-Protocol Label Switching (MPLS) Support of
Differentiated Services.
RFC 2983: Differentiated Services and Tunnels.
RFC 3443: Time To Live (TTL) Processing in Multi-Protocol
Label Switching (MPLS) Networks.";
}
leaf ttl-processing-mode {
type tunnel-header-field-mode-type;
description
"Specifies the tunnel processing mode for IPv4 TTL.
When set to TUNNEL_HEADER_FIELD_MODE_UNIFORM, the IPv4 TTL value
from the inner packet is propagated to the outer IPv4 header during
tunnel encapsulation.
When set to TUNNEL_HEADER_FIELD_MODE_PIPE, the outer IPv4 TTL value
is set independently of the inner packet TTL, using the configured
or default ip-ttl value.";
reference
"RFC 3443: Time To Live (TTL) Processing in Multi-Protocol
Label Switching (MPLS) Networks.";
}
leaf hop-limit-processing-mode {
type tunnel-header-field-mode-type;
description
"Specifies the tunnel processing mode for IPv6 Hop Limit.
When set to TUNNEL_HEADER_FIELD_MODE_UNIFORM, the IPv6 Hop Limit
value from the inner packet is propagated to the outer IPv6 tunnel
header during encapsulation.
When set to TUNNEL_HEADER_FIELD_MODE_PIPE, the outer IPv6 Hop Limit
value is set independently of the inner packet Hop Limit. The value
is taken from explicit configuration, a default value, or another
field-specific policy defined by the model.
In pipe mode, changes to the outer IPv6 Hop Limit while the packet
traverses the tunnel are not propagated back to the inner packet at
tunnel egress.
This leaf controls only the tunnel header-field processing model for
Hop Limit. Normal IPv6 forwarding behavior, including Hop Limit
decrement processing, is outside the scope of this leaf.";
reference
"RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.
RFC 2473: Generic Packet Tunneling in IPv6 Specification.";
}
leaf dscp-processing-mode {
type tunnel-header-field-mode-type;
description
"Specifies the tunnel processing mode for DSCP or Traffic Class.
When set to TUNNEL_HEADER_FIELD_MODE_UNIFORM, the DSCP value from
the inner packet is propagated to the outer tunnel header during
encapsulation. For IPv4, this refers to the DSCP bits in the IPv4
Differentiated Services field. For IPv6, this refers to the DSCP
bits in the IPv6 Traffic Class field.
When set to TUNNEL_HEADER_FIELD_MODE_PIPE, the outer tunnel header
DSCP value is set independently of the inner packet DSCP value. The
value is taken from explicit configuration, a default value, or
another field-specific policy defined by the model.
In pipe mode, changes to the outer tunnel header DSCP value while
the packet traverses the tunnel are not propagated back to the inner
packet at tunnel egress.
This leaf models the Uniform and Pipe tunnel processing behavior for
DSCP/Traffic Class. It does not model Short Pipe behavior.";
reference
"RFC 2474: Definition of the Differentiated Services Field
in the IPv4 and IPv6 Headers.
RFC 2983: Differentiated Services and Tunnels.
RFC 3270: Multi-Protocol Label Switching (MPLS) Support of
Differentiated Services.";
}
leaf ip-ttl {
type uint8;
default "255";
description
"The configured/default IPv4 TTL value used in the outer IPv4
header during packet encapsulation when ttl-processing-mode is set
to TUNNEL_HEADER_FIELD_MODE_PIPE.
If ttl-processing-mode is set to TUNNEL_HEADER_FIELD_MODE_PIPE and
this leaf is not explicitly configured, the default value of 255 is
used as the outer IPv4 TTL.
If ttl-processing-mode is set to TUNNEL_HEADER_FIELD_MODE_UNIFORM,
this leaf is ignored for packet encapsulation; the IPv4 TTL value
from the inner packet is propagated to the outer IPv4 header.";
reference
"RFC 791: Internet Protocol.
RFC 3443: Time To Live (TTL) Processing in Multi-Protocol
Label Switching (MPLS) Networks.";
}
leaf hop-limit {
type uint8;
default "255";
description
"The configured/default IPv6 Hop Limit value used in the outer IPv6
header during packet encapsulation when hop-limit-processing-mode is
set to TUNNEL_HEADER_FIELD_MODE_PIPE.
If hop-limit-processing-mode is set to
TUNNEL_HEADER_FIELD_MODE_PIPE and this leaf is not explicitly
configured, the default value of 255 is used as the outer IPv6 Hop
Limit.
If hop-limit-processing-mode is set to
TUNNEL_HEADER_FIELD_MODE_UNIFORM, this leaf is ignored for packet
encapsulation; the IPv6 Hop Limit value from the inner packet is
propagated to the outer IPv6 header.
This leaf controls only the Hop Limit value placed in the outer IPv6
tunnel header during encapsulation. Normal IPv6 Hop Limit forwarding
behavior, including Hop Limit decrement processing, is outside the
scope of this leaf.";
reference
"RFC 8200: Internet Protocol, Version 6 (IPv6) Specification.
RFC 2473: Generic Packet Tunneling in IPv6 Specification.";
}
leaf dscp {
type oc-inet:dscp;
default "0";
description
"The configured/default DSCP value used in the outer IP header
during packet encapsulation when dscp-processing-mode is set to
TUNNEL_HEADER_FIELD_MODE_PIPE.
For IPv4, this value is carried in the Differentiated Services
field of the outer IPv4 header. For IPv6, this value is carried in
the Traffic Class field of the outer IPv6 header.
If dscp-processing-mode is set to TUNNEL_HEADER_FIELD_MODE_PIPE and
this leaf is not explicitly configured, the default DSCP value of 0
is used for the outer IP header.
If dscp-processing-mode is set to
TUNNEL_HEADER_FIELD_MODE_UNIFORM, this leaf is ignored for packet
encapsulation; the DSCP value from the inner packet is propagated
to the outer IP header.
This leaf controls only the DSCP value placed in the outer IP
tunnel header during encapsulation. Other QoS classification,
marking, remarking, or scheduling behavior is outside the scope of
this leaf.";
reference
"RFC 2474: Definition of the Differentiated Services Field
in the IPv4 and IPv6 Headers.
RFC 2983: Differentiated Services and Tunnels.";
} |
|
Currently, some attributes such as TTL/Hop-limit/DSCP/source and destination UDP ports are per-tunnel. In some use-cases, a global value is needed to set for all tunnels. There is already a discussion about adding such a global template in this PR: #1270 |
Hi, adding global configuration parameters for policy-forwarding encapsulation configuration is beyond the scope of this PR. Feel free to open a new PR with your proposal which can be reviewed by the community. |
I suspect this is just due to grouping re-use and wouldn't justify this just for the sake of nomenclature But the patterns here should have likely followed existing patterns that are seen in |
Change Scope
Adding Ipv6 header encapsulation support to static GUE tunnel
Support for UDP-V4 already exist.
Tree View