ingress - openconfig/featureprofiles GitHub Wiki
This test verifies TTL handling for ingress flows.
-
DUT has one ingress port and one egress port, both connected to ATE.
------- | | [ ATE:Port1 ] ---- | DUT | ---- [ ATE:Port2 ] | | -------
-
Traffic is generated from ATE:Port1.
-
ATE:Port2 is used as the destination port for flows.
-
DUT:Port1 is configured as Singleton IP interface towards ATE:Port1 with IPv4 and IP6 addresses.
-
DUT:Port2 is configured as Singleton IP interface towards ATE:Port2 with IPv4 and IP6 addresses.
-
DUT is configured with the following static routes: a) Destination IPv4-DST-NET/32 next hop ATE:Port2 IPv4 address. b) Destination IPv6-DST-NET/32 next hop ATE:Port2 IPv6 address. c) Destination IPv4-DST-NET-SERV1/32 next hop ATE:Port2 IPv4 address. d) Destination IPv6-DST-NET-SERV1/32 next hop ATE:Port2 IPv6 address. c) Destination GRE-IPv4-DST-NET/32 next hop ATE:Port2 IPv4 address.
ATE action:
- Generate 5 IPv4 packets from ATE:Port1 to IPv4-DST-NET/32.
- Set TTL of all packets to 10.
Verify:
- DUT interface DUT:Port1
in-unicast-pkts
counters equals the number of packets generated from ATE:Port1. - DUT interface DUT:Port2
out-unicast-pkts
counters equals the number of packets generated from ATE:Port1. - The packet count of traffic received on ATE:Port2 should be equal to the packets generated from ATE:Port1.
- For ONLY non-encapsulated packets; TTL for all packets received on ATE:Port2 should be 9.
- Repeat
PF-1.8.1
with ATE generating IPv6 packets IPv6-DST-NET/128.
ATE action:
- Generate 5 IPv4 packets from ATE:Port1 to IPv4-DST-NET/32.
- Set TTL of all packets to 1.
Verify:
- DUT interface DUT:Port1
in-unicast-pkts
counters equals the number of packets generated from ATE:Port1. - ATE:Port1 received ICMP TTL Exceeded packets for all packets sent.
- Repeat
PF-1.8.3
with ATE generating IPv6 packets IPv6-DST-NET/128.
DUT action:
- Configure DUT for GRE encapsulation as follows.
- Packets destined to IPv4-DST-NET-SERV1/32 should be GRE encapsulated to GRE-IPv4-DST-NET/32 with outer IP having TTL = 64.
- Packets destined to IPv6-DST-NET-SERV1/128 should be GRE encapsulated to GRE-IPv4-DST-NET/32 with outer IP having TTL = 64.
ATE action:
- Generate 5 IPv4 packets from ATE:Port1 to IPv4-DST-NET-SERV1/32.
- Set TTL of all packets to 10.
Verify:
- Perform same verifications in
PF-1.8.1
.- TTL for inner IP is 10.
- TTL for outer IP is 64.
- In addition, verify that encapsulation rules counter match number of packets from ATE:Port1.
- Repeat
PF-1.8.5
with ATE generating IPv6 packets IPv6-DST-NET-SERV1/128.
PF-1.8.7: IPv4 traffic with GRE encapsulation on DUT and TTL = 1 with DUT configured to process TTL = 1 on receiving interface.
DUT action:
- Additional configuration on DUT
- Packets with TTL = 1 should be processed locally first before encapsulation.
ATE action:
- Generate 5 IPv4 packets from ATE:Port1 to IPv4-DST-NET-SERV1/32.
- Set TTL of all packets to 1.
Verify:
- DUT interface DUT:Port1
in-unicast-pkts
counters equals the number of packets generated from ATE:Port1. - ATE:Port1 received ICMP Time Exceeded packets for all packets sent.
PF-1.8.8: IPv6 traffic with GRE encapsulation on DUT and TTL = 1 with DUT configured to process TTL = 1 on receiving interface.
- Repeat
PF-1.8.7
with ATE generating IPv6 packets IPv6-DST-NET-SERV1/128.
PF-1.8.9: IPv4 traffic with GRE encapsulation on DUT and TTL = 1 with DUT configured NOT to process TTL = 1 on receiving interface.
DUT action:
- Additional configuration on DUT
- Packets with TTL = 1 should be encapsulated and not processed locally.
ATE action:
- Generate 5 IPv4 packets from ATE:Port1 to IPv4-DST-NET-SERV1/32.
- Set TTL of all packets to 1.
Verify:
- Perform same verifications in
PF-1.8.5
.
PF-1.8.10: IPv6 traffic with GRE encapsulation on DUT and TTL = 1 with DUT configured NOT to process TTL = 1 on receiving interface.
- Repeat
PF-1.8.9
with ATE generating IPv6 packets IPv6-DST-NET-SERV1/128.
TODO: New OC paths to be proposed are present in below JSON
- config/rules/rule/action/count: true
- config/rules/rule/action/next-hop-group
- encap-headers/encap-header/type: "GRE" and associated parameters
{
"network-instances": {
"network-instance": [
{
"name": "DEFAULT",
"config": {
"name": "DEFAULT"
},
"policy-forwarding": {
"interfaces": {
"interface": [
{
"config": {
"apply-forwarding-policy": "customer1_gre_encap",
"interface-id": "intf1"
},
"interface-id": "intf1"
}
]
},
"policies": {
"policy": [
{
"config": {
"policy-id": "customer1_gre_encap"
},
"rules": {
"rule": [
{
"sequence-id": 0
"config": {
"sequence-id": 0
}
"ipv4": {
"config": {
"destination-address": "inner_dst_ipv4"
}
},
"action": {
"config": {
"count": true
"next-hop-group": "customer1_gre_encap_v4_nhg",
}
}
}
]
}
},
]
}
},
"static": {
"next-hop-groups": {
"net-hop-group": [
{
"config": {
"name": "customer1_gre_encap_v4_nhg"
},
"name": "customer1_gre_encap_v4_nhg",
"next-hops": {
"next-hop": [
{
"index": 1,
"config": {
"index": 1
}
},
]
}
}
]
},
"next-hops": {
"next-hop": [
{
"index": 1,
"config": {
"index": 1,
"encap-headers": {
"encap-header": [
{
"index": 1,
"type": "GRE",
"config": {
"dst-ip": "outer_ipv4_dst",
"src-ip": "outer_ipv4_src",
"dscp": "outer_dscp",
"ip-ttl": "outer_ip-ttl"
}
},
]
}
}
},
]
}
}
}
]
}
}
paths:
# Config
/network-instances/network-instance/policy-forwarding/interfaces/interface/config/apply-forwarding-policy:
/network-instances/network-instance/policy-forwarding/interfaces/interface/config/interface-id:
/network-instances/network-instance/policy-forwarding/policies/policy/config/policy-id:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/destination-address:
/network-instances/network-instance/static/next-hop-groups/next-hop-group/config/name:
# 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:
/network-instances/network-instance/afts/policy-forwarding/policy-forwarding-entry/state/counters/packets-forwarded:
/network-instances/network-instance/afts/policy-forwarding/policy-forwarding-entry/state/counters/octets-forwarded:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/state/sequence-id:
# TODO: Add new OC for GRE encap headers
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/config/index:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/config/next-hop:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/config/index:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/gre/config/type:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/gre/config/dst-ip:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/gre/config/src-ip:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/gre/config/dscp:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/gre/config/ip-ttl:
#/network-instances/network-instance/static/next-hop-groups/next-hop-group/nexthops/nexthop/encap-headers/encap-header/gre/config/index:
# TODO: Add new OC for policy forwarding actions
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/next-hop-group:
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/ipv4/config/packet-type:
#/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/count:
rpcs:
gnmi:
gNMI.Set:
union_replace: true
replace: true
gNMI.Subscribe:
on_change: true