Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved decap sub test cases from TE-18.1 README to a seperate directory #3673

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
81e4ec4
Moved decap sub test cases from TE-18.1 README to a seperate directory
vishnureddybadveli Jan 1, 2025
68a2bc8
Create README.md
vishnureddybadveli Jan 1, 2025
b98d9c2
Moved decap sub test cases from TE-18.1 README to a seperate directory
vishnureddybadveli Jan 1, 2025
fadc293
Create README.md
vishnureddybadveli Jan 1, 2025
07ea35e
Created README for decap sub test cases in new directory
vishnureddybadveli Jan 1, 2025
18de9d3
Update README.md
vishnureddybadveli Jan 6, 2025
acc6421
Update feature/gribi/otg_tests/mpls_decap/README.md
vishnureddybadveli Jan 9, 2025
c1166d4
Update feature/gribi/otg_tests/mpls_decap/README.md
vishnureddybadveli Jan 9, 2025
636abf6
Update feature/gribi/otg_tests/mpls_decap/README.md
vishnureddybadveli Jan 9, 2025
647d8cf
Update README.md
vishnureddybadveli Jan 9, 2025
3da03c3
Update testregistry.textproto
vishnureddybadveli Jan 9, 2025
db78b3f
Create README.md
vishnureddybadveli Jan 9, 2025
c0a0d09
Merge branch 'decap' of https://github.com/vishnureddybadveli/feature…
vishnureddybadveli Jan 9, 2025
3807df6
Update README.md
vishnureddybadveli Jan 9, 2025
18dd2c2
Delete feature/gribi/otg_tests/mpls_decap directory
vishnureddybadveli Jan 9, 2025
0602b4d
Update testregistry.textproto
vishnureddybadveli Jan 9, 2025
be094e1
Merge branch 'main' into decap
vishnureddybadveli Jan 9, 2025
8b266d0
Merge branch 'main' into decap
vishnureddybadveli Jan 10, 2025
b307603
Merge branch 'main' into decap
dplore Jan 10, 2025
ecd00ef
Merge branch 'main' into decap
vishnureddybadveli Jan 13, 2025
c2f739f
Update testregistry.textproto
vishnureddybadveli Jan 13, 2025
9d09856
Update README.md
vishnureddybadveli Jan 13, 2025
a497b74
Update PF-1.7.1, PF-1.7.2 test cases
vishnureddybadveli Jan 13, 2025
1141b98
Merge branch 'main' into decap
vishnureddybadveli Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 2 additions & 78 deletions feature/gribi/otg_tests/mpls_in_udp/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# TE-18.1 gRIBI MPLS in UDP Encapsulation and Decapsulation
# TE-18.1 gRIBI MPLS in UDP Encapsulation

Create AFT entries using gRIBI to match on next hop group in a
network-instance and encapsulate the matching packets in MPLS in UDP.

Create a policy routing configuration using gNMI to decapsulate MPLS
in UDP packets which are sent to a loopback address and apply to
the DUT.
network-instance and encapsulate the matching packets in MPLS in UDP with outer header as IPv6 Header.

