Skip to content

Feature: bird vrf support including bgp, ospf and route leaking#3498

Open
jbemmel wants to merge 26 commits into
ipspace:devfrom
jbemmel:feature/bird-vrf-support
Open

Feature: bird vrf support including bgp, ospf and route leaking#3498
jbemmel wants to merge 26 commits into
ipspace:devfrom
jbemmel:feature/bird-vrf-support

Conversation

@jbemmel

@jbemmel jbemmel commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator
  • Create Linux VRF tables (including any module specific script in initial/bird-clab.j2)
  • Make BGP and OSPF VRF aware
  • Add VRF route leaking (including static routes)
  • Update documentation

Test results:

./device-module-test -d bird -p clab vrf
Pre-test cleanup: 
23:10:18 vrf/01-multi-vrf.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:10:28 vrf/02-multi-vrf-ipv6.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:10:39 vrf/03-multi-vrf-loopback.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:10:43 vrf/04-multi-vrf-loopback-ipv6.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:10:50 vrf/11-multi-vrf-ospf.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:11:12 vrf/12-multi-vrf-bgp.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:12:32 vrf/13-multi-vrf-bgp-loopback.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:12:48 vrf/14-multi-vrf-unnumbered.yml: create(FAIL) 
23:12:49 vrf/15-multi-vrf-mixed.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:13:10 vrf/16-vrf-bgp-community.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:13:20 vrf/21-multi-vrf-ospfv3.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:13:42 vrf/22-multi-vrf-bgp-ipv6.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:13:58 vrf/23-multi-vrf-mixed-ipv6.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:14:21 vrf/31-vrf-common-hosts.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:14:30 vrf/32-vrf-common-hosts-ipv6.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:14:40 vrf/33-vrf-common-ospf.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK
23:15:01 vrf/34-vrf-common-mixed.yml: create(ok) up(ok) config(ok) validate(ok) cleanup(ok) OK

@jbemmel

jbemmel commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Test vrf/14-multi-vrf-unnumbered.yml can be fixed once #3475 is merged

@ipspace ipspace left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need a significant rework. The hacks like "include everything else in initial.j2" suck.

Also, for all other devices, we configure routing protocol instances within the VRF configuration; here, you do it in the main OSPF/BGP template. While I understand why you went down that route, it will make for an "interesting" experience when someone has to fix this code, and the two similar experiences I already had to go through persuaded me to avoid the third one at all costs 🤷🏻‍♂️

I know you're facing the challenge of doing data-plane configuration and daemon configuration in the same template, and I don't have a good answer for it yet... but it has to be better than this.

@jbemmel

jbemmel commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

I know you're facing the challenge of doing data-plane configuration and daemon configuration in the same template, and I don't have a good answer for it yet... but it has to be better than this.

Currently, the issue is that a vrf key under daemon_config overrides the ansible/templates/vrf/bird-clab.j2 script - hence the initial hack.

Somehow we need to make the daemon_config namespace distinct from regular module scripts, allowing both

jbemmel and others added 15 commits June 20, 2026 10:39
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@jbemmel jbemmel force-pushed the feature/bird-vrf-support branch from 4088875 to 7160c8b Compare June 20, 2026 15:40
jbemmel and others added 9 commits June 20, 2026 10:46
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@jbemmel jbemmel marked this pull request as ready for review June 20, 2026 19:52
@jbemmel

jbemmel commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author
  • Rebased from dev to get datapath wait functionality
  • Refactor FRR VRF datapath script such that BIRD can import as-is
  • Remove default router role (VRF test cases need fixing: [BUG] VRF integration tests fail to set role 'router' for DUT #3506)
  • Allow daemon config files to include "@conf" such that they can co-exist with a datapath script for the same module
  • Refactor BGP, OSPF and VRF config templates separating out the Jinja2 macro's
  • Align VRF logic with other devices (import BGP/OSPF macros)

@jbemmel jbemmel marked this pull request as draft June 20, 2026 20:02
Co-authored-by: Cursor <cursoragent@cursor.com>
@jbemmel jbemmel marked this pull request as ready for review June 20, 2026 20:27
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