Skip to content

Review TC47/TC49: align test_base_dci_l3vni_external_connectivity with testplan#21

Open
bpar9 wants to merge 1 commit into
masterfrom
devin/1778300313-l3vni-dci-tc47-49-review
Open

Review TC47/TC49: align test_base_dci_l3vni_external_connectivity with testplan#21
bpar9 wants to merge 1 commit into
masterfrom
devin/1778300313-l3vni-dci-tc47-49-review

Conversation

@bpar9
Copy link
Copy Markdown
Owner

@bpar9 bpar9 commented May 9, 2026

Description of PR

Summary:
Reworks test_base_dci_l3vni_external_connectivity (L3VNI_dci:47 IPv4 / L3VNI_dci:49 IPv6) to align with the DCI Solution Testplan specification. The previous implementation deviated from the testplan in several significant ways (peering target, IP addresses, traffic direction, verification depth). This PR addresses 9 identified gaps.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

The existing test_base_dci_l3vni_external_connectivity had significant deviations from the testplan:

Gap Severity Issue
GAP-1 HIGH Peered with DC1/DC2 leaves instead of a DC1 BGW — bypasses RT-REWRITE and L3VNI Type-5 origination
GAP-4 HIGH Traffic sourced from DC1 host instead of DC2 host — bypasses cross-DC DCI forwarding path
GAP-6 LOW Wrong IPs/ASN (21.1.1.x/65333 vs testplan 10.250.1.x/65500)
GAP-2 MEDIUM Flat st.wait(60) instead of BGP session polling
GAP-3 MEDIUM Shallow Type-5 check (string match only, no FIB/RIB verification)
GAP-7 MEDIUM No DCI uplink drop counter checks
GAP-8 MEDIUM Incomplete cleanup (VRF not deleted, no post-cleanup health check)
GAP-9 LOW Missing redistribute bgp for Type-5 generation on BGW

How did you do it?

  1. Peering target → DC1 BGW: Discovery logic now searches dc1_bgw nodes instead of leaf nodes. DC2 direct peering removed entirely — DC2 learns ext_prefix via EVPN Type-5 over DCI.
  2. Traffic source → DC2 host: Stream now originates from a DC2 leaf Ixia port, traversing DC2 leaf → DC2 BGW → DCI → DC1 BGW → external router.
  3. IP addresses/ASN aligned: ext_asn=65500, IPv4 10.250.1.x/30 + 10.99.0.0/24, IPv6 2001:db8:250::x/126 + 2001:db8:99::/64.
  4. BGP polling: Replaced st.wait(60) with a polling loop (5s × 12 attempts) checking show bgp vrf Vrf101 summary for Established state.
  5. Type-5 verification enhanced: Checks DC1 BGW (locally originated), DC2 BGW (received over WAN), DC2 leaf (received from DC2 BGWs), plus VRF FIB installation on DC2 nodes.
  6. DCI uplink drop counters: Logs show interfaces counters on DC2 leaf, DC2 BGW, DC1 BGW after traffic.
  7. Cleanup improved: Removes route-maps/prefix-lists, deletes VRF on external router, runs verify_base_setup_bgw() post-cleanup.
  8. redistribute bgp added on DC1 BGW alongside redistribute connected.

How did you verify/test it?

  • Syntax-validated with py_compile (passes).
  • Not tested on a live testbed — this requires a multi-DC EVPN-VXLAN fabric with Ixia. Testbed validation is required before merge.

Any platform specific information?

N/A — applies to any SONiC platform supporting EVPN-VXLAN DCI with BGW spines.

Supported testbed topology if it's a new test case?

Not a new test case. Existing 3-DC DCI topology with BGW spines.

⚠️ Items for reviewer attention

  1. TGEN IP config may be wrong — The TGEN device group uses ext_prefix_host (e.g. 10.99.0.10) as both gateway and intf_ip_addr. In the old code these were distinct values (tgen_gw_ip vs tgen_host_ip). Verify this is correct for the Ixia emulated host setup, or whether the gateway should be a different IP (e.g., the external router's connected interface in ext_prefix subnet).
  2. Drop counter check is log-only — Step 8 logs drop counters but does not fail the test on non-zero drops. The testplan specifies "0 drops." Consider whether this should assert.
  3. redistribute bgp — Added per testplan ("if needed"), but could cause unintended redistribution of other BGP-learned routes in Vrf101 on the BGW. Verify this is safe in the DCI base profile.
  4. Topology dependency — The test now requires a physical link from a DC1 BGW to the external router. If no such link exists, the test skips. Previously it searched for leaf-to-router links.

Documentation

N/A

Link to Devin session: https://cisco-demo.devinenterprise.com/sessions/1849ed21f9c04ca1a02f8329683d1afd
Requested by: @bpar9

…h testplan

Key changes based on testplan review (L3VNI_dci:47 / L3VNI_dci:49):

GAP-1 (HIGH): Peer with DC1 BGW instead of DC1/DC2 leaves
  - Testplan specifies 'Pick one DC1 BGW' for VRF-lite peering
  - BGW originates Type-5 with L3VNI ext-community and RT-REWRITE
  - Removed DC2 direct peering (DC2 learns route via EVPN/DCI)

GAP-2 (MEDIUM): Replace st.wait(60) with BGP session polling
  - Poll 'show bgp vrf Vrf101 summary' every 5s for up to 60s
  - Fail-fast if session never reaches Established

GAP-3 (MEDIUM): Enhanced Type-5 route verification
  - Verify on DC1 BGW (locally-originated Type-5)
  - Verify on DC2 BGW (received over OVERLAY_WAN, installed in FIB)
  - Verify on DC2 leaf (received from DC2 BGWs, installed in FIB)

GAP-4 (HIGH): Traffic source changed from DC1 to DC2 host
  - Testplan: 'Send traffic from a DC2 host to the external prefix'
  - Ensures traffic traverses full DCI path

GAP-6 (LOW): Align IPs/ASN to testplan values
  - ext_asn: 65333 -> 65500
  - IPv4: 10.250.1.x/30 peering, 10.99.0.0/24 ext_prefix
  - IPv6: 2001:db8:250::x/126 peering, 2001:db8:99::/64 ext_prefix

GAP-7 (MEDIUM): Added DCI uplink drop counter checks
GAP-8 (MEDIUM): Comprehensive cleanup + post-cleanup health verification
GAP-9 (LOW): Added 'redistribute bgp' for Type-5 generation
@devin-ai-integration
Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant