sonic-buildimage/dockers/docker-fpm-frr/frr/staticd/staticd.loopback_route.conf.j2
Guohan Lu ed58684e36 [docker-frr]: add static ipv6 loopback route to allow bgp to advertise prefix
frr does not advertise route if local route is not reachable, as a result
loopback route /64 is not advertised to the neighbors. Add static route
allows frr to advertise the route to its peers

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-12-28 10:34:34 -08:00

11 lines
489 B
Django/Jinja

!
{% from "common/functions.conf.j2" import get_ipv4_loopback_address, get_ipv6_loopback_address, get_vnet_interfaces %}
!
{% block loopback_route %}
! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") != 'None' %}
ipv6 route {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | replace('/128', '/64') | ip_network }}/64 Loopback0
{% endif %}
{% endblock loopback_route %}
!