Skip to content

Commit

Permalink
frr: make it possible to not use ipv6 in the leaf template
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Sep 25, 2024
1 parent 4842b79 commit c527d8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/frr/templates/frr_leaf.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ router bgp {{ frr_local_as }}
maximum-paths 2
exit-address-family
!
{% if frr_loopback_v6 | length %}
address-family ipv6 unicast
redistribute connected route-map bgp_out
{% for item in frr_uplinks %}
neighbor {{ item.interface }} activate
neighbor {{ item.interface }} route-map bgp_out out
{% endfor %}
exit-address-family
{% endif %}
exit
!
route-map bgp_out permit 10
Expand All @@ -37,10 +39,14 @@ route-map RM_SET_SRC4 permit 10
set src {{ frr_loopback_v4 }}
exit
!
{% if frr_loopback_v6 | length %}
route-map RM_SET_SRC6 permit 10
set src {{ frr_loopback_v6 }}
exit
!
{% endif %}
ip protocol bgp route-map RM_SET_SRC4
!
{% if frr_loopback_v6 | length %}
ipv6 protocol bgp route-map RM_SET_SRC6
{% endif %}

0 comments on commit c527d8d

Please sign in to comment.