encap_gre_ipv4 - openconfig/featureprofiles GitHub Wiki
The test verifies policy forwarding(PF) encapsulation action to IPv4 GRE tunnel when matching on source/destination.
-
DUT has an ingress port and 2 egress ports.
| | --eBGP-- | ATE Port 2 | [ ATE Port 1 ] ---- | DUT | | | | | --eBGP-- | ATE Port 3 |
-
Traffic is generated from ATE Port 1.
-
ATE Port 2 is used as the destination port for encapsulated traffic.
-
ATE Port 3 is used as the fallback destination for pass-through traffic.
-
All DUT Ports are configured as a singleton IP interfaces. Configure MTU of 9216 (L2) on ATE Port1, MTU 2000 on ATE Port 2, 3
-
IPv4 and IPv6 static routes to test destination networks IPV4-DST/IPV6-DST are configured on DUT towards ATE Port 3.
-
Another set of IPv4 static routes to 32x IPv4 GRE encap destinations towards ATE Port 2.
-
2 IPv4 and 2 IPv6 source prefixes will be used to generate tests traffic (SRC1-SRC2). Apply policy-forwarding with 4 rules to DUT Port 1:
- Match IPV4-SRC1 and accept/foward.
- Match IPV6-SRC1 and accept/foward.
- Match IPV4-SRC2 and encapsulate to 32 IPv4 GRE destinations.
- Match IPV6-SRC2 and encapsulate to 32 IPv4 GRE destinations.
-
Set GRE encap source to device's loopback interface.
-
Either
identifying-prefix
ortargets/target/config/destination
can be used to configure GRE destinations based on vendor implementation. -
Configure QoS classifier for incoming traffic on ATE Port1 for IPv4 and IPv6 traffic. QoS classifier should remark egress packet to the matching ingress DSCP value (eg. match DSCP 32, set egress DSCP 32). Match and remark all values for 3 leftmost DSCP bits [0, 8, 16, 24, 32, 40, 48, 56].
Generate traffic on ATE Port 1 from IPV4-SRC2 from a random combination of 1000 source addresses to IPV4-DST at linerate. Use 512 bytes frame size.
Verify:
- All traffic received on ATE Port 2 GRE-encapsulated.
- No packet loss when forwarding.
- Traffic equally load-balanced across 32 GRE destinations.
- Verify PF packet counters matching traffic generated.
Generate traffic on ATE Port 1 from IPV6-SRC2 from a random combination of 1000 source addresses to IPV6-DST. Use 512 bytes frame size.
Verify:
- All traffic received on ATE Port 2 GRE-encapsulated.
- No packet loss when forwarding.
- Traffic equally load-balanced across 32 GRE destinations.
- Verify PF packet counters matching traffic generated.
Generate traffic on ATE Port 1 from sources IPV4-SRC1 to IPV4-DST.
Verify:
- All traffic received on ATE Port 3.
- No packet loss when forwarding.
Generate traffic on ATE Port 1 from sources IPV6-SRC1 to IPV6-DST.
Verify:
- All traffic received on ATE Port 3.
- No packet loss when forwarding.
Generate traffic on ATE Port 1 from IPV4-SRC1 source for every DSCP value in [0, 8, 16, 24, 32, 40, 48, 56]
Verify:
- All traffic received on ATE Port 2 GRE-encapsulated.
- Outer GRE IPv4 header has same marking as ingress non-encapsulated IPv4 packet.
- Verify that DSCP in inner IPv4 header is unchanged.
Generate traffic on ATE Port 1 from IPV6-SRC1 for every IPv6 TC 8-bit value [0, 32, 64, 96, 128, 160, 192, 224]
Verify:
- All traffic received on ATE Port 2 GRE-encapsulated.
- Outer GRE IPv4 header has DSCP match to ingress IPv6 TC packet.
- Verify that TC in inner IPv6 header is unchanged.
- Generate traffic on ATE Port 1 from IPV4-SRC1 with frame size of 4000 with DF-bit set.
- Generate traffic on ATE Port 1 from IPV6-SRC1 with frame size of 4000 with DF-bit set.
Verify:
- DUT generates "Fragmentation Needed" message back to ATE source.
paths:
# match condition
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/source-address:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv6/config/source-address:
# encap action
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets/target/config/id:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets/target/config/source:
# either destination or identifying-prefix can be specified based on specific vendor implementation.
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/targets/target/config/destination:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/encapsulate-gre/config/identifying-prefix:
# application to the interface
/network-instances/network-instance/policy-forwarding/interfaces/interface/config/apply-forwarding-policy:
# telemetry
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/state/matched-pkts:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/state/matched-octets:
rpcs:
gnmi:
gNMI.Set:
union_replace: true
replace: true
gNMI.Subscribe:
on_change: true
- MFF
- FFF