Skip to content

bgp: AS-path edge knobs (remove-private-as, allowas-in, as-override, local-as) - #144

Open
gusbourg wants to merge 3 commits into
holo-routing:masterfrom
gusbourg:bgp-as-path-knobs-pr
Open

bgp: AS-path edge knobs (remove-private-as, allowas-in, as-override, local-as)#144
gusbourg wants to merge 3 commits into
holo-routing:masterfrom
gusbourg:bgp-as-path-knobs-pr

Conversation

@gusbourg

@gusbourg gusbourg commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Four per-neighbor AS-path edge knobs (previously deviated), via ietf-bgp neighbor/peer-group config:

  • remove-private-as: strip private ASNs (2-byte 64512–65534, 4-byte 4200000000–4294967294) from the advertised path — default (leading), all, and replace-as (private replaced by local AS, path length preserved) modes.
  • allowas-in: accept a route whose AS-path contains the local AS up to the configured occurrence count; default 0 preserves normal own-AS loop rejection.
  • as-override: replace the neighbour's AS occurrences with the local AS on advertisement.
  • local-as: present a configured AS to the neighbour, with no-prepend and replace-as variants.

Unit tests cover each knob and variant: allow_own_as boundary, the three private-AS modes, the local-as prepend forms, and as-override.

🤖 Generated with Claude Code

gusbourg and others added 3 commits July 5, 2026 18:15
Keep the production spawn_protocol_task signature stable while routing testing-only channels through an internal helper.

Also provide the testing-mode TimeoutTask constructor needed by workspace tests on this base.
Apply remove-private-as, allow-own-as, as-override, and local-as handling in the BGP decision and egress paths.

Keep AS-path mutations on per-advertisement copies, present local-as in OPEN messages, and add focused unit coverage for each knob.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants