bgp_fib_isolation_and_drain_test - openconfig/featureprofiles GitHub Wiki
Validate that customer eBGP routes learned on the DUT in tenant VRFs are maintained in the BGP control plane and advertised to core iBGP route reflectors (RR) via advertise-inactive-routes, but are isolated and suppressed from installation into the local transit forwarding table (FIB). Furthermore, validate graceful soft-drain and undrain operations per tenant peer session (via policy-driven LOCAL_PREF deprecation and AS-Path prepending) without traffic disruption to neighboring tenants.
-
TESTBED_DUT_ATE_4LINKS(ATE Port 1/2 simulating Customer Edge CE1/CE2; ATE Port 3/4 simulating Core Route Reflector RR1/RR2).
graph LR;
ce1[ATE Port 1: CE1 in VRF ce1] -- "eBGP (Customer Routes)" --> dut1[DUT Port 1.100]
ce2[ATE Port 2: CE2 in VRF ce2] -- "eBGP (Customer Routes)" --> dut2[DUT Port 2.200]
dut3[DUT Port 3: Transit] -- "iBGP (IPv4/IPv6 Unicast)" --> rr1[ATE Port 3: RR1]
dut4[DUT Port 4: Transit] -- "iBGP (IPv4/IPv6 Unicast)" --> rr2[ATE Port 4: RR2]
- Connect ATE Port 1 to DUT Port 1 (configured with subinterface VLAN 100 in VRF
ce1, IP192.0.2.1/30). - Connect ATE Port 2 to DUT Port 2 (configured with subinterface VLAN 200 in VRF
ce2, IP192.0.2.5/30). - Connect ATE Port 3 to DUT Port 3 (configured with IPv6 transit peering
2001:db8:3::1/64to RR12001:db8:3::2in VRFce1). - Connect ATE Port 4 to DUT Port 4 (configured with IPv6 transit peering
2001:db8:4::1/64to RR22001:db8:4::2in VRFce2).
- Configure two tenant network instances (
ce1,ce2) on the DUT with distinct Route Distinguishers (RD) and Route Targets (RT). - Configure eBGP sessions under VRF
ce1(with ATE CE1192.0.2.2, AS 65001) and VRFce2(with ATE CE2192.0.2.6, AS 65002). - Configure iBGP sessions towards ATE RR1 (
2001:db8:3::2in VRFce1) and ATE RR2 (2001:db8:4::2in VRFce2) withIPV4_UNICASTandIPV6_UNICASTaddress families enabled. - Configure route install suppression policy on DUT: routes learned via customer eBGP in tenant VRFs must have
table-installsuppressed (install-map NO-ROUTESor routing policyrejecton RIB-to-FIB download). - Enable
/network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/config/advertise-inactive-routes(true) on the DUT BGP process so that valid BGP routes not installed in the FIB continue to be advertised to iBGP peers.
-
Step 1: ATE CE1 advertises prefix
198.51.100.0/24(IPv4) and2001:db8:100::/64(IPv6) to DUT in VRFce1. -
Step 2: ATE CE2 advertises prefix
203.0.113.0/24(IPv4) and2001:db8:200::/64(IPv6) to DUT in VRFce2. -
Step 3: Verify via OpenConfig telemetry
/network-instances/network-instance[name=ce1]/table-connections/table-connection/state/import-policyand AFT telemetry/network-instances/network-instance[name=ce1]/afts/that VRFce1contains no forwarding entries for203.0.113.0/24or2001:db8:200::/64. -
Step 4: Verify VRF
ce2contains no forwarding entries for198.51.100.0/24or2001:db8:100::/64. -
Step 5: Send bidirectional data plane probe packets from ATE CE1 destined to
203.0.113.0/24and2001:db8:200::/64; verify traffic is dropped on the DUT and does not leak cross-VRF.
-
Step 1: Verify IPv4 prefix
198.51.100.0/24and IPv6 prefix2001:db8:100::/64are present in the DUT BGP RIB under/network-instances/network-instance[name=ce1]/protocols/protocol[identifier=openconfig-policy-types:BGP][name=BGP]/bgp/rib/afi-safis/afi-safi[afi-safi-name=openconfig-bgp-types:IPV4_UNICAST]/ipv4-unicast/loc-rib/routes/route/state/prefixand.../afi-safi[afi-safi-name=openconfig-bgp-types:IPV6_UNICAST]/ipv6-unicast/loc-rib/routes/route/state/prefix. -
Step 2: Query the DUT AFT forwarding state at
/network-instances/network-instance[name=ce1]/afts/ipv4-unicast/ipv4-entry[prefix=198.51.100.0/24]/state/prefixand/network-instances/network-instance[name=ce1]/afts/ipv6-unicast/ipv6-entry[prefix=2001:db8:100::/64]/state/prefix. -
Step 3: Verify that neither route is installed in the hardware FIB table (or state leaf reflects
not-installed/ transit-only suppression). - Step 4: Verify that core transit traffic passing through DUT does not attempt local host termination for suppressed customer prefixes.
-
Step 1: Confirm
/network-instances/network-instance[name=ce1]/protocols/protocol[identifier=openconfig-policy-types:BGP][name=BGP]/bgp/global/route-selection-options/state/advertise-inactive-routesistrueand monitor the iBGP advertisements sent from DUT Port 3 to ATE RR1 (2001:db8:3::2). -
Step 2: Verify that ATE RR1 receives
198.51.100.0/24(IPv4) and2001:db8:100::/64(IPv6) as iBGP updates. -
Step 3: Verify that
/network-instances/network-instance[name=ce1]/protocols/protocol[identifier=openconfig-policy-types:BGP][name=BGP]/bgp/rib/afi-safis/afi-safi[afi-safi-name=openconfig-bgp-types:IPV4_UNICAST]/ipv4-unicast/neighbors/neighbor[neighbor-address=2001:db8:3::2]/adj-rib-out-post/routes/route/state/prefix,.../afi-safi[afi-safi-name=openconfig-bgp-types:IPV6_UNICAST]/ipv6-unicast/neighbors/neighbor[neighbor-address=2001:db8:3::2]/adj-rib-out-post/routes/route/state/prefix, and/network-instances/network-instance[name=ce1]/protocols/protocol[identifier=openconfig-policy-types:BGP][name=BGP]/bgp/neighbors/neighbor[neighbor-address=2001:db8:3::2]/afi-safis/afi-safi/state/prefixes/sentreflect the advertised198.51.100.0/24and2001:db8:100::/64prefixes.
- Step 1: Establish steady-state traffic between ATE CE1 and ATE RR1.
-
Step 2: Apply a soft drain policy on DUT for ATE CE1 peer (deprecating
local-prefto10towards core iBGP peers and prepending AS-Path64500 64500 64500towards CE1 without resetting TCP transport). -
Step 3: Verify via
/network-instances/network-instance[name=ce1]/protocols/protocol[identifier=openconfig-policy-types:BGP][name=BGP]/bgp/rib/attr-sets/attr-set/state/local-prefand ATE RR1 BGP RIB that198.51.100.0/24and2001:db8:100::/64are re-advertised towards ATE RR1 with deprecatedlocal-pref(10) and towards ATE CE1 with prepended AS-Path ([64500, 64500, 64500]), gracefully draining traffic away from the link without hard route withdrawal. -
Step 4: Verify that neighbor ATE CE2 in VRF
ce2maintains its active BGP session (/network-instances/network-instance[name=ce2]/protocols/protocol[identifier=openconfig-policy-types:BGP][name=BGP]/bgp/neighbors/neighbor[neighbor-address=192.0.2.6]/state/session-state=ESTABLISHED) and experiences 0% packet loss during CE1 drain.
- Step 1: Remove the soft drain policy on DUT for ATE CE1.
-
Step 2: Verify that the BGP session seamlessly resumes normal route advertisement with default
local-pref(100) and unprepended AS-Path without session flapping. -
Step 3: Measure convergence latency: verify routes
198.51.100.0/24and2001:db8:100::/64are re-advertised with restored attributes to ATE RR1 in less than 5 seconds.
{
"network-instances": {
"network-instance": [
{
"name": "ce1",
"config": {
"name": "ce1",
"type": "openconfig-network-instance-types:L3VRF",
"route-distinguisher": "64500:100"
},
"protocols": {
"protocol": [
{
"identifier": "openconfig-policy-types:BGP",
"name": "BGP",
"bgp": {
"global": {
"config": {
"as": 64500
},
"route-selection-options": {
"config": {
"advertise-inactive-routes": true
}
}
},
"neighbors": {
"neighbor": [
{
"neighbor-address": "192.0.2.2",
"config": {
"neighbor-address": "192.0.2.2",
"peer-as": 65001
}
}
]
}
}
}
]
}
}
]
}
}** TODO: Update openconfig public data models to add l3vpn-ipv4-unicast and l3vpn-ipv6-unicast to the /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi container.
paths:
# TODO: Update openconfig public data models to add l3vpn-ipv4-unicast and l3vpn-ipv6-unicast to the /network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi container.
# BGP Route Selection and Advertised Prefixes
/network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/config/advertise-inactive-routes:
/network-instances/network-instance/protocols/protocol/bgp/global/route-selection-options/state/advertise-inactive-routes:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/state/prefixes/sent:
# BGP RIB and Attributes
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/routes/route/state/prefix:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/routes/route/state/prefix:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/state/prefix:
/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv6-unicast/neighbors/neighbor/adj-rib-out-post/routes/route/state/prefix:
/network-instances/network-instance/protocols/protocol/bgp/rib/attr-sets/attr-set/state/local-pref:
# Network Instance Table Connections and Forwarding Table (AFT)
/network-instances/network-instance/table-connections/table-connection/state/import-policy:
/network-instances/network-instance/afts/ipv4-unicast/ipv4-entry/state/prefix:
/network-instances/network-instance/afts/ipv6-unicast/ipv6-entry/state/prefix:
# Session State
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state:
rpcs:
gnmi:
gNMI.Get:
gNMI.Set:
gNMI.Subscribe:- FFF