EVPN type-2 MACIP not imported into other VRFs by originating node, only at receivers #16161
Closed
2 tasks done
Labels
triage
Needs further investigation
Description
I am not 100% certain whether or not this is a bug, or expected behaviour. In any case, it leads to suboptimal routing, so if it is not a bug, it could be considered a feature request at least.
When importing routes from an EVPN VRF into another VRF (such as the default VRF), type-2 MACIP routes (containing an IP address) do not get imported into the target VRF on the node that originated the type-2 MACIP route (i.e., the one that has the MAC/IP in the type-2 route locally attached). It is however imported on all other nodes.
This leads to suboptimal routing as traffic the traffic from the external network is always directed to a node where the MAC/IP destination is not present. From there it will be encapsulated in VXLAN and sent to the target node.
It would be better if also the node where the MAC/IP is present could also import the route into the target VRF and re-advertise it there, as that path would be preferred by the external network (due to a shorter AS path)
Version
How to reproduce
To illustrate, I've set up a lab with three Debian 12 nodes connected in a triangle (full mesh between interfaces
ens7
andens8
on each node).One of the nodes,
frrtest
, does not participate in EVPN - it represents the external network.The other two nodes,
frrtest2
andfrrtest3
, represents two EVPN routers with ASN 2 and 3, with a single L3VNI (10) bound to VRF 10, and an IRB on L2VNI 100. Static MAC/ARP entries are used to generate type-2 routes for (192.168.0.2 and 192.168.0.3) are used to represent downstream hosts on the L2VNI. The default VRF imports routes from VRF 10.These are the scripts I use to configure the three nodes from scratch:
frrtest1
frrtest2 and frrtest3
Expected behavior
frrtest should see a direct route to 192.168.0.2 via frrtest2, and a direct route to 192.168.0.3 via frrtest3.
Both frrtest2 and frrtest3 should see routes to 192.168.0.2 and 192.168.0.3 in the default VRF with an AS-path length of null for the locally generated route, and one for the route received from the other EVPN node.
Actual behavior
frrtest only sees a route to 192.168.0.2 via frrtest3 (as-path 3 2) and t 192.168.0.3 via frtest2 (as-path 2 3):
This is also visible on frrtest2 and frrtest3, which only has routes in the default VRF to the remote MACIP route, not to its own:
Additional context
Both frrtest2 and frrtest3 see their local and the remote MACIP route with the expected as-path lengths (null for the locally generated type-2, one AS for the remotely generated one):
frrtest2
frrtest3
I would be happy to give any interested developer access to this lab (including full sudo access) in case that is of interest.
Checklist
The text was updated successfully, but these errors were encountered: