Skip to content

BIRD EVPN MAC VRF support#3548

Merged
ipspace merged 4 commits into
devfrom
bird-evpn
Jul 1, 2026
Merged

BIRD EVPN MAC VRF support#3548
ipspace merged 4 commits into
devfrom
bird-evpn

Conversation

@ipspace

@ipspace ipspace commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Based on #3475 by @jbemmel

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds EVPN MAC-VRF (VLAN-based) support to the BIRD daemon integration by transforming VLAN EVPN RTs into BIRD syntax and introducing an EVPN config module/template, with small BGP template updates to enable EVPN AF sessions.

Changes:

  • Add RT transformation helper and apply it to VLAN EVPN import/export RT lists for BIRD rendering.
  • Introduce a new BIRD EVPN module template and register it in the BIRD daemon config map/features.
  • Extend BIRD BGP templates to declare the EVPN table and emit per-neighbor EVPN AF configuration when requested.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
netsim/devices/bird.py Adds RT transformation helper and applies it to VRF + VLAN EVPN RT lists.
netsim/daemons/bird/evpn.j2 New EVPN module rendering VLAN (MAC-VRF) and VRF transit-VNI EVPN protocol stanzas.
netsim/daemons/bird/bgp.macros.j2 Updates BGP protocol naming and adds optional EVPN AF block per neighbor.
netsim/daemons/bird/bgp.j2 Declares evpntab when any EVPN-enabled neighbor exists.
netsim/daemons/bird.yml Registers the EVPN module config output and advertises EVPN/VXLAN capability.

Comment thread netsim/daemons/bird/bgp.macros.j2 Outdated
Comment thread netsim/daemons/bird/evpn.j2 Outdated
Comment thread netsim/daemons/bird/evpn.j2 Outdated
Comment thread netsim/daemons/bird/evpn.j2 Outdated
ipspace added a commit that referenced this pull request Jun 30, 2026
@ipspace ipspace requested a review from jbemmel June 30, 2026 09:00
Comment thread docs/platforms.md
| Arista EOS | ✅ | ✅ | ✅ | ✅ |
| Aruba AOS-CX | ✅ | ✅ | ✅ | ✅ |
| BIRD | ❌ | | ❌ | ✅ |
| BIRD | ❌ | | ❌ | ✅ |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

BIRD does support BFD for BGP, unrelated to this PR

Comment thread netsim/daemons/bird/bgp.macros.j2 Outdated
table evpntab;
import all;
export all;
{% if n.type == 'ebgp' %}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if 'ebgp' in n.type to include confed_ebgp

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Of course. Fixed.

That's what happens when you blindly copy other people's code 🤷🏻‍♂️

{% if 'router_id' in bgp %}
router id {{ bgp.router_id }};
{% endif %}
{% for n in bgp.neighbors|default([]) if n.evpn|default(false) %}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if bgp.neighbors|default([])|selectattr('evpn','defined')

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

You love making Jinja2 resemble Perl, right? 😜

@jbemmel jbemmel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How could youI forget about confederated EVPN EBGP scenarios ;)

_Confederated EBGP EVPN designs are not an absolute inevitability for most networks, but they become highly compelling at massive scale because they bridge the gap between the limitations of pure IBGP and pure EBGP:

The Problem: Pure IBGP scales poorly due to the massive CPU/memory burden placed on Route Reflectors by EVPN's chatty control plane. Pure EBGP scales well but strips or alters critical BGP attributes (like Next-Hop) at AS boundaries, which breaks advanced EVPN features like ESI multi-homing and seamless data-plane tunneling.

The Solution: BGP Confederations break a massive network into small, manageable internal sub-ASns. This provides the scalability and blast-radius isolation of EBGP while natively preserving the internal routing attributes of IBGP.

Ultimately, while unnecessary for standard enterprises, the design is functionally driven by the need to scale EVPN's massive control plane across hyperscale or multi-site data centers without breaking its underlying architecture._

@ipspace

ipspace commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

How could youI forget about confederated EVPN EBGP scenarios ;)

You're absolutely right. What a mistake 😂

Ultimately, while unnecessary for standard enterprises, the design is functionally driven by the need to scale EVPN's massive control plane across hyperscale or multi-site data centers without breaking its underlying architecture.

Where did you get this wonderful pile of BS?

@ipspace ipspace merged commit cb1776a into dev Jul 1, 2026
@ipspace ipspace deleted the bird-evpn branch July 1, 2026 04:40
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.

3 participants