config.j2 477 B

123456789101112
  1. auto {{ item.interface }}
  2. iface {{ item.interface }} inet6 manual
  3. {% if item.vxlan.type == "ipv4" %}
  4. {% set localip = system.ipv4 %}
  5. {% else %}
  6. {% set localip = system.ipv6 %}
  7. {% endif %}
  8. pre-up ip link add {{ item.interface }} type vxlan id {{ item.vxlan.vni }} remote {{ item.vxlan.endpoint }} local {{ localip }} dstport {{ item.vxlan.port }}
  9. up ip addr add dev {{ item.interface }} {{ peering.linklocal }}/64
  10. post-down ip link del {{ item.interface }}