interfaces.j2 943 B

12345678910111213141516171819202122232425262728293031
  1. # This file describes the network interfaces available on your system
  2. # and how to activate them. For more information, see interfaces(5).
  3. source /etc/network/interfaces.d/*
  4. # The loopback network interface
  5. auto lo
  6. iface lo inet loopback
  7. # The primary network interface
  8. allow-hotplug {{ primary_interface }}
  9. iface {{ primary_interface }} inet static
  10. address {{ primary_v4_address }}
  11. netmask {{ primary_v4_netmask }}
  12. {% if primary_v4_network is defined %}
  13. network {{ primary_v4_network }}
  14. {% endif %}
  15. {% if primary_v4_broadcast is defined %}
  16. broadcast {{ primary_v4_broadcast }}
  17. {% endif %}
  18. gateway {{ primary_v4_gateway }}
  19. {% if primary_pointopoint %}
  20. pointopoint {{ primary_v4_gateway }}
  21. {% endif %}
  22. iface {{ primary_interface }} inet6 static
  23. address {{ primary_v6_address }}
  24. gateway {{ primary_v6_gateway }}
  25. {% if primary_pointopoint %}
  26. pre-up ip -6 route add {{ primary_v6_gateway }} dev {{ primary_interface }}
  27. {% endif %}