fallback_to_native_routing_test - openconfig/featureprofiles GitHub Wiki
Verify that when a gRIBI action explicitly instructs the switch to fall back to the default network instance, traffic correctly yields to the underlying native BGP/ISIS route. Initially, traffic is encapsulated and forwarded via a standard gRIBI tunnel entry. A gRIBI Modify command updates the route's NextHop to explicitly specify a fallback/decap action pointing to the default routing instance. Traffic seamlessly transitions to following the native BGP shortest-path route, and gNMI AFT telemetry reflects the updated gRIBI entry intent and the resulting data path change.
- Configure 4 interfaces on the DUT and ATE. Connect DUT port 1 to ATE port 1, DUT port 2 to ATE port 2, DUT port 3 to ATE port 3, and DUT port 4 to ATE port 4.
- Configure IPv4 and IPv6 addresses on all links:
- Link 1 (Traffic Source): ATE IP
192.0.2.2/30, DUT IP192.0.2.1/30| ATE IP2001:db8:1::2/126, DUT IP2001:db8:1::1/126 - Link 2 (Initial gRIBI Tunnel): ATE IP
192.0.2.6/30, DUT IP192.0.2.5/30| ATE IP2001:db8:2::2/126, DUT IP2001:db8:2::1/126 - Link 3 (BGP over ISIS Native Route): ATE IP
192.0.2.10/30, DUT IP192.0.2.9/30| ATE IP2001:db8:3::2/126, DUT IP2001:db8:3::1/126 - Link 4 (ISIS Native Route): ATE IP
192.0.2.14/30, DUT IP192.0.2.13/30| ATE IP2001:db8:4::2/126, DUT IP2001:db8:4::1/126
- Link 1 (Traffic Source): ATE IP
- On Link 3, configure ISIS routing between DUT and ATE.
- ATE advertises a Loopback interface via ISIS: IPv4
198.51.200.1/32, IPv62001:db8:200::1/128.
- ATE advertises a Loopback interface via ISIS: IPv4
- Establish an eBGP session between DUT and ATE on Link 3 using the ISIS-learned Loopback IPs.
- ATE AS: 65536
- DUT AS: 65537
- Establish an ISIS session between DUT and ATE on Link 4.
- Route Advertisements:
- Via BGP on Link 3: Advertise 1,000 IPv4 prefixes starting from
198.51.0.0/24(up to198.51.3.231/24) and 1,000 IPv6 prefixes starting from2001:db8:1000::/64to2001:db8:13e7::/64. - Via ISIS on Link 4: Advertise 1,000 IPv4 prefixes starting from
198.52.0.0/24and 1,000 IPv6 prefixes starting from2001:db8:2000::/64.
- Via BGP on Link 3: Advertise 1,000 IPv4 prefixes starting from
- Use
gNMI.Getto verify BGP and ISIS sessions are established and the routes are received and installed in the default network instance RIB on the DUT before proceeding.
- Step 1 - Inject gRIBI routes for the 1,000 IPv4 BGP prefixes (
198.51.x.0/24) on the DUT.- Set the initial gRIBI NextHop action to forward traffic to ATE Port 2.
- Step 2 - Validate initial gRIBI programming via gNMI AFT telemetry.
- Wait until
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-groupreflects the new NextHop group ID for all 1,000 prefixes.
- Wait until
- Step 3 - Start continuous IPv4 traffic from ATE port 1 to the destinations in the 1,000 prefixes (e.g., at 100 pps per prefix).
- Verify 100% of the traffic arrives at ATE port 2 and 0% at ATE port 3.
- Step 4 - Send a gRIBI
Modifycommand for the 1,000 prefixes, updating the NextHop group to explicitly specify adecap-fallback-network-instancepointing toDEFAULT. - Step 5 - Validate gNMI AFT telemetry via
gNMI.SubscribewithON_CHANGEorgNMI.Getpolling.- Check that
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-groupfor all 1,000 prefixes matches the updated gRIBI NextHop group ID that specifies fallback.
- Check that
- Step 6 - Validate traffic fallback.
- Verify traffic seamlessly transitions and completely stops arriving at ATE port 2, now arriving exclusively at ATE port 3 (falling back to the BGP native routing table).
- Validate that transition packet loss is within acceptable limits (e.g., < 1 second of expected packets lost). Stop traffic.
{
"network-instances": {
"network-instance": [
{
"config": {
"name": "DEFAULT"
},
"name": "DEFAULT",
"policy-forwarding": {
"policies": {
"policy": [
{
"config": {
"policy-id": "fallback_policy"
},
"policy-id": "fallback_policy",
"rules": {
"rule": [
{
"action": {
"config": {
"decap-fallback-network-instance": "DEFAULT"
}
},
"config": {
"sequence-id": 1
},
"sequence-id": 1
}
]
}
}
]
}
}
}
]
}
}- Step 1 - Inject gRIBI routes for the 1,000 IPv6 BGP prefixes on the DUT.
- Set the initial gRIBI NextHop action to forward traffic to ATE Port 2.
- Step 2 - Validate initial gRIBI programming via gNMI AFT telemetry for all 1,000 prefixes.
- Step 3 - Start continuous IPv6 traffic from ATE port 1 to the destinations in the 1,000 prefixes.
- Verify 100% of the traffic arrives at ATE port 2 and 0% at ATE port 3.
- Step 4 - Send a gRIBI
Modifycommand for the 1,000 prefixes, updating the NextHop group to explicitly specify adecap-fallback-network-instancepointing toDEFAULT. - Step 5 - Validate gNMI AFT telemetry via
gNMI.SubscribeorgNMI.Getpolling to confirm the fallback intent is programmed for all prefixes. - Step 6 - Validate traffic fallback.
- Verify traffic completely stops arriving at ATE port 2 and exclusively arrives at ATE port 3.
- Validate transition packet loss is within acceptable limits. Stop traffic.
- Step 1 - Inject gRIBI routes for the 1,000 IPv4 ISIS prefixes (
198.52.x.0/24) on the DUT.- Set the initial gRIBI NextHop action to forward traffic to ATE Port 2.
- Step 2 - Validate initial gRIBI programming via gNMI AFT telemetry for all 1,000 prefixes.
- Step 3 - Start continuous IPv4 traffic from ATE port 1 to the destinations in the 1,000 prefixes.
- Verify 100% of the traffic arrives at ATE port 2 and 0% at ATE port 4.
- Step 4 - Send a gRIBI
Modifycommand for the 1,000 prefixes, updating the NextHop group to explicitly specify adecap-fallback-network-instancepointing toDEFAULT. - Step 5 - Validate gNMI AFT telemetry via
gNMI.SubscribeorgNMI.Getpolling to confirm the fallback intent is programmed for all prefixes. - Step 6 - Validate traffic fallback.
- Verify traffic completely stops arriving at ATE port 2 and exclusively arrives at ATE port 4.
- Validate transition packet loss is within acceptable limits. Stop traffic.
- Step 1 - Inject gRIBI routes for the 1,000 IPv6 ISIS prefixes on the DUT.
- Set the initial gRIBI NextHop action to forward traffic to ATE Port 2.
- Step 2 - Validate initial gRIBI programming via gNMI AFT telemetry for all 1,000 prefixes.
- Step 3 - Start continuous IPv6 traffic from ATE port 1 to the destinations in the 1,000 prefixes.
- Verify 100% of the traffic arrives at ATE port 2 and 0% at ATE port 4.
- Step 4 - Send a gRIBI
Modifycommand for the 1,000 prefixes, updating the NextHop group to explicitly specify adecap-fallback-network-instancepointing toDEFAULT. - Step 5 - Validate gNMI AFT telemetry via
gNMI.SubscribeorgNMI.Getpolling to confirm the fallback intent is programmed for all prefixes. - Step 6 - Validate traffic fallback.
- Verify traffic completely stops arriving at ATE port 2 and exclusively arrives at ATE port 4.
- Validate transition packet loss is within acceptable limits. Stop traffic.
- Step 1 - Define an IPv4 prefix (e.g.,
198.53.0.0/24) that is not advertised by BGP or ISIS. - Step 2 - Inject a gRIBI route for this prefix, explicitly specifying a
decap-fallback-network-instancepointing toDEFAULT. - Step 3 - Validate gNMI AFT telemetry to confirm the entry is programmed with the fallback intent.
- Step 4 - Send traffic from ATE port 1 to the destination
198.53.0.1. - Step 5 - Validate that 100% of the traffic is dropped by the DUT, since no underlying native route exists in the default network instance.
- Step 1 - Utilize one of the prefixes from TE-1.21.1 (e.g.,
198.51.0.0/24) which is currently successfully falling back to the BGP native route on ATE port 3. - Step 2 - Start continuous traffic to this prefix and confirm it arrives at ATE port 3.
- Step 3 - Withdraw the BGP route for
198.51.0.0/24from the ATE on Link 3. - Step 4 - Validate via gNMI that the BGP route is removed from the DUT's RIB.
- Step 5 - Validate that traffic for this prefix completely stops arriving at ATE port 3 and is dropped by the DUT (assuming no other backup route exists).
paths:
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/next-hop-group:
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix:
/network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/state/next-hop-group:
/network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/state/prefix:
/network-instances/network-instance/afts/next-hop-groups/next-hop-group/next-hops/next-hop/state/index:
/network-instances/network-instance/afts/next-hop-groups/next-hop-group/state/id:
/network-instances/network-instance/policy-forwarding/policies/policy/config/policy-id:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/action/config/decap-fallback-network-instance:
/network-instances/network-instance/policy-forwarding/policies/policy/rules/rule/config/sequence-id:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state:
/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/adjacency-state:
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:
on_change: true- FFF