2018-09-14 14:53:38 +02:00
|
|
|
# This file describes the network interfaces available on your system
|
|
|
|
# and how to activate them. For more information, see interfaces(5).
|
|
|
|
|
|
|
|
# The loopback network interface
|
|
|
|
iface lo inet loopback
|
|
|
|
|
|
|
|
# The primary network interface
|
|
|
|
auto {{ eni_interface_name }}
|
|
|
|
iface {{ eni_interface_name }} inet static
|
|
|
|
address {{ eni_ipv4_address }}
|
|
|
|
gateway {{ eni_ipv4_gateway }}
|
|
|
|
|
2020-04-26 18:39:25 +02:00
|
|
|
{% if eni_ipv6_address and eni_ipv6_gateway %}
|
2018-09-14 14:53:38 +02:00
|
|
|
iface {{ eni_interface_name }} inet6 static
|
|
|
|
address {{ eni_ipv6_address }}
|
2020-04-26 18:39:25 +02:00
|
|
|
netmask 128
|
|
|
|
|
|
|
|
post-up /sbin/ip -f inet6 route add {{ eni_ipv6_gateway }} dev {{ eni_interface_name }}
|
|
|
|
post-up /sbin/ip -f inet6 route add default via {{ eni_ipv6_address }}
|
|
|
|
pre-down /sbin/ip -f inet6 route del {{ eni_ipv6_gateway }} dev {{ eni_interface_name }}
|
|
|
|
pre-down /sbin/ip -f inet6 route del default via {{ eni_ipv6_gateway }}
|
|
|
|
{% endif %}
|