servers/roles/debian/templates/frr.conf.j2
Timotej Lazar 63ab087645 debian: get inventory data from netbox
Set standardized interface names (mgmt0… for L2 management interfaces
and lan0… for L3 data interfaces speaking BGP). ASN is stored as a
custom field in netbox but that might change.
2023-07-20 13:24:51 +02:00

29 lines
793 B
Django/Jinja

frr defaults datacenter
service integrated-vtysh-config
log syslog
router bgp {{ hostvars[inventory_hostname].custom_fields.asn.asn }}
bgp bestpath as-path multipath-relax
neighbor fabric peer-group
neighbor fabric remote-as external
neighbor fabric capability extended-nexthop
{% for iface in hostvars[inventory_hostname].interfaces | selectattr('name', 'match', '^lan') %}
neighbor {{ iface.name }} interface peer-group fabric
neighbor {{ iface.name }} bfd
{% endfor %}
address-family ipv4 unicast
redistribute connected route-map loopback
neighbor fabric activate
exit-address-family
address-family ipv6 unicast
redistribute connected route-map loopback
neighbor fabric activate
exit-address-family
route-map loopback permit 1
match interface lo