sonic-buildimage/dockers/docker-fpm-gobgp/gobgpd.conf.j2
Taoyu Li a2fe0212be [ConfigDB] Move all BGP configuration into DB (#861)
- BGP data read from minigraph.py now match DB schema
- BGP templates are updated
- bgpcfgd can now deal with runtime neighbor create/delete
2017-08-08 16:23:58 -07:00

29 lines
834 B
Django/Jinja

[global.config]
as = {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
router-id = "{{ minigraph_lo_interfaces[0]['addr'] }}"
{% for neighbor_addr, bgp_session in BGP_NEIGHBOR.iteritems() %}
{% if bgp_session['asn'] != 0 %}
[[neighbors]]
[neighbors.config]
peer-as = {{ bgp_session['asn'] }}
neighbor-address = "{{ neighbor_addr }}"
[neighbors.graceful-restart.config]
enabled = true
[[neighbors.afi-safis]]
[neighbors.afi-safis.config]
{% if neighbor_addr | ipv6 %}
afi-safi-name = "ipv6-unicast"
{% else %}
afi-safi-name = "ipv4-unicast"
{% endif %}
[neighbors.afi-safis.mp-graceful-restart.config]
enabled = true
{% endif %}
{% endfor %}
[zebra]
[zebra.config]
enabled = true
url = "unix:/var/run/quagga/zserv.api"
redistribute-route-type-list = ["connect"]