Skip to content

bgpd: aggregate-address matching-med-only RFC 4271 compliant things - #24578

Open
ton31337 wants to merge 4 commits into
FRRouting:masterfrom
opensourcerouting:fix/bgp_med_follow_rfc4271
Open

ton31337 wants to merge 4 commits into
FRRouting:masterfrom
opensourcerouting:fix/bgp_med_follow_rfc4271

Conversation

@ton31337

@ton31337 ton31337 commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

We are doing non-compliant stuff according to RFC 4271 with aggregate-address with MED. I propose, with this PR, preparing to switch the default (in one year) to be RFC-compliant.

(frrbot styling should be ignored, expected)

See #24565

…efault

RFC 4271 says:
Routes that have different MULTI_EXIT_DISC attributes SHALL NOT be aggregated.

We are doing completely reverse course here. Let's prepare the code for quickly
shifting this behavior and flip (set to true) after once year with an announcement
in the release notes (e.g. 10.8).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
@frrbot frrbot Bot added bgp tests Topotests, make check, etc tools labels Nov 26, 2026
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the previous reload issue is fixed, and no new actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous reload issue is fixed, and no new actionable issues were found.

Summary

Adds an instance-wide MED-matching default while keeping the current default disabled.

  • BGP aggregates can inherit a default for matching route MEDs.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Aggregate MED setting] --> B{Explicit override?}
  B -->|Require matching| C[Check MED values]
  B -->|Ignore MED| D[Allow different MED values]
  B -->|No override| E{Instance default enabled?}
  E -->|Yes| C
  E -->|No| D
Loading

Reviews (2) · Last reviewed commit: "tests: Check if ignore-med is working fo..." · Reviewed by Greptile

Comment thread tools/frr-reload.py.in Resolved
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Lowercased, just to be consistent with other CLI commands we have. This is
something strange/weird.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
@ton31337
ton31337 force-pushed the fix/bgp_med_follow_rfc4271 branch from 043a3ba to 05dac48 Compare November 26, 2026 13:10
@enkechen-panw

Copy link
Copy Markdown
Contributor

Hi, @ton31337 The "matching-med-only" for aggregation is dangerous. There have been multiple customer outages in the field due to that configuration. I don't think we should follow RFC 4271, and flip the default in this case.

Personally I am not aware of any customers requiring "matching-med-only", and I don't know how/when it would be useful.

@ton31337

Copy link
Copy Markdown
Member Author

I don't think we should follow RFC 4271, and flip the default in this case.

This is completely nonsense. If the standards are "wrong", then we should do whatever we want elsewhere? Is this your point?

(P.S. I personally don't know the use cases much about aggregation with MED, without MED)

@enkechen-panw

Copy link
Copy Markdown
Contributor

I don't think we should follow RFC 4271, and flip the default in this case.

This is completely nonsense. If the standards are "wrong", then we should do whatever we want elsewhere? Is this your point?

(P.S. I personally don't know the use cases much about aggregation with MED, without MED)

As I understand, a knob constitutes "standard compliance" even if the default value is different. The approach has been used over the years.

Regarding "matching-med-only" behavior, as I recall, one outage was that an aggregate was supposed to cover a number of more specific routes from multiple ASes. When one of the neighbor (or AS) advertised different MEDs, the aggregated was withdrawn.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants