From 0327dc48255a7f27fcaea06c4cf2481a0d432b19 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 9 Apr 2021 21:04:25 +0200 Subject: bgp: evpn: T1513: add support for ipv4/ipv6 prefix routes advertisements set vrf name red protocols bgp address-family l2vpn-evpn advertise ipv4 unicast --- data/templates/frr/bgp.frr.tmpl | 7 +++++++ .../include/bgp/bgp-afi-l2vpn-advertise.xml.i | 10 ++++++++++ .../include/bgp/bgp-common-config.xml.i | 23 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index cbf83e3fd..3598d9ff0 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -238,6 +238,13 @@ router bgp {{ local_as }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none network {{ network }}{% if afi_config.network[network].route_map is defined %} route-map {{ afi_config.network[network].route_map }}{% endif %}{% if afi_config.network[network].backdoor is defined %} backdoor{% endif %} {####### we need this blank line!! #######} +{% endfor %} +{% endif %} +{% if afi_config.advertise is defined and afi_config.advertise is not none %} +{% for adv_afi, adv_afi_config in afi_config.advertise.items() %} +{% if adv_afi_config.unicast is defined and adv_afi_config.unicast is not none %} + advertise {{ adv_afi }} unicast {{ 'route-map ' + adv_afi_config.unicast.route_map if adv_afi_config.unicast.route_map is defined }} +{% endif %} {% endfor %} {% endif %} {% if afi_config.advertise_all_vni is defined %} diff --git a/interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i b/interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i new file mode 100644 index 000000000..caf0b6b31 --- /dev/null +++ b/interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i @@ -0,0 +1,10 @@ + + + + IPv4 address family + + + #include + + + diff --git a/interface-definitions/include/bgp/bgp-common-config.xml.i b/interface-definitions/include/bgp/bgp-common-config.xml.i index 14070e006..813da097c 100644 --- a/interface-definitions/include/bgp/bgp-common-config.xml.i +++ b/interface-definitions/include/bgp/bgp-common-config.xml.i @@ -215,6 +215,29 @@ L2VPN EVPN BGP settings + + + Advertise prefix routes + + + + + IPv4 address family + + + #include + + + + + IPv6 address family + + + #include + + + + Advertise All local VNIs -- cgit v1.2.3