Skip to content

Add testplan for BGP MED (Multi-Exit Discriminator) feature#8

Open
bpar9 wants to merge 1 commit into
masterfrom
devin/1768613917-bgp-med-testplan
Open

Add testplan for BGP MED (Multi-Exit Discriminator) feature#8
bpar9 wants to merge 1 commit into
masterfrom
devin/1768613917-bgp-med-testplan

Conversation

@bpar9
Copy link
Copy Markdown
Owner

@bpar9 bpar9 commented Jan 17, 2026

Description of PR

Summary:
This PR adds a comprehensive test plan document for validating the BGP MED (Multi-Exit Discriminator) feature in SONiC. MED is an optional non-transitive BGP path attribute used to influence inbound traffic routing decisions from external ASes, where lower values are preferred.

Reviewer start point: Review the test plan document for technical accuracy and completeness of test coverage.

Files added:

  • docs/testplan/BGP-MED-Test-Plan.md - Test plan documenting 22 test cases

Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/71c0f42835ce4a9586a92d30b6615c2c
Requested by: @bpar9

Type of change

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

Back port request

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

Approach

What is the motivation for this PR?

To provide a detailed test plan for automated validation of the BGP MED feature, covering MED configuration via route-maps, best path selection based on MED values, and proper behavior with eBGP/iBGP peers.

How did you do it?

Created a test plan document with 22 detailed test cases covering:

  • Default MED value behavior and route-map configuration (inbound/outbound)
  • Best path selection based on MED (same AS vs cross-AS)
  • always-compare-med and deterministic-med options
  • MED propagation to eBGP and iBGP peers
  • IPv6 support, boundary values (0 and max uint32), persistence after restart
  • MED interaction with local-preference and AS-path (verifying BGP path selection order)
  • Route reflector scenarios
  • Route flapping stability

How did you verify/test it?

This is a test plan document only. Test implementation (tests/bgp/test_bgp_med.py) is not included in this PR.

Any platform specific information?

None - tests will use vtysh for route-map configuration which is platform-agnostic.

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

  • t0
  • t0-multi-asic
  • t1
  • t1-multi-asic

Documentation

Test plan document added at docs/testplan/BGP-MED-Test-Plan.md


Items for reviewer attention:

  1. This PR contains only the test plan document - actual pytest implementation is not included
  2. Please verify technical accuracy of MED behavior descriptions (e.g., MED comparison rules, interaction with other BGP attributes)
  3. Test Case Add 6 L3VNI DCI test cases (57, 58, 84, 85, 96, 97) #18 (MED Missing vs MED=0) notes that behavior may be implementation-dependent - please confirm expected SONiC/FRR behavior

- 22 comprehensive test cases covering MED functionality
- Default MED value, route-map configuration (inbound/outbound)
- Best path selection based on MED (same AS and cross-AS)
- always-compare-med and deterministic-med options
- MED interaction with local-preference and AS-path
- IPv6 support, boundary values, persistence after restart
- Route reflector scenarios
- Route flapping stability
@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