{% import "juniper-macros.j2" as junos %} {{ junos.systemsection(device) }} {% if device['device_role']['name'] == 'Leaf' %} {{ junos.chassissection(device) }} {% endif %} {{ junos.interfacesection(device,vlans) }} {% if device['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) }} protocols { {{ junos.bgpsection(device, devices, underlay_ips, underlay_as) }} {% if device['device_role']['name'] == 'Leaf' %} evpn { encapsulation vxlan; extended-vni-list all; } {% endif %} lldp { interface all; } } {% if device['device_role']['name'] == 'Leaf' %} switch-options { vtep-source-interface lo0.0; route-distinguisher {{ device['primary_ip4']['address'][:-3] }}:1; vrf-target { target:64512:1111; auto; } } {{ junos.vlanssection(vlans, device) }} {% endif %}