sonic-buildimage/dockers/docker-fpm-quagga/zebra.conf.j2
pavel-shirshov a881a23908
[bgpcfgd]: Generate set src configuration dynamically (#4273)
* [bgpcfgd]: Generate set src configuration dynamically

Sometimes zebra starts faster then swss configures Loopback0
In this case "set src" inside of the route map will not be
inserted to the configuration because zebra doesn't see Loopback
ips in the list of available ip addresses.

I've added extra logic to push the "set src" configuration only
when Loopback has been configured by swss.
2020-03-18 08:48:03 -07:00

44 lines
988 B
Django/Jinja

!
{% block banner %}
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
! generated by templates/quagga/zebra.conf.j2 using config DB data
! file: zebra.conf
!
{% endblock banner %}
!
{% block sys_init %}
hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
password zebra
enable password zebra
{% endblock sys_init %}
!
{% block interfaces %}
! Enable link-detect (default disabled)
{% for (name, prefix) in INTERFACE %}
interface {{ name }}
link-detect
!
{% endfor %}
{% for pc in PORTCHANNEL %}
interface {{ pc }}
link-detect
!
{% endfor %}
{% endblock interfaces %}
!
{% block default_route %}
! set static default route to mgmt gateway as a backup to learned default
{% for (name, prefix) in MGMT_INTERFACE %}
{% if prefix | ipv4 %}
ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
{% endif %}
{% endfor %}
{% endblock default_route %}
!
{% block logging %}
log syslog informational
log facility local4
{% endblock logging %}
!