78ce6b951f
* Adjusting FRR's jinja template to meet latest sonic-cfgen requirements. Basically, i'm just extending #448 changes into FRR. * Eliminate FRR's integrated-config file to prevent daemons from bypassing their own config files. FRR daemons now default to an integrated-config file for config-parsing purposes. But we are still interested in having each daemon looking in their specific config file (bgpd.conf, zebra.conf, etc). So here i'm just deleting this integrating-config file to prevent FRR from running from a bogus config-file. RB= G=lnos-reviewers R=ntrianta,rjonnadu,rmolina,sfardeen,zxu A=
67 lines
1.6 KiB
Django/Jinja
67 lines
1.6 KiB
Django/Jinja
!
|
|
{% block banner %}
|
|
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
|
|
! generated by templates/quagga/zebra.conf.j2 using minigraph_facts.py
|
|
! file: zebra.conf
|
|
!
|
|
{% endblock banner %}
|
|
!
|
|
{% block sys_init %}
|
|
hostname {{ inventory_hostname }}
|
|
password zebra
|
|
enable password zebra
|
|
{% endblock sys_init %}
|
|
!
|
|
{% block interfaces %}
|
|
! Enable link-detect (default disabled)
|
|
{% for interface in minigraph_interfaces %}
|
|
interface {{ interface['attachto'] }}
|
|
link-detect
|
|
!
|
|
{% endfor %}
|
|
{% for interface in minigraph_portchannels.keys() %}
|
|
interface {{ interface }}
|
|
link-detect
|
|
!
|
|
{% endfor %}
|
|
{% endblock interfaces %}
|
|
!
|
|
{% block default_route %}
|
|
! set static default route to mgmt gateway as a backup to learned default
|
|
ip route 0.0.0.0/0 {{ minigraph_mgmt_interface['gwaddr'] }} 200
|
|
{% endblock default_route %}
|
|
!
|
|
{% block source_loopback %}
|
|
! Set ip source to loopback for bgp learned routes
|
|
route-map RM_SET_SRC permit 10
|
|
set src {{ minigraph_lo_interfaces[0]['addr'] }}
|
|
!
|
|
{% set lo_ipv6_addrs = [] %}
|
|
{% if minigraph_lo_interfaces is defined %}
|
|
{% for interface in minigraph_lo_interfaces %}
|
|
{% if interface['addr'] is defined and interface['addr']|ipv6 %}
|
|
{% if lo_ipv6_addrs.append(interface['addr']) %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if lo_ipv6_addrs|length > 0 %}
|
|
route-map RM_SET_SRC6 permit 10
|
|
set src {{ lo_ipv6_addrs[0] }}
|
|
!
|
|
{% endif %}
|
|
ip protocol bgp route-map RM_SET_SRC
|
|
!
|
|
{% if lo_ipv6_addrs|length > 0 %}
|
|
ipv6 protocol bgp route-map RM_SET_SRC6
|
|
!
|
|
{% endif %}
|
|
{% endblock source_loopback %}
|
|
!
|
|
{% block logging %}
|
|
log syslog informational
|
|
log facility local4
|
|
{% endblock logging %}
|
|
!
|
|
|