From 31ea21adc98428ffaeb747c2c6c1a24ceae3dafa Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 10:37:38 -0700 Subject: [PATCH 01/42] Add aft encap mpls-in-udp paths --- release/models/aft/openconfig-aft-common.yang | 77 +++++++++++++++++++ release/models/aft/openconfig-aft-types.yang | 18 ++++- 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index ac924b67c..3244450c6 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -238,6 +238,19 @@ submodule openconfig-aft-common { } } + container mpls-in-udp { + description + "When specified, the packet has an MPLS in UDP header applied to it before + forwarding to the specified next-hop."; + + container state { + config false; + description + "State parameters relating to MPLS-in-UDP encapsulation."; + uses aft-common-entry-nexthop-mplsudp-state; + } + } + uses oc-if:interface-ref-state; } } @@ -438,6 +451,70 @@ submodule openconfig-aft-common { } } + grouping aft-common-entry-nexthop-mplsudp-state { + description + "MPLS in UDP encapsulation applied on a IPv4 or IPv6 next-hop."; + + leaf src-ip { + type oc-inet:ip-address; + description + "The source IP address for the MPLS in UDP encapsulation may be + expressed using this leaf (src-ip) or if may be derived from + '../../interface-ref/state/subinterface'"; + } + + leaf dst-ip { + type oc-inet:ip-address; + description + "Destination IP address to use for the encapsulated packet."; + } + + leaf dscp { + type oc-inet:ip-address; + description + "Destination IP address to use for the encapsulated packet."; + } + + leaf ttl { + type uint8; + description + "This leaf reflects the configured/default TTL value that is used in the + outer header during packet encapsulation. When this leaf is not set, + the TTL value of the inner packet is copied over as the outer packet's + TTL value during encapsulation."; + } + + leaf flow-label { + type uint32 { + range 0..1048575; + } + description + "If IPv6 UDP encapsulation is used, this leaf represents a static + assignment for an IPv6 flow label. If unspecified, the system may + set the flow label using it's own logic."; + reference + "RFC 6437 - IPv6 Flow Label Specification"; + } + + leaf-list pushed-mpls-label-stack { + type oc-mplst:mpls-label; + ordered-by user; + description + "The MPLS label stack imposed when forwarding packets to the + next-hop + - the stack is encoded as a leaf list where the first entry in the + list is the label at the bottom of the stack to be pushed. + + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]. + + The MPLS label stack list is ordered by the user, such that no + system re-ordering of leaves is permitted by the system."; + } + + } + grouping aft-common-install-protocol { description "Grouping for a common reference to the protocol which diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 4b7fc8f64..3f3b5f40b 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -16,7 +16,13 @@ module openconfig-aft-types { "Types related to the OpenConfig Abstract Forwarding Table (AFT) model"; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2024-07-18" { + description + "Add MPLS in UDP enums for encapsulate-header."; + reference "1.2.0"; + } revision "2022-05-05" { description @@ -89,6 +95,16 @@ module openconfig-aft-types { description "The encapsulation header is a VXLAN packet header"; } + enum MPLS-IN-UDPv4 { + description + "The encapsulation header is an MPLS packet inside an IPv4 UDP + packet header"; + } + enum MPLS-IN-UDPv6 { + description + "The encapsulation header is an MPLS packet inside an IPv6 UDP + packet header"; + } } description "Types of tunnel encapsulation that are supported by systems as either From 5ace5ac982bca14e4d603b43abc494363597627f Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 11:20:39 -0700 Subject: [PATCH 02/42] update aft-common version --- release/models/aft/openconfig-aft-common.yang | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 3244450c6..1325ed646 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -23,7 +23,13 @@ submodule openconfig-aft-common { "Submodule containing definitions of groupings that are re-used across multiple contexts within the AFT model."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description From f0e4b02604b39d85f9b491736b0cb74e5a0b1681 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 11:33:52 -0700 Subject: [PATCH 03/42] version bump --- release/models/aft/openconfig-aft-ethernet.yang | 8 +++++++- release/models/aft/openconfig-aft-ipv4.yang | 8 +++++++- release/models/aft/openconfig-aft-ipv6.yang | 8 +++++++- release/models/aft/openconfig-aft-mpls.yang | 8 +++++++- release/models/aft/openconfig-aft-pf.yang | 8 +++++++- release/models/aft/openconfig-aft-state-synced.yang | 8 +++++++- release/models/aft/openconfig-aft.yang | 8 +++++++- 7 files changed, 49 insertions(+), 7 deletions(-) diff --git a/release/models/aft/openconfig-aft-ethernet.yang b/release/models/aft/openconfig-aft-ethernet.yang index 2845c9383..6df3b138b 100644 --- a/release/models/aft/openconfig-aft-ethernet.yang +++ b/release/models/aft/openconfig-aft-ethernet.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ethernet { "Submodule containing definitions of groupings for the abstract forwarding tables for Ethernet."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index f6152aca8..fb96546bf 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description diff --git a/release/models/aft/openconfig-aft-ipv6.yang b/release/models/aft/openconfig-aft-ipv6.yang index 1976a7271..437db1bcf 100644 --- a/release/models/aft/openconfig-aft-ipv6.yang +++ b/release/models/aft/openconfig-aft-ipv6.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv6 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv6."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index 77091afa4..548190d49 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -21,7 +21,13 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description diff --git a/release/models/aft/openconfig-aft-pf.yang b/release/models/aft/openconfig-aft-pf.yang index fc72ece6e..b5bd02c0a 100644 --- a/release/models/aft/openconfig-aft-pf.yang +++ b/release/models/aft/openconfig-aft-pf.yang @@ -28,7 +28,13 @@ submodule openconfig-aft-pf { fields other than the destination address that is used in other forwarding tables."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description diff --git a/release/models/aft/openconfig-aft-state-synced.yang b/release/models/aft/openconfig-aft-state-synced.yang index 166ad7ead..929385ba6 100644 --- a/release/models/aft/openconfig-aft-state-synced.yang +++ b/release/models/aft/openconfig-aft-state-synced.yang @@ -16,7 +16,13 @@ submodule openconfig-aft-state-synced { "Submodule containing definitions of groupings for the state synced signals corresponding to various abstract forwarding tables."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description diff --git a/release/models/aft/openconfig-aft.yang b/release/models/aft/openconfig-aft.yang index 011956948..fdc52ca29 100644 --- a/release/models/aft/openconfig-aft.yang +++ b/release/models/aft/openconfig-aft.yang @@ -42,7 +42,13 @@ module openconfig-aft { is referred to as an Abstract Forwarding Table (AFT), rather than the FIB."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.6.0"; + } revision "2024-01-26" { description From 19f4a944e35289ddc3b9ebb8e9ef8f5c77928476 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 11:36:50 -0700 Subject: [PATCH 04/42] fix enum upper-case name --- release/models/aft/openconfig-aft-types.yang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 3f3b5f40b..7a3717f37 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -95,12 +95,12 @@ module openconfig-aft-types { description "The encapsulation header is a VXLAN packet header"; } - enum MPLS-IN-UDPv4 { + enum MPLS-IN-UDPV4 { description "The encapsulation header is an MPLS packet inside an IPv4 UDP packet header"; } - enum MPLS-IN-UDPv6 { + enum MPLS-IN-UDPV6 { description "The encapsulation header is an MPLS packet inside an IPv6 UDP packet header"; From 83e5d36b0036685eb6a0b1b059753431cd643f44 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 12:33:44 -0700 Subject: [PATCH 05/42] fix enum upper-case name --- release/models/aft/openconfig-aft-types.yang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 7a3717f37..8239521ac 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -95,12 +95,12 @@ module openconfig-aft-types { description "The encapsulation header is a VXLAN packet header"; } - enum MPLS-IN-UDPV4 { + enum MPLS_IN_UDPV4 { description "The encapsulation header is an MPLS packet inside an IPv4 UDP packet header"; } - enum MPLS-IN-UDPV6 { + enum MPLS_IN_UDPV6 { description "The encapsulation header is an MPLS packet inside an IPv6 UDP packet header"; From 857ff773501ba364a052f4526f5ff87cd46342ed Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 14:20:01 -0700 Subject: [PATCH 06/42] change flow label type --- release/models/aft/openconfig-aft-common.yang | 4 +--- release/models/aft/openconfig-aft-types.yang | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 1325ed646..b8c9ef4ee 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -491,9 +491,7 @@ submodule openconfig-aft-common { } leaf flow-label { - type uint32 { - range 0..1048575; - } + type oc-inet:ipv6-flow-label; description "If IPv6 UDP encapsulation is used, this leaf represents a static assignment for an IPv6 flow label. If unspecified, the system may diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 8239521ac..d28999882 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -99,11 +99,15 @@ module openconfig-aft-types { description "The encapsulation header is an MPLS packet inside an IPv4 UDP packet header"; + reference + "RFC 7510 - Encapsulating MPLS in UDP."; } enum MPLS_IN_UDPV6 { description "The encapsulation header is an MPLS packet inside an IPv6 UDP packet header"; + reference + "RFC 7510 - Encapsulating MPLS in UDP."; } } description From e5369e52cd02ffc7fb7387b9ddf4a26e632d2e6e Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 14:24:45 -0700 Subject: [PATCH 07/42] remove flow-label --- release/models/aft/openconfig-aft-common.yang | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index b8c9ef4ee..333cfa0ed 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -490,16 +490,6 @@ submodule openconfig-aft-common { TTL value during encapsulation."; } - leaf flow-label { - type oc-inet:ipv6-flow-label; - description - "If IPv6 UDP encapsulation is used, this leaf represents a static - assignment for an IPv6 flow label. If unspecified, the system may - set the flow label using it's own logic."; - reference - "RFC 6437 - IPv6 Flow Label Specification"; - } - leaf-list pushed-mpls-label-stack { type oc-mplst:mpls-label; ordered-by user; From df2b4cd04f45e8cfb9ceb0937b35d25d282c58e6 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 18 Jul 2024 14:39:35 -0700 Subject: [PATCH 08/42] fix whitespace --- release/models/aft/openconfig-aft-types.yang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index d28999882..338ae22f7 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -99,14 +99,14 @@ module openconfig-aft-types { description "The encapsulation header is an MPLS packet inside an IPv4 UDP packet header"; - reference + reference "RFC 7510 - Encapsulating MPLS in UDP."; } enum MPLS_IN_UDPV6 { description "The encapsulation header is an MPLS packet inside an IPv6 UDP packet header"; - reference + reference "RFC 7510 - Encapsulating MPLS in UDP."; } } From deb53d73e39a312d4d8c75a9928ef8288524dd9a Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 23 Jul 2024 11:04:36 -0700 Subject: [PATCH 09/42] address comments --- release/models/aft/openconfig-aft-common.yang | 50 +++++++------------ .../models/mpls/openconfig-mpls-types.yang | 13 +++++ 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 333cfa0ed..e447961bf 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -368,25 +368,15 @@ submodule openconfig-aft-common { } leaf-list pushed-mpls-label-stack { - type oc-mplst:mpls-label; + type oc-mplst:pushed-mpls-label-stack; ordered-by user; description "The MPLS label stack imposed when forwarding packets to the - next-hop - - the stack is encoded as a leaf list whereby the order of the - entries is such that the first entry in the list is the - label at the bottom of the stack to be pushed. - - To this end, a packet which is to forwarded to a device using - a service label of 42, and a transport label of 8072 will be - represented with a label stack list of [42, 8072]. - - The MPLS label stack list is ordered by the user, such that no - system re-ordering of leaves is permitted by the system. - - A swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + next-hop. See the description of the type + oc-mplst:pushed-mpls-label-stack for encoding rules. + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and pushed-mpls-label-stack nodes."; } leaf encapsulate-header { @@ -464,9 +454,7 @@ submodule openconfig-aft-common { leaf src-ip { type oc-inet:ip-address; description - "The source IP address for the MPLS in UDP encapsulation may be - expressed using this leaf (src-ip) or if may be derived from - '../../interface-ref/state/subinterface'"; + "The source IP address for the MPLS in UDP encapsulation."; } leaf dst-ip { @@ -481,13 +469,13 @@ submodule openconfig-aft-common { "Destination IP address to use for the encapsulated packet."; } - leaf ttl { + leaf ip-ttl { type uint8; description - "This leaf reflects the configured/default TTL value that is used in the - outer header during packet encapsulation. When this leaf is not set, - the TTL value of the inner packet is copied over as the outer packet's - TTL value during encapsulation."; + "This leaf reflects the configured/default IP TTL value that is used + in the outer header during packet encapsulation. When this leaf is + not set, the TTL value of the inner packet is copied over as the + outer packet's IP TTL value during encapsulation."; } leaf-list pushed-mpls-label-stack { @@ -495,16 +483,16 @@ submodule openconfig-aft-common { ordered-by user; description "The MPLS label stack imposed when forwarding packets to the - next-hop - - the stack is encoded as a leaf list where the first entry in the - list is the label at the bottom of the stack to be pushed. + next-hop. The stack is encoded as a leaf list where the first + entry in the list is the label at the bottom of the stack to be + pushed. - For example, a packet with a label stack of two labels, the bottom - label being 42 and the top label being 8072 will be represented with - a leaf-list of [42, 8072]. + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]. - The MPLS label stack list is ordered by the user, such that no - system re-ordering of leaves is permitted by the system."; + The MPLS label stack list is ordered by the user, such that no + system re-ordering of leaves is permitted by the system."; } } diff --git a/release/models/mpls/openconfig-mpls-types.yang b/release/models/mpls/openconfig-mpls-types.yang index 765e467cf..bba3e8de9 100644 --- a/release/models/mpls/openconfig-mpls-types.yang +++ b/release/models/mpls/openconfig-mpls-types.yang @@ -479,6 +479,19 @@ module openconfig-mpls-types { reference "RFC 3032 - MPLS Label Stack Encoding"; } + typedef pushed-mpls-label-stack { + type mpls-label; + description + "Type used to specify a stack of MPLS label values to be added to a + packet. This type must be used in a leaf-list which is ordered by user. + The the stack of labels is encoded where the first entry in the list is + the label at the bottom of the stack. + + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]."; + } + typedef tunnel-type { type enumeration { enum P2P { From 53cae0a892c3d5a4b30b128ebd21197c2ccfe86b Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 23 Jul 2024 11:39:44 -0700 Subject: [PATCH 10/42] fix typedef pushed-mpls-label-stack --- release/models/aft/openconfig-aft-common.yang | 18 +++++++----------- release/models/mpls/openconfig-mpls-types.yang | 10 ++++++++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index e447961bf..575323dc1 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -372,7 +372,7 @@ submodule openconfig-aft-common { ordered-by user; description "The MPLS label stack imposed when forwarding packets to the - next-hop. See the description of the type + next-hop. See the description of the type oc-mplst:pushed-mpls-label-stack for encoding rules. Note: a swap operation is reflected by entries in the @@ -479,20 +479,16 @@ submodule openconfig-aft-common { } leaf-list pushed-mpls-label-stack { - type oc-mplst:mpls-label; + type oc-mplst:pushed-mpls-label-stack; ordered-by user; + description description "The MPLS label stack imposed when forwarding packets to the - next-hop. The stack is encoded as a leaf list where the first - entry in the list is the label at the bottom of the stack to be - pushed. - - For example, a packet with a label stack of two labels, the bottom - label being 42 and the top label being 8072 will be represented with - a leaf-list of [42, 8072]. + next-hop. See the description of the type + oc-mplst:pushed-mpls-label-stack for encoding rules. - The MPLS label stack list is ordered by the user, such that no - system re-ordering of leaves is permitted by the system."; + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and pushed-mpls-label-stack nodes."; } } diff --git a/release/models/mpls/openconfig-mpls-types.yang b/release/models/mpls/openconfig-mpls-types.yang index bba3e8de9..a6910fde9 100644 --- a/release/models/mpls/openconfig-mpls-types.yang +++ b/release/models/mpls/openconfig-mpls-types.yang @@ -19,7 +19,13 @@ module openconfig-mpls-types { description "General types for MPLS / TE data model"; - oc-ext:openconfig-version "3.5.0"; + oc-ext:openconfig-version "3.6.0"; + + revision "2024-07-24" { + description + "Add pushed-mpls-label-stack typdef"; + reference "3.6.0"; + } revision "2023-12-14" { description @@ -486,7 +492,7 @@ module openconfig-mpls-types { packet. This type must be used in a leaf-list which is ordered by user. The the stack of labels is encoded where the first entry in the list is the label at the bottom of the stack. - + For example, a packet with a label stack of two labels, the bottom label being 42 and the top label being 8072 will be represented with a leaf-list of [42, 8072]."; From 1f1879046e3de76872e69e64174ece15f3a3aa37 Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 23 Jul 2024 11:46:48 -0700 Subject: [PATCH 11/42] fix dscp type --- release/models/aft/openconfig-aft-common.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 575323dc1..10e0661ae 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -464,7 +464,7 @@ submodule openconfig-aft-common { } leaf dscp { - type oc-inet:ip-address; + type oc-inet:dscp; description "Destination IP address to use for the encapsulated packet."; } From efec1db37174a0f96dd9c4976a7ef410dd9e84d6 Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 23 Jul 2024 11:47:23 -0700 Subject: [PATCH 12/42] fix typo on description --- release/models/aft/openconfig-aft-common.yang | 1 - 1 file changed, 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 10e0661ae..7faa83152 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -481,7 +481,6 @@ submodule openconfig-aft-common { leaf-list pushed-mpls-label-stack { type oc-mplst:pushed-mpls-label-stack; ordered-by user; - description description "The MPLS label stack imposed when forwarding packets to the next-hop. See the description of the type From 092266fb6f291a258deb6ad6ef0379e3da2345d7 Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 23 Jul 2024 11:52:30 -0700 Subject: [PATCH 13/42] add mpls exp/traffic class --- release/models/aft/openconfig-aft-common.yang | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 7faa83152..d5814957f 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -463,12 +463,19 @@ submodule openconfig-aft-common { "Destination IP address to use for the encapsulated packet."; } - leaf dscp { + leaf ip-dscp { type oc-inet:dscp; description "Destination IP address to use for the encapsulated packet."; } + leaf traffic-class { + type oc-mplst:mpls-tc; + description + "The value of the MPLS traffic class (TC) bits, formerly known as the + EXP bits."; + } + leaf ip-ttl { type uint8; description From 645c37b62d370c9047509a753f7d3a3e0ce9b91f Mon Sep 17 00:00:00 2001 From: dplore Date: Tue, 23 Jul 2024 13:19:55 -0700 Subject: [PATCH 14/42] fix dscp description --- release/models/aft/openconfig-aft-common.yang | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index d5814957f..8d0391b6c 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -466,7 +466,8 @@ submodule openconfig-aft-common { leaf ip-dscp { type oc-inet:dscp; description - "Destination IP address to use for the encapsulated packet."; + "IP dscp value to use for the UDP header of the encapsulated + packet."; } leaf traffic-class { From f0d176a69524a151441a30a4e400cf42871900cf Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 24 Jul 2024 17:25:25 -0700 Subject: [PATCH 15/42] improve description for mpls-in-udp container --- release/models/aft/openconfig-aft-common.yang | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 8d0391b6c..cd6860010 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -246,8 +246,11 @@ submodule openconfig-aft-common { container mpls-in-udp { description - "When specified, the packet has an MPLS in UDP header applied to it before - forwarding to the specified next-hop."; + "Container for mpls-in-udp encapsulation state attributes. The + attributes are used when encapsulate-header is set to + openconfig-aft-types:MPLS_IN_UDPV(4|6), causing a the device to + add a MPLS in UDP header to a packet before forwarding to the + specified next-hop."; container state { config false; From d10d7a13dfc9dc7fd1ec2fce0368160b3a62753b Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 24 Jul 2024 17:34:46 -0700 Subject: [PATCH 16/42] fix whitespace --- release/models/aft/openconfig-aft-common.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index cd6860010..4c7ab4d1c 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -247,7 +247,7 @@ submodule openconfig-aft-common { container mpls-in-udp { description "Container for mpls-in-udp encapsulation state attributes. The - attributes are used when encapsulate-header is set to + attributes are used when encapsulate-header is set to openconfig-aft-types:MPLS_IN_UDPV(4|6), causing a the device to add a MPLS in UDP header to a packet before forwarding to the specified next-hop."; From 78b02a572abb05ab94d5872a0e38301f6f1b2b34 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 25 Jul 2024 16:57:55 -0700 Subject: [PATCH 17/42] update --- release/models/aft/openconfig-aft-common.yang | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 4c7ab4d1c..a34e936f1 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -473,11 +473,22 @@ submodule openconfig-aft-common { packet."; } - leaf traffic-class { - type oc-mplst:mpls-tc; + leaf src-udp-port { + type oc-inet:port-number; description - "The value of the MPLS traffic class (TC) bits, formerly known as the - EXP bits."; + "Source UDP port number to use for the UDP header of the encapsulated + packet."; + } + + leaf dst-udp-port { + type oc-inet:port-number; + description + "Source UDP port number to use for the UDP header of the encapsulated + packet."; + reference + "RFC 7510 - Encapsulating MPLS in UDP specifies that 6636 must be + used only if the traffic is MPLS-in-UDP with DTLS. Because of this + condition, no default is defined in OpenConfig."; } leaf ip-ttl { @@ -489,6 +500,13 @@ submodule openconfig-aft-common { outer packet's IP TTL value during encapsulation."; } + leaf traffic-class { + type oc-mplst:mpls-tc; + description + "The value of the MPLS traffic class (TC) bits, formerly known as the + EXP bits."; + } + leaf-list pushed-mpls-label-stack { type oc-mplst:pushed-mpls-label-stack; ordered-by user; From 165729629fff366b80dce8228804a7494e314dbb Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 7 Aug 2024 17:38:37 -0700 Subject: [PATCH 18/42] version fix --- release/models/aft/openconfig-aft-common.yang | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 0c01f698e..320e71d5d 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -23,7 +23,13 @@ submodule openconfig-aft-common { "Submodule containing definitions of groupings that are re-used across multiple contexts within the AFT model."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description From 0742fa2cf394fa74a3a2e68153105311b0fb3c30 Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 7 Aug 2024 17:39:35 -0700 Subject: [PATCH 19/42] version fix --- release/models/aft/openconfig-aft-ipv4.yang | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index ecd001887..b6693a9fc 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -20,19 +20,18 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; - revision "2024-04-25" { + revision "2024-07-18" { description - "Add backup-active to AFT NHG state."; - reference "2.6.0"; + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; } - oc-ext:openconfig-version "2.6.0"; - revision "2024-07-18" { + revision "2024-04-25" { description - "Add container for mpls-in-udp under next-hops aft entry state."; - reference "2.6.0"; + "Add backup-active to AFT NHG state."; + reference "2.6.0"; } revision "2024-01-26" { From fe7bcd43512e0a3ae17c56d0634df54719d3983b Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 7 Aug 2024 17:40:17 -0700 Subject: [PATCH 20/42] version fix --- release/models/aft/openconfig-aft-mpls.yang | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index 78c09c9aa..0c10b568d 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -21,13 +21,12 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "2.6.0"; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.7.0"; revision "2024-07-18" { description "Add container for mpls-in-udp under next-hops aft entry state."; - reference "2.6.0"; + reference "2.7.0"; } revision "2024-04-25" { From 0081dd2aa00c47cead5187edf945adcd09ed139a Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 7 Aug 2024 17:50:04 -0700 Subject: [PATCH 21/42] update references to rfc 7510 --- release/models/aft/openconfig-aft-common.yang | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 320e71d5d..bb2d6b386 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -458,7 +458,9 @@ submodule openconfig-aft-common { grouping aft-common-entry-nexthop-mplsudp-state { description - "MPLS in UDP encapsulation applied on a IPv4 or IPv6 next-hop."; + "MPLS in UDP encapsulation applied on a IPv4 or IPv6 next-hop. This + encapsulation is assumed to be using RFC 7510 - Encapsulating MPLS + in UDP."; leaf src-ip { type oc-inet:ip-address; @@ -492,9 +494,10 @@ submodule openconfig-aft-common { "Source UDP port number to use for the UDP header of the encapsulated packet."; reference - "RFC 7510 - Encapsulating MPLS in UDP specifies that 6636 must be - used only if the traffic is MPLS-in-UDP with DTLS. Because of this - condition, no default is defined in OpenConfig."; + "RFC 7510 - Encapsulating MPLS in UDP specifies that 6635 must be + used for MPLS-in-UDP and 6636 must be used for MPLS-in-UDP with DTLS. + Because of this condition, no default is defined in OpenConfig. The + system is expected to utilize the appropriate port."; } leaf ip-ttl { From bf8e797caedcee71d1c1bffd899cbe026d5551d3 Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 23 Aug 2024 15:14:12 -0700 Subject: [PATCH 22/42] refine description of mplsinudp source port --- release/models/aft/openconfig-aft-common.yang | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index bb2d6b386..b1f4c2a06 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -485,7 +485,10 @@ submodule openconfig-aft-common { type oc-inet:port-number; description "Source UDP port number to use for the UDP header of the encapsulated - packet."; + packet. The source UDP port should be derived from the payload + packet entropy. The extact methodology is implementation dependent, + but for example, the port could be derived from an entropy hash of + the payload or the source port (if present) of the payload."; } leaf dst-udp-port { From d614b1976ee51d1859db6bf6de453a0fb9ab9c45 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 5 Sep 2024 18:14:59 -0700 Subject: [PATCH 23/42] refactor pushed-mpls-label-stack type --- release/models/aft/openconfig-aft-common.yang | 12 ++++++------ release/models/aft/openconfig-aft-ipv4.yang | 4 ++-- release/models/aft/openconfig-aft-mpls.yang | 4 ++-- release/models/mpls/openconfig-mpls-types.yang | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index b1f4c2a06..4c86be22e 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -25,9 +25,9 @@ submodule openconfig-aft-common { oc-ext:openconfig-version "2.7.0"; - revision "2024-07-18" { + revision "2024-09-05" { description - "Add container for mpls-in-udp under next-hops aft entry state."; + "Add encapsulate-stack under aft next-hops."; reference "2.7.0"; } @@ -377,12 +377,12 @@ submodule openconfig-aft-common { } leaf-list pushed-mpls-label-stack { - type oc-mplst:pushed-mpls-label-stack; + type oc-mplst:mpls-label-stack; ordered-by user; description "The MPLS label stack imposed when forwarding packets to the next-hop. See the description of the type - oc-mplst:pushed-mpls-label-stack for encoding rules. + oc-mplst:mpls-label-stack for encoding rules. Note: a swap operation is reflected by entries in the popped-mpls-label-stack and pushed-mpls-label-stack nodes."; @@ -520,12 +520,12 @@ submodule openconfig-aft-common { } leaf-list pushed-mpls-label-stack { - type oc-mplst:pushed-mpls-label-stack; + type oc-mplst:mpls-label-stack; ordered-by user; description "The MPLS label stack imposed when forwarding packets to the next-hop. See the description of the type - oc-mplst:pushed-mpls-label-stack for encoding rules. + oc-mplst:mpls-label-stack for encoding rules. Note: a swap operation is reflected by entries in the popped-mpls-label-stack and pushed-mpls-label-stack nodes."; diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index b6693a9fc..87fb7e6fa 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -22,9 +22,9 @@ submodule openconfig-aft-ipv4 { oc-ext:openconfig-version "2.7.0"; - revision "2024-07-18" { + revision "2024-09-05" { description - "Add container for mpls-in-udp under next-hops aft entry state."; + "Add encapsulate-stack under aft next-hops."; reference "2.7.0"; } diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index 0c10b568d..c99e1c58f 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -23,9 +23,9 @@ submodule openconfig-aft-mpls { oc-ext:openconfig-version "2.7.0"; - revision "2024-07-18" { + revision "2024-09-05" { description - "Add container for mpls-in-udp under next-hops aft entry state."; + "Add encapsulate-stack under aft next-hops."; reference "2.7.0"; } diff --git a/release/models/mpls/openconfig-mpls-types.yang b/release/models/mpls/openconfig-mpls-types.yang index a6910fde9..8c2f439d6 100644 --- a/release/models/mpls/openconfig-mpls-types.yang +++ b/release/models/mpls/openconfig-mpls-types.yang @@ -23,7 +23,7 @@ module openconfig-mpls-types { revision "2024-07-24" { description - "Add pushed-mpls-label-stack typdef"; + "Add mpls-label-stack typdef"; reference "3.6.0"; } @@ -485,13 +485,13 @@ module openconfig-mpls-types { reference "RFC 3032 - MPLS Label Stack Encoding"; } - typedef pushed-mpls-label-stack { + typedef mpls-label-stack { type mpls-label; description - "Type used to specify a stack of MPLS label values to be added to a - packet. This type must be used in a leaf-list which is ordered by user. - The the stack of labels is encoded where the first entry in the list is - the label at the bottom of the stack. + "Type used to specify a stack of MPLS label values. This type must be + used in a leaf-list which is ordered by user. The the stack of labels + is encoded where the first entry in the list is the label at the bottom + of the stack. For example, a packet with a label stack of two labels, the bottom label being 42 and the top label being 8072 will be represented with From 8e9c1013d10950b03cac38f423c108cf658a7268 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 5 Sep 2024 19:30:25 -0700 Subject: [PATCH 24/42] introduce encap-headers container --- release/models/aft/openconfig-aft-common.yang | 152 +++++++++++++----- release/models/aft/openconfig-aft.yang | 4 +- 2 files changed, 111 insertions(+), 45 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 4c86be22e..f6d60a9f3 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -224,45 +224,92 @@ submodule openconfig-aft-common { container ip-in-ip { description "When specified, the packet has an IP-in-IP header applied to it before - forwarding to the specified next-hop."; + forwarding to the specified next-hop. This node is deprecated and + the encap-headers/encap-header tree should be used instead."; + status deprecated; container state { config false; + status deprecated; description "State parameters relating to IP-in-IP encapsulation."; - uses aft-common-entry-nexthop-ipip-state; + uses aft-common-entry-nexthop-ip-state; } } container gre { description "When specified, the packet has an GRE - (Generic Routing Encapsulation)header applied to + (Generic Routing Encapsulation) header applied to it before forwarding to the specified next-hop. encapsulate-header leaf should be set to GRE for this - to apply"; + to apply. + This node is deprecated and the encap-headers/encap-header tree + should be used instead."; + status deprecated; container state { config false; description "State parameters relating to GRE encapsulation."; + status deprecated; uses aft-common-entry-nexthop-gre-state; } } - container mpls-in-udp { + container encap-headers { description - "Container for mpls-in-udp encapsulation state attributes. The - attributes are used when encapsulate-header is set to - openconfig-aft-types:MPLS_IN_UDPV(4|6), causing a the device to - add a MPLS in UDP header to a packet before forwarding to the - specified next-hop."; + "Container for packet encapsulation headers. When present, this + container indicates that encapsulation of the packet matching the + next-hop is performed using a stack of one or more packets defined + in the list encap-header."; + list encap-header { + key "index"; - container state { - config false; - description - "State parameters relating to MPLS-in-UDP encapsulation."; - uses aft-common-entry-nexthop-mplsudp-state; + leaf index { + type leafref { + path "../state/index"; + } + description + "A unique index identifying an encapsulation header in a stack + of encapsulation headers. The first entry in the list is the + inner-most packet at the bottom of the stack. + + For example, in an encapsulation stack with MPLS in UDP, the + first, index in the list is the MPLS packet and the second + index is UDP."; + } + + container state { + description + "State parameters relating to encapsulation headers."; + uses aft-common-nexthop-encap-headers-state; + } + + container gre { + description + "Container of nodes for GRE encapsulation."; + + uses aft-common-entry-nexthop-gre-state; + } + + container ip { + description + "Container of nodes for IP encapsulation."; + uses aft-common-entry-nexthop-ip-state; + } + + container mpls { + description + "Container of nodes for IP encapsulation."; + uses aft-common-entry-nexthop-mpls-state; + } + + container udp { + description + "Container of nodes for UDP encapsulation."; + uses aft-common-entry-nexthop-udp-state; + } } } @@ -271,6 +318,16 @@ submodule openconfig-aft-common { } } + grouping aft-common-nexthop-encap-headers-state { + description + "Operational state parameters relating to encapsulation headers."; + leaf index { + type uint8; + description + "A pointer to an entry in an ordered list of encapsulation headers."; + } + } + grouping aft-common-entry-state { description "Operational state parameters relating to a forwarding entry"; @@ -379,13 +436,17 @@ submodule openconfig-aft-common { leaf-list pushed-mpls-label-stack { type oc-mplst:mpls-label-stack; ordered-by user; + status deprecated; description "The MPLS label stack imposed when forwarding packets to the next-hop. See the description of the type oc-mplst:mpls-label-stack for encoding rules. Note: a swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + popped-mpls-label-stack and pushed-mpls-label-stack nodes. + + This node is deprecated and the encap-headers/encap-header tree + should be used instead."; } leaf encapsulate-header { @@ -411,9 +472,9 @@ submodule openconfig-aft-common { uses aft-common-install-protocol; } - grouping aft-common-entry-nexthop-ipip-state { + grouping aft-common-entry-nexthop-ip-state { description - "IP-in-IP encapsulation applied on a next-hop"; + "IP encapsulation applied on a next-hop"; leaf src-ip { type oc-inet:ip-address; @@ -456,11 +517,33 @@ submodule openconfig-aft-common { } } - grouping aft-common-entry-nexthop-mplsudp-state { + grouping aft-common-entry-nexthop-mpls-state { description - "MPLS in UDP encapsulation applied on a IPv4 or IPv6 next-hop. This - encapsulation is assumed to be using RFC 7510 - Encapsulating MPLS - in UDP."; + "MPLS encapsulation of a packet."; + + leaf traffic-class { + type oc-mplst:mpls-tc; + description + "The value of the MPLS traffic class (TC) bits, formerly known as the + EXP bits."; + } + + leaf-list pushed-mpls-label-stack { + type oc-mplst:mpls-label-stack; + ordered-by user; + description + "The MPLS label stack imposed when forwarding packets to the + next-hop. See the description of the type + oc-mplst:mpls-label-stack for encoding rules. + + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + } + } + + grouping aft-common-entry-nexthop-udp-state { + description + "UDP encapsulation applied on top of a packet."; leaf src-ip { type oc-inet:ip-address; @@ -495,7 +578,10 @@ submodule openconfig-aft-common { type oc-inet:port-number; description "Source UDP port number to use for the UDP header of the encapsulated - packet."; + packet. + + When the payload packet is MPLS, then RFC 7510 - Encapsulating MPLS + in UDP should be followed."; reference "RFC 7510 - Encapsulating MPLS in UDP specifies that 6635 must be used for MPLS-in-UDP and 6636 must be used for MPLS-in-UDP with DTLS. @@ -511,26 +597,6 @@ submodule openconfig-aft-common { not set, the TTL value of the inner packet is copied over as the outer packet's IP TTL value during encapsulation."; } - - leaf traffic-class { - type oc-mplst:mpls-tc; - description - "The value of the MPLS traffic class (TC) bits, formerly known as the - EXP bits."; - } - - leaf-list pushed-mpls-label-stack { - type oc-mplst:mpls-label-stack; - ordered-by user; - description - "The MPLS label stack imposed when forwarding packets to the - next-hop. See the description of the type - oc-mplst:mpls-label-stack for encoding rules. - - Note: a swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; - } - } grouping aft-common-install-protocol { diff --git a/release/models/aft/openconfig-aft.yang b/release/models/aft/openconfig-aft.yang index e4336ad80..de3ce202e 100644 --- a/release/models/aft/openconfig-aft.yang +++ b/release/models/aft/openconfig-aft.yang @@ -44,9 +44,9 @@ module openconfig-aft { oc-ext:openconfig-version "2.7.0"; - revision "2024-07-18" { + revision "2024-09-05" { description - "Add container for mpls-in-udp under next-hops aft entry state."; + "Add encapsulate-stack under aft next-hops."; reference "2.7.0"; } From a688fae99ae9f62d39db70ddd4317741f7e8e383 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 5 Sep 2024 19:39:49 -0700 Subject: [PATCH 25/42] add state containers --- release/models/aft/openconfig-aft-common.yang | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index f6d60a9f3..6654ae3ec 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -289,26 +289,41 @@ submodule openconfig-aft-common { container gre { description "Container of nodes for GRE encapsulation."; - - uses aft-common-entry-nexthop-gre-state; + container state { + description + "State parameters relating to GRE encapsulation headers."; + uses aft-common-entry-nexthop-gre-state; + } } container ip { description "Container of nodes for IP encapsulation."; - uses aft-common-entry-nexthop-ip-state; + container state { + description + "State parameters relating to IP encapsulation headers."; + uses aft-common-entry-nexthop-ip-state; + } } container mpls { description "Container of nodes for IP encapsulation."; - uses aft-common-entry-nexthop-mpls-state; + container state { + description + "State parameters relating to MPLS encapsulation headers."; + uses aft-common-entry-nexthop-mpls-state; + } } container udp { description "Container of nodes for UDP encapsulation."; - uses aft-common-entry-nexthop-udp-state; + container state { + description + "State parameters relating to UDP encapsulation headers."; + uses aft-common-entry-nexthop-udp-state; + } } } } From 6b5fe6e97b3602b413821db14b7074b19ee81cdc Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 5 Sep 2024 19:41:15 -0700 Subject: [PATCH 26/42] fix whitespace --- release/models/aft/openconfig-aft-common.yang | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 6654ae3ec..943202aab 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -281,46 +281,46 @@ submodule openconfig-aft-common { } container state { - description + description "State parameters relating to encapsulation headers."; uses aft-common-nexthop-encap-headers-state; } container gre { - description + description "Container of nodes for GRE encapsulation."; container state { - description + description "State parameters relating to GRE encapsulation headers."; uses aft-common-entry-nexthop-gre-state; } } container ip { - description + description "Container of nodes for IP encapsulation."; container state { - description + description "State parameters relating to IP encapsulation headers."; uses aft-common-entry-nexthop-ip-state; } } container mpls { - description + description "Container of nodes for IP encapsulation."; container state { - description + description "State parameters relating to MPLS encapsulation headers."; uses aft-common-entry-nexthop-mpls-state; } } container udp { - description + description "Container of nodes for UDP encapsulation."; container state { - description + description "State parameters relating to UDP encapsulation headers."; uses aft-common-entry-nexthop-udp-state; } @@ -338,7 +338,7 @@ submodule openconfig-aft-common { "Operational state parameters relating to encapsulation headers."; leaf index { type uint8; - description + description "A pointer to an entry in an ordered list of encapsulation headers."; } } @@ -459,7 +459,7 @@ submodule openconfig-aft-common { Note: a swap operation is reflected by entries in the popped-mpls-label-stack and pushed-mpls-label-stack nodes. - + This node is deprecated and the encap-headers/encap-header tree should be used instead."; } @@ -593,8 +593,8 @@ submodule openconfig-aft-common { type oc-inet:port-number; description "Source UDP port number to use for the UDP header of the encapsulated - packet. - + packet. + When the payload packet is MPLS, then RFC 7510 - Encapsulating MPLS in UDP should be followed."; reference From 985c4f00ce580c87da951bd0668b9132f9ab3377 Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 6 Sep 2024 18:24:01 -0700 Subject: [PATCH 27/42] add when statements and more descriptions --- release/models/aft/openconfig-aft-common.yang | 48 +++++++++++++++---- release/models/aft/openconfig-aft-types.yang | 14 +----- 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 943202aab..4ac8f05f3 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -262,8 +262,20 @@ submodule openconfig-aft-common { "Container for packet encapsulation headers. When present, this container indicates that encapsulation of the packet matching the next-hop is performed using a stack of one or more packets defined - in the list encap-header."; + in the list encap-header. + + Each entry in the list must indicate an encapsulation type and + populate a container with the parameters for that encapsulation + header."; list encap-header { + description + "A list of headers added on top of a packet. The first entry + in the list is the inner-most packet at the bottom of the + stack. + + For example, in an encapsulation stack with MPLS in UDP, the + first index in the list is the MPLS packet and the second + index is UDP."; key "index"; leaf index { @@ -272,12 +284,13 @@ submodule openconfig-aft-common { } description "A unique index identifying an encapsulation header in a stack - of encapsulation headers. The first entry in the list is the - inner-most packet at the bottom of the stack. + of encapsulation headers."; + } - For example, in an encapsulation stack with MPLS in UDP, the - first, index in the list is the MPLS packet and the second - index is UDP."; + leaf type { + type oc-aftt:encapsulation-header-type; + description + "Defines which type of packet header should be used."; } container state { @@ -287,6 +300,7 @@ submodule openconfig-aft-common { } container gre { + when "../type = 'oc-aftt:GRE'"; description "Container of nodes for GRE encapsulation."; container state { @@ -296,9 +310,21 @@ submodule openconfig-aft-common { } } - container ip { + container ipv4 { + when "../type = 'oc-aftt:IPV4'"; description - "Container of nodes for IP encapsulation."; + "Container of nodes for IPv4 encapsulation."; + container state { + description + "State parameters relating to IP encapsulation headers."; + uses aft-common-entry-nexthop-ip-state; + } + } + + container ipv6 { + when "../type = 'oc-aftt:IPV6'"; + description + "Container of nodes for IPv6 encapsulation."; container state { description "State parameters relating to IP encapsulation headers."; @@ -307,8 +333,9 @@ submodule openconfig-aft-common { } container mpls { + when "../type = 'oc-aftt:MPLS'"; description - "Container of nodes for IP encapsulation."; + "Container of nodes for MPLS encapsulation."; container state { description "State parameters relating to MPLS encapsulation headers."; @@ -317,6 +344,8 @@ submodule openconfig-aft-common { } container udp { + when "../type = 'oc-aftt:UDPV4' or " + + "../type = 'oc-aftt:UDPV6'"; description "Container of nodes for UDP encapsulation."; container state { @@ -325,6 +354,7 @@ submodule openconfig-aft-common { uses aft-common-entry-nexthop-udp-state; } } + } } diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 338ae22f7..56d920b5f 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -95,19 +95,9 @@ module openconfig-aft-types { description "The encapsulation header is a VXLAN packet header"; } - enum MPLS_IN_UDPV4 { + enum UDP { description - "The encapsulation header is an MPLS packet inside an IPv4 UDP - packet header"; - reference - "RFC 7510 - Encapsulating MPLS in UDP."; - } - enum MPLS_IN_UDPV6 { - description - "The encapsulation header is an MPLS packet inside an IPv6 UDP - packet header"; - reference - "RFC 7510 - Encapsulating MPLS in UDP."; + "The encapsulation header is UDP packet header."; } } description From bb37bfc317cfa809d3a5e8c002badddbb0ee7a3c Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 6 Sep 2024 18:26:42 -0700 Subject: [PATCH 28/42] trim ws --- release/models/aft/openconfig-aft-common.yang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 4ac8f05f3..316b8ef0d 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -263,8 +263,8 @@ submodule openconfig-aft-common { container indicates that encapsulation of the packet matching the next-hop is performed using a stack of one or more packets defined in the list encap-header. - - Each entry in the list must indicate an encapsulation type and + + Each entry in the list must indicate an encapsulation type and populate a container with the parameters for that encapsulation header."; list encap-header { From cdeb6a905b825bbd37bae430e4cc310fb5b898b1 Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 6 Sep 2024 18:42:03 -0700 Subject: [PATCH 29/42] move type to state container --- release/models/aft/openconfig-aft-common.yang | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 316b8ef0d..250175adc 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -287,12 +287,6 @@ submodule openconfig-aft-common { of encapsulation headers."; } - leaf type { - type oc-aftt:encapsulation-header-type; - description - "Defines which type of packet header should be used."; - } - container state { description "State parameters relating to encapsulation headers."; @@ -371,6 +365,13 @@ submodule openconfig-aft-common { description "A pointer to an entry in an ordered list of encapsulation headers."; } + + leaf type { + type oc-aftt:encapsulation-header-type; + description + "Defines which type of packet header should be used."; + } + } grouping aft-common-entry-state { From 259717942cffd150f45b041abb0ae75a2a70bec0 Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 6 Sep 2024 18:46:38 -0700 Subject: [PATCH 30/42] fix when statements --- release/models/aft/openconfig-aft-common.yang | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 250175adc..8d2436fc6 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -294,7 +294,7 @@ submodule openconfig-aft-common { } container gre { - when "../type = 'oc-aftt:GRE'"; + when "../state/type = 'oc-aftt:GRE'"; description "Container of nodes for GRE encapsulation."; container state { @@ -305,7 +305,7 @@ submodule openconfig-aft-common { } container ipv4 { - when "../type = 'oc-aftt:IPV4'"; + when "../state/type = 'oc-aftt:IPV4'"; description "Container of nodes for IPv4 encapsulation."; container state { @@ -316,7 +316,7 @@ submodule openconfig-aft-common { } container ipv6 { - when "../type = 'oc-aftt:IPV6'"; + when "../state/type = 'oc-aftt:IPV6'"; description "Container of nodes for IPv6 encapsulation."; container state { @@ -327,7 +327,7 @@ submodule openconfig-aft-common { } container mpls { - when "../type = 'oc-aftt:MPLS'"; + when "../state/type = 'oc-aftt:MPLS'"; description "Container of nodes for MPLS encapsulation."; container state { @@ -338,8 +338,8 @@ submodule openconfig-aft-common { } container udp { - when "../type = 'oc-aftt:UDPV4' or " + - "../type = 'oc-aftt:UDPV6'"; + when "../state/type = 'oc-aftt:UDPV4' or " + + "../state/type = 'oc-aftt:UDPV6'"; description "Container of nodes for UDP encapsulation."; container state { From 4cb3bd95a3eadd9834008ae93c6c9239e3a9ee53 Mon Sep 17 00:00:00 2001 From: dplore Date: Mon, 9 Sep 2024 21:08:09 -0700 Subject: [PATCH 31/42] move pop-top-label --- release/models/aft/openconfig-aft-common.yang | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 8d2436fc6..cc7b05b47 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -471,12 +471,16 @@ submodule openconfig-aft-common { leaf pop-top-label { type boolean; default false; + status deprecated; description "Flag that controls pop action, i.e., the top-most MPLS label should be popped from the packet when switched by the system. The top-most MPLS label associated with pop action is equal to - the label key used in 'mpls' AFT 'label-entry' list."; + the label key used in 'mpls' AFT 'label-entry' list. + + This node is deprecated and the encap-headers/encap-header tree + should be used instead."; } leaf-list pushed-mpls-label-stack { @@ -574,6 +578,17 @@ submodule openconfig-aft-common { EXP bits."; } + leaf pop-top-label { + type boolean; + default false; + description + "Flag that controls pop action, i.e., the top-most MPLS label + should be popped from the packet when switched by the system. + + The top-most MPLS label associated with pop action is equal to + the label key used in 'mpls' AFT 'label-entry' list."; + } + leaf-list pushed-mpls-label-stack { type oc-mplst:mpls-label-stack; ordered-by user; From 7b5218e6d22639f969b5e54cf9497e3c5e112f81 Mon Sep 17 00:00:00 2001 From: dplore Date: Mon, 9 Sep 2024 21:13:48 -0700 Subject: [PATCH 32/42] deprecate encapslate-header --- release/models/aft/openconfig-aft-common.yang | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index cc7b05b47..4ebb41c4e 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -501,10 +501,14 @@ submodule openconfig-aft-common { leaf encapsulate-header { type oc-aftt:encapsulation-header-type; + status deprecated; description "When forwarding a packet to the specified next-hop the local system performs an encapsulation of the packet - adding the - specified header type."; + specified header type. + + This node is deprecated and encap-headers/encap-header/state/type + should be used instead."; } leaf decapsulate-header { From a07d2d7ceff9220e059a4db1ac014eb212e8a19d Mon Sep 17 00:00:00 2001 From: dplore Date: Mon, 9 Sep 2024 21:25:25 -0700 Subject: [PATCH 33/42] trim ws --- release/models/aft/openconfig-aft-common.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 4ebb41c4e..a673ad759 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -506,7 +506,7 @@ submodule openconfig-aft-common { "When forwarding a packet to the specified next-hop the local system performs an encapsulation of the packet - adding the specified header type. - + This node is deprecated and encap-headers/encap-header/state/type should be used instead."; } From 041927452095aac00e9cce83a75c52d910874be5 Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 11 Sep 2024 16:57:41 -0700 Subject: [PATCH 34/42] create vxlan encap container and move vni-label and tunnel-src-ip-address --- release/models/aft/openconfig-aft-common.yang | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index a673ad759..693bec875 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -349,6 +349,17 @@ submodule openconfig-aft-common { } } + container vxlan { + when "../state/type = 'oc-aftt:VXLAN'"; + description + "Container of nodes for VXLAN encapsulation."; + container state { + description + "State parameters relating to VXLAN encapsulation headers."; + uses aft-common-entry-nexthop-vxlan-state; + } + } + } } @@ -415,18 +426,26 @@ submodule openconfig-aft-common { leaf vni-label { type oc-evpn-types:evi-id; + status deprecated; description "Where applicable, the next hop label representing the virtual network identifier (VNI) for the forwarding entry. This leaf is applicable only to next-hops which include VXLAN encapsulation - header information"; + header information. + + This leaf is deprecated. The encap-headers/encap-header/xvlan tree + should be used instead."; } leaf tunnel-src-ip-address { type oc-inet:ip-address; + status deprecated; description "Where applicable this represents the vxlan tunnel source ip address. - For VXLAN this represents the source VTEP ip address"; + For VXLAN this represents the source VTEP ip address. + + This leaf is deprecated. The encap-headers/encap-header/xvlan tree + should be used instead."; } } @@ -664,6 +683,27 @@ submodule openconfig-aft-common { } } + grouping aft-common-entry-nexthop-vxlan-state { + description + "VXLAN encapsulation applied on top of a packet."; + + leaf vni-label { + type oc-evpn-types:evi-id; + description + "Where applicable, the next hop label representing the virtual + network identifier (VNI) for the forwarding entry. This leaf is + applicable only to next-hops which include VXLAN encapsulation + header information"; + } + + leaf tunnel-src-ip-address { + type oc-inet:ip-address; + description + "Where applicable this represents the vxlan tunnel source ip address. + For VXLAN this represents the source VTEP ip address"; + } + } + grouping aft-common-install-protocol { description "Grouping for a common reference to the protocol which From b406a74339be28e1e3cfcc5cc67e002cc9978080 Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 11 Sep 2024 17:02:24 -0700 Subject: [PATCH 35/42] trim ws --- release/models/aft/openconfig-aft-common.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 693bec875..17de8cee1 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -432,7 +432,7 @@ submodule openconfig-aft-common { network identifier (VNI) for the forwarding entry. This leaf is applicable only to next-hops which include VXLAN encapsulation header information. - + This leaf is deprecated. The encap-headers/encap-header/xvlan tree should be used instead."; } From a85fa26e76b7a262a58965b31d95594dbda23eb3 Mon Sep 17 00:00:00 2001 From: dplore Date: Thu, 19 Sep 2024 11:06:00 -0700 Subject: [PATCH 36/42] revise version description --- release/models/aft/openconfig-aft-common.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 17de8cee1..8179ec7af 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -27,7 +27,7 @@ submodule openconfig-aft-common { revision "2024-09-05" { description - "Add encapsulate-stack under aft next-hops."; + "Add encap-headers to AFT model."; reference "2.7.0"; } From a092c7c4daa755b3e8e3e2aab58e53511098da86 Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 25 Sep 2024 14:29:24 -0700 Subject: [PATCH 37/42] remove explicit deprecation and expand description --- release/models/aft/openconfig-aft-common.yang | 64 ++++++++++--------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 8179ec7af..d1bfe7bba 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -223,14 +223,15 @@ submodule openconfig-aft-common { container ip-in-ip { description - "When specified, the packet has an IP-in-IP header applied to it before - forwarding to the specified next-hop. This node is deprecated and - the encap-headers/encap-header tree should be used instead."; - status deprecated; + "When specified, the packet has an IP-in-IP header applied to it + before forwarding to the specified next-hop. + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; container state { config false; - status deprecated; description "State parameters relating to IP-in-IP encapsulation."; uses aft-common-entry-nexthop-ip-state; @@ -244,15 +245,15 @@ submodule openconfig-aft-common { it before forwarding to the specified next-hop. encapsulate-header leaf should be set to GRE for this to apply. - This node is deprecated and the encap-headers/encap-header tree - should be used instead."; - status deprecated; + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; container state { config false; description "State parameters relating to GRE encapsulation."; - status deprecated; uses aft-common-entry-nexthop-gre-state; } } @@ -426,26 +427,28 @@ submodule openconfig-aft-common { leaf vni-label { type oc-evpn-types:evi-id; - status deprecated; description "Where applicable, the next hop label representing the virtual network identifier (VNI) for the forwarding entry. This leaf is applicable only to next-hops which include VXLAN encapsulation header information. - This leaf is deprecated. The encap-headers/encap-header/xvlan tree - should be used instead."; + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf tunnel-src-ip-address { type oc-inet:ip-address; - status deprecated; description "Where applicable this represents the vxlan tunnel source ip address. For VXLAN this represents the source VTEP ip address. - This leaf is deprecated. The encap-headers/encap-header/xvlan tree - should be used instead."; + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } } @@ -490,44 +493,47 @@ submodule openconfig-aft-common { leaf pop-top-label { type boolean; default false; - status deprecated; description "Flag that controls pop action, i.e., the top-most MPLS label - should be popped from the packet when switched by the system. + should be popped from the packet when switched by the system. The top-most MPLS label associated with pop action is equal to the label key used in 'mpls' AFT 'label-entry' list. - This node is deprecated and the encap-headers/encap-header tree - should be used instead."; + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf-list pushed-mpls-label-stack { type oc-mplst:mpls-label-stack; ordered-by user; - status deprecated; description "The MPLS label stack imposed when forwarding packets to the - next-hop. See the description of the type - oc-mplst:mpls-label-stack for encoding rules. + next-hop. See the description of the type + oc-mplst:mpls-label-stack for encoding rules. - Note: a swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes. + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and pushed-mpls-label-stack nodes. - This node is deprecated and the encap-headers/encap-header tree - should be used instead."; + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf encapsulate-header { type oc-aftt:encapsulation-header-type; - status deprecated; description "When forwarding a packet to the specified next-hop the local system performs an encapsulation of the packet - adding the specified header type. - This node is deprecated and encap-headers/encap-header/state/type - should be used instead."; + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf decapsulate-header { From 7f9e4e8d4f412cf6aff0ddba054139b78ac2cac2 Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 2 Oct 2024 11:55:15 -0700 Subject: [PATCH 38/42] use ipv4/v6 for udp encap and clarify descriptions --- release/models/aft/openconfig-aft-common.yang | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index d1bfe7bba..64b43a63d 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -268,6 +268,7 @@ submodule openconfig-aft-common { Each entry in the list must indicate an encapsulation type and populate a container with the parameters for that encapsulation header."; + list encap-header { description "A list of headers added on top of a packet. The first entry @@ -277,6 +278,7 @@ submodule openconfig-aft-common { For example, in an encapsulation stack with MPLS in UDP, the first index in the list is the MPLS packet and the second index is UDP."; + key "index"; leaf index { @@ -308,7 +310,9 @@ submodule openconfig-aft-common { container ipv4 { when "../state/type = 'oc-aftt:IPV4'"; description - "Container of nodes for IPv4 encapsulation."; + "Container of nodes for UDP in IPv4 encapsulation. When this + container is used, an IPv4 packet with no transport header + is added to the encapsulation list."; container state { description "State parameters relating to IP encapsulation headers."; @@ -319,7 +323,9 @@ submodule openconfig-aft-common { container ipv6 { when "../state/type = 'oc-aftt:IPV6'"; description - "Container of nodes for IPv6 encapsulation."; + "Container of nodes for UDP in IPv6 encapsulation. When this + container is used, an IPv6 packet with no transport header + is added to the encapsulation list."; container state { description "State parameters relating to IP encapsulation headers."; @@ -338,15 +344,31 @@ submodule openconfig-aft-common { } } - container udp { - when "../state/type = 'oc-aftt:UDPV4' or " + - "../state/type = 'oc-aftt:UDPV6'"; + container udp-v4 { + when "../state/type = 'oc-aftt:UDPV4'"; description - "Container of nodes for UDP encapsulation."; + "Container of nodes for UDP in IPv4 encapsulation. When this + container is used, an IPv4 packet with a UDP header is added + to the encapsulation list."; container state { description - "State parameters relating to UDP encapsulation headers."; - uses aft-common-entry-nexthop-udp-state; + "State parameters relating to UDP in IPv4 encapsulation + headers."; + uses aft-common-entry-nexthop-encap-udp-state; + } + } + + container udp-v6 { + when "../state/type = 'oc-aftt:UDPV6'"; + description + "Container of nodes for UDP in IPv6 encapsulation. When this + container is used, an IPv6 packet with a UDP header is added + to the encapsulation list."; + container state { + description + "State parameters relating to UDP in IPv6 encapsulation + headers."; + uses aft-common-entry-nexthop-encap-udp-state; } } @@ -631,26 +653,26 @@ submodule openconfig-aft-common { } } - grouping aft-common-entry-nexthop-udp-state { + grouping aft-common-entry-nexthop-encap-udp-state { description "UDP encapsulation applied on top of a packet."; leaf src-ip { type oc-inet:ip-address; description - "The source IP address for the MPLS in UDP encapsulation."; + "The source IP address for IP/UDP encapsulation."; } leaf dst-ip { type oc-inet:ip-address; description - "Destination IP address to use for the encapsulated packet."; + "Destination IP address for IP/UDP encapsulation."; } leaf ip-dscp { type oc-inet:dscp; description - "IP dscp value to use for the UDP header of the encapsulated + "IP DSCP value to use for the UDP header of the encapsulated packet."; } From 377974a623db8a3c698c266663afc627f683c895 Mon Sep 17 00:00:00 2001 From: dplore Date: Wed, 2 Oct 2024 12:05:20 -0700 Subject: [PATCH 39/42] fix mpls-label-stack indent --- release/models/mpls/openconfig-mpls-types.yang | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/models/mpls/openconfig-mpls-types.yang b/release/models/mpls/openconfig-mpls-types.yang index 8c2f439d6..7deaeac00 100644 --- a/release/models/mpls/openconfig-mpls-types.yang +++ b/release/models/mpls/openconfig-mpls-types.yang @@ -487,15 +487,15 @@ module openconfig-mpls-types { typedef mpls-label-stack { type mpls-label; - description - "Type used to specify a stack of MPLS label values. This type must be - used in a leaf-list which is ordered by user. The the stack of labels - is encoded where the first entry in the list is the label at the bottom - of the stack. - - For example, a packet with a label stack of two labels, the bottom - label being 42 and the top label being 8072 will be represented with - a leaf-list of [42, 8072]."; + description + "Type used to specify a stack of MPLS label values. This type must be + used in a leaf-list which is ordered by user. The the stack of labels + is encoded where the first entry in the list is the label at the bottom + of the stack. + + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]."; } typedef tunnel-type { From 533a276017394b635a0e09d63468c20dd7e8580a Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 4 Oct 2024 15:22:23 -0700 Subject: [PATCH 40/42] do not add pop-top-label to mpls container, refactor mpls-label-stack as a grouping instead of typedef, fix comments --- release/models/aft/openconfig-aft-common.yang | 117 +++++++++++------- .../models/mpls/openconfig-mpls-types.yang | 21 +--- 2 files changed, 75 insertions(+), 63 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 64b43a63d..09fa97a97 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -230,10 +230,12 @@ submodule openconfig-aft-common { encap-headers/encap-header tree. A future release of OpenConfig will deprecate this node in favor of the encap-headers/encap-header subtree."; + container state { config false; description "State parameters relating to IP-in-IP encapsulation."; + uses aft-common-entry-nexthop-ip-state; } } @@ -250,20 +252,22 @@ submodule openconfig-aft-common { encap-headers/encap-header tree. A future release of OpenConfig will deprecate this node in favor of the encap-headers/encap-header subtree."; + container state { config false; description "State parameters relating to GRE encapsulation."; + uses aft-common-entry-nexthop-gre-state; } } container encap-headers { description - "Container for packet encapsulation headers. When present, this - container indicates that encapsulation of the packet matching the - next-hop is performed using a stack of one or more packets defined - in the list encap-header. + "Container for packet encapsulation headers. When leaves in this + container are populated, it indicates encapsulation of the packet + matching the next-hop is performed using a stack of one or more + headers defined in the list encap-header. Each entry in the list must indicate an encapsulation type and populate a container with the parameters for that encapsulation @@ -271,13 +275,14 @@ submodule openconfig-aft-common { list encap-header { description - "A list of headers added on top of a packet. The first entry - in the list is the inner-most packet at the bottom of the - stack. + "A list of headers added on top of a packet ordered by the + index value. The inner-most header is the 0th value and is + adjacent to the original packet. Additional headers may be + added in index order. - For example, in an encapsulation stack with MPLS in UDP, the - first index in the list is the MPLS packet and the second - index is UDP."; + For example, in an encapsulation stack for MPLS in UDPv4, the + first index in the list is the MPLS header and the second + index is a UDPv4 header."; key "index"; @@ -293,6 +298,7 @@ submodule openconfig-aft-common { container state { description "State parameters relating to encapsulation headers."; + uses aft-common-nexthop-encap-headers-state; } @@ -300,9 +306,11 @@ submodule openconfig-aft-common { when "../state/type = 'oc-aftt:GRE'"; description "Container of nodes for GRE encapsulation."; + container state { description "State parameters relating to GRE encapsulation headers."; + uses aft-common-entry-nexthop-gre-state; } } @@ -313,9 +321,11 @@ submodule openconfig-aft-common { "Container of nodes for UDP in IPv4 encapsulation. When this container is used, an IPv4 packet with no transport header is added to the encapsulation list."; + container state { description "State parameters relating to IP encapsulation headers."; + uses aft-common-entry-nexthop-ip-state; } } @@ -326,9 +336,11 @@ submodule openconfig-aft-common { "Container of nodes for UDP in IPv6 encapsulation. When this container is used, an IPv6 packet with no transport header is added to the encapsulation list."; + container state { description "State parameters relating to IP encapsulation headers."; + uses aft-common-entry-nexthop-ip-state; } } @@ -337,9 +349,11 @@ submodule openconfig-aft-common { when "../state/type = 'oc-aftt:MPLS'"; description "Container of nodes for MPLS encapsulation."; + container state { description "State parameters relating to MPLS encapsulation headers."; + uses aft-common-entry-nexthop-mpls-state; } } @@ -348,12 +362,14 @@ submodule openconfig-aft-common { when "../state/type = 'oc-aftt:UDPV4'"; description "Container of nodes for UDP in IPv4 encapsulation. When this - container is used, an IPv4 packet with a UDP header is added + container is used, an IPv4 header with a UDP header is added to the encapsulation list."; + container state { description "State parameters relating to UDP in IPv4 encapsulation headers."; + uses aft-common-entry-nexthop-encap-udp-state; } } @@ -362,12 +378,14 @@ submodule openconfig-aft-common { when "../state/type = 'oc-aftt:UDPV6'"; description "Container of nodes for UDP in IPv6 encapsulation. When this - container is used, an IPv6 packet with a UDP header is added + container is used, an IPv6 header with a UDP header is added to the encapsulation list."; + container state { description "State parameters relating to UDP in IPv6 encapsulation headers."; + uses aft-common-entry-nexthop-encap-udp-state; } } @@ -376,9 +394,11 @@ submodule openconfig-aft-common { when "../state/type = 'oc-aftt:VXLAN'"; description "Container of nodes for VXLAN encapsulation."; + container state { description "State parameters relating to VXLAN encapsulation headers."; + uses aft-common-entry-nexthop-vxlan-state; } } @@ -394,6 +414,7 @@ submodule openconfig-aft-common { grouping aft-common-nexthop-encap-headers-state { description "Operational state parameters relating to encapsulation headers."; + leaf index { type uint8; description @@ -465,7 +486,7 @@ submodule openconfig-aft-common { type oc-inet:ip-address; description "Where applicable this represents the vxlan tunnel source ip address. - For VXLAN this represents the source VTEP ip address. + For VXLAN this represents the source VTEP IP address. This node must be supported in addition to the encap-headers/encap-header tree. A future release of OpenConfig @@ -520,25 +541,29 @@ submodule openconfig-aft-common { should be popped from the packet when switched by the system. The top-most MPLS label associated with pop action is equal to - the label key used in 'mpls' AFT 'label-entry' list. - - This node must be supported in addition to the - encap-headers/encap-header tree. A future release of OpenConfig - will deprecate this node in favor of the - encap-headers/encap-header subtree."; + the label key used in 'mpls' AFT 'label-entry' list."; } leaf-list pushed-mpls-label-stack { - type oc-mplst:mpls-label-stack; + type oc-mplst:mpls-label; ordered-by user; description "The MPLS label stack imposed when forwarding packets to the - next-hop. See the description of the type - oc-mplst:mpls-label-stack for encoding rules. + next-hop + - the stack is encoded as a leaf list whereby the order of the + entries is such that the first entry in the list is the + label at the bottom of the stack to be pushed. - Note: a swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes. + To this end, a packet which is to forwarded to a device using + a service label of 42, and a transport label of 8072 will be + represented with a label stack list of [42, 8072]. + + The MPLS label stack list is ordered by the user, such that no + system re-ordering of leaves is permitted by the system. + A swap operation is reflected by entries in the + popped-mpls-label-stack and pushed-mpls-label-stack nodes. + This node must be supported in addition to the encap-headers/encap-header tree. A future release of OpenConfig will deprecate this node in favor of the @@ -628,31 +653,37 @@ submodule openconfig-aft-common { "The value of the MPLS traffic class (TC) bits, formerly known as the EXP bits."; } + uses aft-common-entry-mpls-stack; - leaf pop-top-label { - type boolean; - default false; + } + + grouping aft-common-entry-mpls-stack { description - "Flag that controls pop action, i.e., the top-most MPLS label - should be popped from the packet when switched by the system. + "A definition for an MPLS label stack represented by a leaf-list. - The top-most MPLS label associated with pop action is equal to - the label key used in 'mpls' AFT 'label-entry' list."; - } + MPLS label stack imposed when forwarding packets to the + next-hop. See the description of the type + oc-mplst:mpls-label-stack for encoding rules. - leaf-list pushed-mpls-label-stack { - type oc-mplst:mpls-label-stack; + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + + leaf-list mpls-label-stack { + type oc-mplst:mpls-label; ordered-by user; description - "The MPLS label stack imposed when forwarding packets to the - next-hop. See the description of the type - oc-mplst:mpls-label-stack for encoding rules. - - Note: a swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + "A stack of MPLS label values. The first entry in the list is the + label at the bottom of the stack. The bottom of the stack is adjacent + to the MPLS payload. + + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]. The resulting packet, starting with the + beginning of the packet will be '[8072][42][Payload]'."; } } + grouping aft-common-entry-nexthop-encap-udp-state { description "UDP encapsulation applied on top of a packet."; @@ -669,10 +700,10 @@ submodule openconfig-aft-common { "Destination IP address for IP/UDP encapsulation."; } - leaf ip-dscp { + leaf dscp { type oc-inet:dscp; description - "IP DSCP value to use for the UDP header of the encapsulated + "DSCP value to use for the UDP header of the encapsulated packet."; } @@ -681,7 +712,7 @@ submodule openconfig-aft-common { description "Source UDP port number to use for the UDP header of the encapsulated packet. The source UDP port should be derived from the payload - packet entropy. The extact methodology is implementation dependent, + packet entropy. The exact methodology is implementation dependent, but for example, the port could be derived from an entropy hash of the payload or the source port (if present) of the payload."; } diff --git a/release/models/mpls/openconfig-mpls-types.yang b/release/models/mpls/openconfig-mpls-types.yang index 7deaeac00..765e467cf 100644 --- a/release/models/mpls/openconfig-mpls-types.yang +++ b/release/models/mpls/openconfig-mpls-types.yang @@ -19,13 +19,7 @@ module openconfig-mpls-types { description "General types for MPLS / TE data model"; - oc-ext:openconfig-version "3.6.0"; - - revision "2024-07-24" { - description - "Add mpls-label-stack typdef"; - reference "3.6.0"; - } + oc-ext:openconfig-version "3.5.0"; revision "2023-12-14" { description @@ -485,19 +479,6 @@ module openconfig-mpls-types { reference "RFC 3032 - MPLS Label Stack Encoding"; } - typedef mpls-label-stack { - type mpls-label; - description - "Type used to specify a stack of MPLS label values. This type must be - used in a leaf-list which is ordered by user. The the stack of labels - is encoded where the first entry in the list is the label at the bottom - of the stack. - - For example, a packet with a label stack of two labels, the bottom - label being 42 and the top label being 8072 will be represented with - a leaf-list of [42, 8072]."; - } - typedef tunnel-type { type enumeration { enum P2P { From 2090bd154fb8c1ed5b2ac2664fc2250109781c0e Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 4 Oct 2024 15:28:13 -0700 Subject: [PATCH 41/42] trim ws --- release/models/aft/openconfig-aft-common.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 09fa97a97..d5a717f3b 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -563,7 +563,7 @@ submodule openconfig-aft-common { A swap operation is reflected by entries in the popped-mpls-label-stack and pushed-mpls-label-stack nodes. - + This node must be supported in addition to the encap-headers/encap-header tree. A future release of OpenConfig will deprecate this node in favor of the From c47f0c8422e0a5a929b7a40a521e7a645cf76b74 Mon Sep 17 00:00:00 2001 From: dplore Date: Fri, 4 Oct 2024 15:33:19 -0700 Subject: [PATCH 42/42] don't use a grouping for mpls-label-stack since there is only 1 reference. --- release/models/aft/openconfig-aft-common.yang | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index d5a717f3b..50eac8d8f 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -653,20 +653,6 @@ submodule openconfig-aft-common { "The value of the MPLS traffic class (TC) bits, formerly known as the EXP bits."; } - uses aft-common-entry-mpls-stack; - - } - - grouping aft-common-entry-mpls-stack { - description - "A definition for an MPLS label stack represented by a leaf-list. - - MPLS label stack imposed when forwarding packets to the - next-hop. See the description of the type - oc-mplst:mpls-label-stack for encoding rules. - - Note: a swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; leaf-list mpls-label-stack { type oc-mplst:mpls-label; @@ -679,7 +665,10 @@ submodule openconfig-aft-common { For example, a packet with a label stack of two labels, the bottom label being 42 and the top label being 8072 will be represented with a leaf-list of [42, 8072]. The resulting packet, starting with the - beginning of the packet will be '[8072][42][Payload]'."; + beginning of the packet will be '[8072][42][Payload]'. + + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and the pushed-mpls-label-stack"; } }