Skip to content

Add L3VNI DCI MAC move test cases (L3VNI_dci:59,60,62,63)#17

Open
bpar9 wants to merge 1 commit intomasterfrom
devin/1775277219-l3vni-dci-mac-move-tests
Open

Add L3VNI DCI MAC move test cases (L3VNI_dci:59,60,62,63)#17
bpar9 wants to merge 1 commit intomasterfrom
devin/1775277219-l3vni-dci-mac-move-tests

Conversation

@bpar9
Copy link
Copy Markdown
Owner

@bpar9 bpar9 commented Apr 4, 2026

Description of PR

Summary:
Adds four new L3VNI host mobility test cases to TestVxlanDCIBase covering cross-VLAN (L3-routed) MAC move scenarios across a 3-DC EVPN-VXLAN fabric. A helper function is added to vxlan_helper.py for L3VNI endpoint parameter generation.

Key difference from existing L2 MAC move tests: Traffic source is on VLAN 13 and host is on VLAN 11, both in VRF 101, so traffic is routed via L3VNI rather than bridged via L2VNI.

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?

Enable L3VNI_dci:59, L3VNI_dci:60, L3VNI_dci:62, L3VNI_dci:63 from the DCI Solution Testplan, covering L3VNI host mobility with cross-subnet traffic verification.

How did you do it?

vxlan_helper.py:

  • Added get_l3vni_mac_move_params() — generates IP/MAC/gateway parameters for cross-VLAN MAC move tests (host on VLAN 11, source on VLAN 13, VRF 101). Includes VRF-VLAN binding validation against the topology config.

test_vxlan_dci.py:

  • Added _get_dci_l3vni_mac_move_cfg() module-level config function that merges L3VNI params with burst/rate settings from the base MAC move config.
  • Added helper methods to TestVxlanDCIBase for TGEN handle resolution, traffic send/stop, MAC diagnostic, and cleanup.
  • Added get_l3vni_stream_handles_dci() — creates IXIA device groups on VLAN 11 (dest1/dest2) and VLAN 13 (source), builds two traffic streams for routed L3 traffic.
  • Added verify_l3vni_mac_move_dci() — 9-phase MAC mobility verification following the same pattern as verify_mac_move_dci: learn → verify MAC → traffic → move → verify seq=1 → traffic → move back → verify seq=2 → traffic.
  • Added four test methods (each runs IPv4 then IPv6):
Test ID Method Scenario
L3VNI_dci:59 test_base_dci_l3vni_mac_move_within_dc Orphan→orphan within DC1, src=leaf0_dc2
L3VNI_dci:60 test_base_dci_l3vni_mac_move_across_dci Orphan→orphan across DC1↔DC2, src=leaf2_dc1
L3VNI_dci:62 test_base_dci_l3vni_mac_move_orphan_to_mh Orphan→PortChannel across DC, src=leaf2_dc1
L3VNI_dci:63 test_base_dci_l3vni_mac_move_mh_to_mh PortChannel→PortChannel across DC, src=leaf2_dc1

How did you verify/test it?

  • python3 -m py_compile passes for both files.
  • Not run on testbed — requires DCI topology with IXIA. Structural review only.

⚠️ Items for reviewer attention

  1. Traffic routing assumption: The test creates two streams (src→dest1_port, src→dest2_port) and uses validate_stats to check which port receives traffic. For L3-routed traffic, the fabric routes based on the host's Type-2 EVPN route — reviewer should confirm that IXIA validate_stats correctly reports rx stats on the port where the routed packet is delivered, even though the stream's configured emulation_dst_handle is a raw port handle.

  2. IP/MAC address range: Host IPs use .51/.52 on VLAN 11 (80.11.0.51/52) and source uses .51 on VLAN 13 (80.13.0.51). MACs use 02:00:00:{04|06}:{0b|0d}:{51|52} scheme. Verify these don't collide with existing SAG host device groups (range 10–30) or other test streams.

  3. Code duplication: Helper methods (_l3vni_get_first_orphan_handle, _l3vni_get_first_pc_handle, etc.) are structurally similar to counterparts in TestVxlanDciMacMoveTriggers. This was done to keep TestVxlanDCIBase self-contained. Consider whether refactoring into shared module-level functions is preferred.

  4. Hardcoded node names in move_config (e.g., leaf0_dc1, leaf2_dc1) — matches existing patterns in TestVxlanDciMacMoveTriggers but should be confirmed against the testbed topology.

Any platform specific information?

DCI topology with 3 datacenters and IXIA traffic generation required.

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

3-DC EVPN-VXLAN DCI topology (DC1: 4 leafs + 2 spines + 2 BGW spines, DC2: 2 leafs + 2 BGW spines, DC3: 1 leaf + 1 BGW spine) with IXIA/IxNetwork TGEN.

Documentation

N/A — test cases follow existing patterns documented in the DCI Solution Testplan.

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

- Add get_l3vni_mac_move_params() helper in vxlan_helper.py for cross-VLAN
  host mobility endpoint generation (VLAN 11 host, VLAN 13 source, VRF 101)
- Add _get_dci_l3vni_mac_move_cfg() config function in test_vxlan_dci.py
- Add verify_l3vni_mac_move_dci() 9-phase MAC move verification method
  reusing the pattern from verify_mac_move_dci for L3VNI routing
- Add get_l3vni_stream_handles_dci() for cross-VLAN IXIA stream creation
- Add 4 test cases in TestVxlanDCIBase:
  - test_base_dci_l3vni_mac_move_within_dc (L3VNI_dci:59)
  - test_base_dci_l3vni_mac_move_across_dci (L3VNI_dci:60)
  - test_base_dci_l3vni_mac_move_orphan_to_mh (L3VNI_dci:62)
  - test_base_dci_l3vni_mac_move_mh_to_mh (L3VNI_dci:63)
@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