The MPLS in UDP encapsulation is expected to follow
[rfc7510](https://datatracker.ietf.org/doc/html/rfc7510#section-3),
Expand Down Expand Up @@ -186,72 +182,6 @@ encapsulate in GRE.
* Generate traffic from ATE port 1 to ATE port 2
* Validate ATE port 2 receives GRE traffic with correct inner and outer IPs

### TE-18.1.3 - MPLS in GRE decapsulation set by gNMI

Canonical OpenConfig for policy forwarding, matching IP prefix with action
decapsulate in GRE. # TODO: Move to dedicated README

```yaml
openconfig-network-instance:
network-instances:
- network-instance: "DEFAULT"
afts:
policy-forwarding:
policies:
policy: "default decap rule"
config:
policy-id: "default decap rule"
type: PBR_POLICY
rules:
rule: 1
config:
sequence-id: 1
ipv6:
config:
destination-address: "decap_loopback_ipv6"
action:
decapsulate-mpls-in-gre: TRUE # TODO: add to OC model/PR in progress
```

* Push the gNMI the policy forwarding configuration
* Push the configuration to DUT using gnmi.Set with REPLACE option
* Configure ATE port 1 with traffic flow which matches the decap loopback IP address
* Generate traffic from ATE port 1
* Validate ATE port 2 receives packets with correct VLAN and the inner inner_decap_ipv6

### TE-18.1.4 - MPLS in UDP decapsulation set by gNMI

Canonical OpenConfig for policy forwarding, matching IP prefix with action
decapsulate MPLS in UDP. # TODO: Move to dedicated README

```yaml
openconfig-network-instance:
network-instances:
- network-instance: "DEFAULT"
afts:
policy-forwarding:
policies:
policy: "default decap rule"
config:
policy-id: "default decap rule"
type: PBR_POLICY
rules:
rule: 1
config:
sequence-id: 1
ipv6:
config:
destination-address: "decap_loopback_ipv6"
action:
decapsulate-mpls-in-udp: TRUE
```

* Push the gNMI the policy forwarding configuration
* Push the configuration to DUT using gnmi.Set with REPLACE option
* Configure ATE port 1 with traffic flow
* Flow should have a packet encap format : outer_decap_udp_ipv6 <- MPLS label <- inner_decap_ipv6
* Generate traffic from ATE port 1
* Validate ATE port 2 receives the innermost IPv4 traffic with correct VLAN and inner_decap_ipv6

## OpenConfig Path and RPC Coverage

Expand Down Expand Up @@ -294,12 +224,6 @@ paths:
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encap-headers/encap-header/gre/config/ip-ttl:
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encap-headers/encap-header/gre/config/source-ip:

# Paths added for TE-18.1.3 - MPLS in GRE decapsulation set by gNMI
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/destination-address:
# TODO: /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decapsulate-mpls-in-gre:

vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved
# Paths added for TE-18.1.4 - MPLS in UDP decapsulation set by gNMI
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decapsulate-mpls-in-udp:

rpcs:
gnmi:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# PF-1.7 Decapsulate MPLS in GRE and UDP

Create a policy-forwarding configuration using gNMI to decapsulate MPLS
in GRE and UDP packets which are sent to a IP from a decap pool or loopback address and apply to
the DUT.

## Topology

* [`featureprofiles/topologies/atedut_2.testbed`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed)

## Test setup

TODO: Complete test environment setup steps

inner_ipv6_dst_A = "2001:aa:bb::1/128"
inner_ipv6_dst_B = "2001:aa:bb::2/128"
inner_ipv6_default = "::/0"

ipv4_inner_dst_A = "10.5.1.1/32"
ipv4_inner_dst_B = "10.5.1.2/32"
ipv4_inner_default = "0.0.0.0/0"

outer_ipv6_src = "2001:f:a:1::0"
outer_ipv6_dst_A = "2001:f:c:e::1"
outer_ipv6_dst_B = "2001:f:c:e::2"
outer_ipv6_dst_def = "2001:1:1:1::0"
outer_dst_udp_port = "6635"
outer_dscp = "26"
outer_ip-ttl = "64"

## Procedure

### PF-1.7.1 - MPLS in GRE decapsulation set by gNMI
vishnureddybadveli marked this conversation as resolved.
Show resolved Hide resolved

Canonical OpenConfig for policy forwarding, matching IP prefix with action
decapsulate in GRE.

```json
{
"openconfig-network-instance": {
"network-instances": [
{
"afts": {
"policy-forwarding": {
"policies": [
{
"config": {
"policy-id": "default decap rule",
"type": "PBR_POLICY"
},
"policy": "default decap rule",
"rules": [
{
"config": {
"sequence-id": 1,
},
"ipv6": {
"config": {
"destination-address": "decap_ipv6"
}
},
"action": {
"decapsulate-mpls-in-gre": TRUE
}
}
]
}
]
}
}
}
]
}
}
```
* Push the gNMI the policy forwarding configuration
* Push the configuration to DUT using gnmi.Set with REPLACE option
* Configure ATE port 1 with traffic flow
* Flow should have a packet encap format : outer_decap_gre_ipv6 <- MPLS label <- inner_decap_ipv6
* Generate traffic from ATE port 1
* Validate ATE port 2 receives the innermost IPv4 traffic with correct VLAN and inner_decap_ipv6

### PF-1.7.2 - MPLS in UDP decapsulation set by gNMI

Canonical OpenConfig for policy forwarding, matching IP prefix with action
decapsulate MPLS in UDP.

```json
{
"openconfig-network-instance": {
"network-instances": [
{
"afts": {
"policy-forwarding": {
"policies": [
{
"config": {
"policy-id": "default decap rule",
"type": "PBR_POLICY"
},
"policy": "default decap rule",
"rules": [
{
"config": {
"sequence-id": 1,
},
"ipv6": {
"config": {
"destination-address": "decap_ipv6"
}
},
"action": {
"decapsulate-mpls-in-udp": TRUE
}
}
]
}
]
}
}
}
]
}
}
```
* Push the gNMI the policy forwarding configuration
* Push the configuration to DUT using gnmi.Set with REPLACE option
* Configure ATE port 1 with traffic flow
* Flow should have a packet encap format : outer_decap_udp_ipv6 <- MPLS label <- inner_decap_ipv6
* Generate traffic from ATE port 1
* Validate ATE port 2 receives the innermost IPv4 traffic with correct VLAN and inner_decap_ipv6

## OpenConfig Path and RPC Coverage

```yaml
paths:

# Paths added for PF-1.7.1 - MPLS in GRE decapsulation set by gNMI
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/destination-address:
# TODO: /network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decapsulate-mpls-in-gre:

# Paths added for PF-1.7.2 - MPLS in UDP decapsulation set by gNMI
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decapsulate-mpls-in-udp:


rpcs:
gnmi:
gNMI.Set:
union_replace: true
replace: true
gNMI.Subscribe:
on_change: true

```

## Required DUT platform

* FFF
8 changes: 7 additions & 1 deletion testregistry.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ test: {
readme: ""
exec: " "
}
test: {
id: "PF-1.7"
description: "Decapsulate MPLS in GRE and UDP"
readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/policy_forwarding/otg_tests/mpls_gre_udp_decap_test/README.md"
exec: " "
}
test: {
id: "PLT-1.1"
description: "Interface breakout Test"
Expand Down Expand Up @@ -1829,4 +1835,4 @@ test: {
description: "AFT Streaming"
readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/aft/aft_base/otg_tests/aft_prefixcounters/README.md"
exec: " "
}
}
Loading