From c14098b7b1517d77bf53318cc7964295d54db119 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 10 Mar 2021 20:33:36 +0100 Subject: bgp: evpn: T1513: add support for per VNI route-distinguished and route-target set protocols bgp 65010 address-family l2vpn-evpn vni 100 route-target both 516:10516 set protocols bgp 65010 address-family l2vpn-evpn vni 100 rd 192.168.0.1:514 Todo: add verify() step to check if at least one evpn enabled BGP neighbor exits, else FRR will error out with: This command is only supported under EVPN VRF --- data/templates/frr/bgp.frr.tmpl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'data') diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index 3101de7ea..f7aeaeb9d 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -279,6 +279,20 @@ router bgp {{ asn }} {% endif %} {% if vni_config.advertise_svi_ip is defined %} advertise-svi-ip +{% endif %} +{% if vni_config.rd is defined and vni_config.rd is not none %} + rd {{ vni_config.rd }} +{% endif %} +{% if vni_config.route_target is defined and vni_config.route_target is not none %} +{% if vni_config.route_target.both is defined and vni_config.route_target.both is not none %} + route-target both {{ vni_config.route_target.both }} +{% endif %} +{% if vni_config.route_target.export is defined and vni_config.route_target.export is not none %} + route-target export {{ vni_config.route_target.export }} +{% endif %} +{% if vni_config.route_target.import is defined and vni_config.route_target.import is not none %} + route-target import {{ vni_config.route_target.import }} +{% endif %} {% endif %} exit-vni {% endfor %} -- cgit v1.2.3