protocol bgp {{ peer.name }} from dnpeers { {% if not peer.linklocal|default(False) %} neighbor {{ peer.v6 }} as {{ peer.as }}; {% else %} # if you use link-local ipv6 addresses for peering using the following neighbor {{ peer.v6 }} % '{{ peer.if }}' as {{ peer.as }}; {% endif %} };