Factor frr role from debian, ceph and proxmox
Consolidate base system and networking setup into debian role and BGP configuration into frr role. Add facts role to collect data from NetBox once to avoid many slow lookups. Also many other tweaks and cleanups.
This commit is contained in:
parent
256dae2955
commit
25bcddede1
31 changed files with 167 additions and 312 deletions
46
roles/frr/templates/frr.conf.j2
Normal file
46
roles/frr/templates/frr.conf.j2
Normal file
|
@ -0,0 +1,46 @@
|
|||
frr defaults datacenter
|
||||
service integrated-vtysh-config
|
||||
log syslog
|
||||
|
||||
# we only have the default route, so allow talking to BGP peers over it
|
||||
ip nht resolve-via-default
|
||||
|
||||
router bgp {{ 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 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
|
||||
neighbor fabric route-map local out
|
||||
exit-address-family
|
||||
|
||||
address-family ipv6 unicast
|
||||
redistribute connected route-map loopback
|
||||
neighbor fabric activate
|
||||
neighbor fabric route-map local out
|
||||
exit-address-family
|
||||
|
||||
{% if cluster.custom_fields and cluster.custom_fields.vlans %}
|
||||
address-family l2vpn evpn
|
||||
neighbor fabric activate
|
||||
neighbor fabric route-map local out
|
||||
advertise-all-vni
|
||||
exit-address-family
|
||||
{% endif %}
|
||||
|
||||
bgp as-path access-list local permit ^$
|
||||
|
||||
route-map loopback permit 1
|
||||
match interface lo
|
||||
|
||||
route-map local permit 1
|
||||
match as-path local
|
Loading…
Add table
Add a link
Reference in a new issue