Self-organizing SR Linux (part II): EVPN based auto-provisioning of Multi-Homed LAGs 🦵
A few weeks ago I wrote about my self-organizing agent project on GitHub, showing how LLDP could be used to both discover and communicate about peer attachments. While the prototype works (eventually), the 30-second interval between LLDP messages makes for a bit of a wait. Not ideal to say the least. Fortunately, as hinted at in the previous post, there are better ways…
RFC8092 specifies so-called “Large Communities” — 12-byte attributes that can carry pretty much arbitrary data. Although the RFC suggests the inclusion of an ASN as the first 4-byte value, there is not much stopping us from using the full 12 bytes within the confines of a private data center fabric. So ignoring these well intended limitations, we can proceed:
Communicating Communities across the Fabric
In order for other leaves to receive these communities, they must be attached to one (or more) EVPN routes. Fortunately it is easy enough to advertise a loopback IP:
Even though this is only used for control plane purposes, the system still requires us to associate a VXLAN data plane interface — a small price to pay for distributed automation. Note that a custom EVPN proxy application could circumvent this limitation if required.
In order to receive these routes, each agent can listen for gNMI onchange events on the local router. Specifically, the agent can monitor changes to the special ‘evpn-lag-discovery’ VRF under
/network-instance[name=evpn-lag-discovery]/route-table/ipv4-unicast/route[route-owner=bgp_evpn_mgr]/next-hop-group
By alternatingly creating and removing an additional dummy loopback IP (99.99.99.99/32), we can trigger a route update every time we add or remove an LLDP neighbor.
A match made in the cloud ⛅
Every agent that receives a BGP Community that matches a local neighbor ( i.e. having the same 6-byte MAC address) upgrades the corresponding local LAG to a MC-LAG backed by EVPN signaling. This involves a minor update to create an Ethernet Segment:
The configuration is annotated with details about the peers (up to 4 per MH Segment); additional aspects like static versus LACP could be taken into account as well.
All’s well that LAGs well
Even with a modern dynamic EVPN control plane, routers in networks still require a minimal basic configuration to start from. This auto-config agent presents one way to help you do this.