spine.j2 987 Bytes
Newer Older
Bill Grant's avatar
Bill Grant committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
ip routing
!
lldp run
!
{% for interface in host.interfaces -%}
interface Ethernet{{ interface.number }}
  description {{ interface.description }}
  logging event link-status
  no switchport
  ip address {{ interface.ip }}
  arp timeout 900
  no shutdown
!
{% endfor -%}
{% for loopback in host.loopbacks -%}
interface loopback{{ loopback.number }}
  ip address {{ loopback.ip }}
!
{% endfor -%}
router bgp {{ bgp.as }}
  bgp log-neighbor-changes
  distance bgp {{ bgp.distance }}
  maximum-paths {{ bgp.maxpaths }} ecmp {{ bgp.maxroutes }}
  {% for peergroup in host.peergroups -%}
  neighbor {{ peergroup.name}} peer-group
  neighbor {{ peergroup.name }} remote-as {{ peergroup.remoteas }}
  neighbor {{ peergroup.name }} maximum-routes {{ peergroup.maxroutes }}
  {% for neighbor in peergroup.neighbors -%}
  neighbor {{ neighbor }} peer-group {{ peergroup.name }}
  {% endfor -%}
  {% endfor -%}
  {% for network in host.bgpnetworks -%}
  network {{ network }}
  {% endfor -%}
!
end