d30fbf1d72
- Extending SONiC building infrastructure to provide users with greater flexibility, by allowing them to elect a routing-stack different than the default one (quagga). The desired routing-stack will be defined in rules/config file. - As part of these changes I'm adding support for Free-Range-Routing (FRR) stack. Quagga will continue to be the default routing-stack. Signed-off-by: Rodny Molina <rodny@linkedin.com>
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['alias'] }}
|
|
link-detect
|
|
!
|
|
{% endfor %}
|
|
{% for interface in minigraph_portchannel_interfaces %}
|
|
interface {{ interface['name'] }}
|
|
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 %}
|
|
!
|
|
|