From 9454e036cb6a708f7b7bcc2273ca8977ea3af117 Mon Sep 17 00:00:00 2001 From: vagrant Date: Wed, 26 Aug 2020 03:36:53 +0000 Subject: [PATCH 1/2] added networks_to_announce_ipv4 --- templates/frr.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/frr.conf.j2 b/templates/frr.conf.j2 index cbdd33f..4ae9559 100644 --- a/templates/frr.conf.j2 +++ b/templates/frr.conf.j2 @@ -47,6 +47,9 @@ router bgp {{host_ASN}} {% if host_loopback_IP is defined %} network {{host_loopback_IP}}/32 {% endif %} +{% if networks_to_announce_ipv4 is defined and networks_to_announce_ipv4 != [] %} + network {{networks_to_announce_ipv4}} +{% endif %} {% if autobgp_interfaces is defined and autobgp_interfaces != [] %} neighbor fabric activate neighbor fabric prefix-list AS{{host_ASN}}-OUT out From fba4f619338b064f57267a4ca9013dc4ef7d8025 Mon Sep 17 00:00:00 2001 From: vagrant Date: Wed, 26 Aug 2020 04:40:12 +0000 Subject: [PATCH 2/2] Mod --- templates/frr.conf.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/frr.conf.j2 b/templates/frr.conf.j2 index 4ae9559..4199bce 100644 --- a/templates/frr.conf.j2 +++ b/templates/frr.conf.j2 @@ -48,7 +48,9 @@ router bgp {{host_ASN}} network {{host_loopback_IP}}/32 {% endif %} {% if networks_to_announce_ipv4 is defined and networks_to_announce_ipv4 != [] %} - network {{networks_to_announce_ipv4}} +{% for item in networks_to_announce_ipv4 %} + network {{item}} +{% endfor %} {% endif %} {% if autobgp_interfaces is defined and autobgp_interfaces != [] %} neighbor fabric activate @@ -56,7 +58,7 @@ router bgp {{host_ASN}} {% endif %} {% if frr_other_peers is defined and frr_other_peers != [] %} {% for item in frr_other_peers %} - neighbor {{ item['ip'] }} remote-as {{ item['remote_ASN'] }} prefix-list AS{{host_ASN}}-OUT out + neighbor {{ item['ip'] }} remote-as {{ item['remote_ASN'] }} prefix-list AS{{host_ASN}}-OUT out {% endfor %} {% endif %} {% if addressed_interfaces is defined and addressed_interfaces != [] %}