puppet-prod/modules/frrouting/templates/frr.conf.erb
Ben Vincent f4ac1f2000 feat: manage route-reflectors
- add route-reflector role and hieradata
- enable using dhcp in networkd
- add hieradata/node/* entries for route-reflectors
2025-04-26 00:22:49 +10:00

49 lines
1.2 KiB
Plaintext

# THIS FILE IS MANAGED BY PUPPET
frr defaults traditional
hostname <%= @hostname %>
no ipv6 forwarding
<% @ospfd_interfaces.each do |iface, params| -%>
interface <%= iface %>
<% if params['area'] -%>
ip ospf area <%= params['area'] %>
<% end -%>
<% if params['passive'] == true -%>
ip ospf passive
<% end -%>
<% if @mpls_ldp_interfaces and @mpls_ldp_interfaces.include?(iface) -%>
mpls enable
<% end -%>
exit
<% end -%>
router ospf
ospf router-id <%= @ospfd_router_id %>
log-adjacency-changes detail
<% @ospfd_redistribute.each do |type| -%>
redistribute <%= type %>
<% end -%>
<% @ospfd_networks.each do |network| -%>
network <%= network %>
<% end -%>
<% if @ospfd_default_originate_always -%>
default-information originate always
<% end -%>
<% if @mpls_te_enabled -%>
capability opaque
mpls-te on
mpls-te router-address <%= @ospfd_router_id %>
mpls-te inter-as area 0.0.0.0
<% end -%>
exit
<% if @mpls_ldp_router_id and @mpls_ldp_transport_addr and @mpls_ldp_interfaces.any? -%>
mpls ldp
router-id <%= @mpls_ldp_router_id %>
address-family ipv4
discovery transport-address <%= @mpls_ldp_transport_addr %>
<% @mpls_ldp_interfaces.each do |iface| -%>
interface <%= iface %>
exit
<% end -%>
exit-address-family
exit
<% end -%>