summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-09 21:04:25 +0200
committerChristian Poessinger <christian@poessinger.com>2021-04-09 21:04:25 +0200
commit0327dc48255a7f27fcaea06c4cf2481a0d432b19 (patch)
tree86dadd6547ce110a362b6b2350806f6b8769d317
parent1ad3b2b10d1f73c509d5193ba72cbb8cc196b7d3 (diff)
downloadvyos-1x-0327dc48255a7f27fcaea06c4cf2481a0d432b19.tar.gz
vyos-1x-0327dc48255a7f27fcaea06c4cf2481a0d432b19.zip
bgp: evpn: T1513: add support for ipv4/ipv6 prefix routes advertisements
set vrf name red protocols bgp address-family l2vpn-evpn advertise ipv4 unicast
-rw-r--r--data/templates/frr/bgp.frr.tmpl7
-rw-r--r--interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i10
-rw-r--r--interface-definitions/include/bgp/bgp-common-config.xml.i23
3 files changed, 40 insertions, 0 deletions
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
@@ -240,6 +240,13 @@ router bgp {{ local_as }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none
{% 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 %}
advertise-all-vni
{% endif %}
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 @@
+<!-- include start from bgp/bgp-afi-l2vpn-advertise.xml.i -->
+<node name="unicast">
+ <properties>
+ <help>IPv4 address family</help>
+ </properties>
+ <children>
+ #include <include/route-map.xml.i>
+ </children>
+</node>
+<!-- include end -->
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 @@
<help>L2VPN EVPN BGP settings</help>
</properties>
<children>
+ <node name="advertise">
+ <properties>
+ <help>Advertise prefix routes</help>
+ </properties>
+ <children>
+ <node name="ipv4">
+ <properties>
+ <help>IPv4 address family</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-l2vpn-advertise.xml.i>
+ </children>
+ </node>
+ <node name="ipv6">
+ <properties>
+ <help>IPv6 address family</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-l2vpn-advertise.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
<leafNode name="advertise-all-vni">
<properties>
<help>Advertise All local VNIs</help>