{% import "juniper-macros.j2" as junos %} {{ junos.systemsection(device,root_pw,users,syslog_servers,ntp_servers) }} {% if device.role.name == 'Leaf' %} {{ junos.chassissection(device,breakout_ports) }} {% endif %} {{ junos.interfacesection(device,ipam.VLAN.objects.filter(tenant=device.tenant)) }} {{ junos.snmpsection(device, snmp) }} {% if device.role.name == 'Leaf' %} forwarding-options { storm-control-profiles default { all; } } {% endif %} policy-options { policy-statement BGP_LOOPBACK0 { term TERM1 { from { protocol direct; route-filter {{ device.primary_ip4.address }} exact; } then accept; } } policy-statement PFE-ECMP { then { load-balance per-packet; } } } {{ junos.routingoptionssection(device, overlay_as, gateway) }} protocols { {% if device.role.name in ['Leaf','Spine'] %} {{ junos.bgpsection(device,dcim.Device.objects.filter(tenant=device.tenant,role__name='Spine')) }} {% if device.role.name == 'Leaf' %} evpn { encapsulation vxlan; extended-vni-list all; } {% endif %} {% endif %} lldp { interface all; } {% if sflow %} {{ junos.sflowsection(sflow) }} {% endif %} } {% if device.role.name == 'Leaf' %} switch-options { vtep-source-interface lo0.0; route-distinguisher {{ device.primary_ip4.address.ip }}:1; vrf-target { target:64512:1111; auto; } } {{ junos.vlanssection(ipam.VLAN.objects.filter(tenant=device.tenant), device) }} {% endif %}