2020-11-09 13:58:09 +00:00
|
|
|
<%
|
|
|
|
from ipaddress import ip_network
|
|
|
|
%>\
|
|
|
|
[Match]
|
|
|
|
Name=${interface}
|
|
|
|
|
|
|
|
[Network]
|
|
|
|
DHCP=yes
|
|
|
|
IPv6AcceptRA=yes
|
2021-04-18 09:05:42 +00:00
|
|
|
|
|
|
|
[DHCPv4]
|
|
|
|
UseDomains=${str(config.get('use_dhcp_domains', False)).lower()}
|
2020-11-09 13:58:09 +00:00
|
|
|
UseHostname=no
|
2021-04-18 09:05:42 +00:00
|
|
|
UseMTU=${str(config.get('use_dhcp_mtu', True)).lower()}
|
|
|
|
UseNTP=${str(config.get('use_dhcp_ntp', False)).lower()}
|
|
|
|
UseTimezone=no
|
|
|
|
|
|
|
|
% if config.get('send_hostname', True):
|
|
|
|
SendHostname=yes
|
|
|
|
Hostname=${node.name.split('.')[-1]}
|
|
|
|
% else:
|
|
|
|
SendHostname=no
|
|
|
|
% endif
|
2020-11-09 13:58:09 +00:00
|
|
|
|
|
|
|
% if config.get('forwarding', False):
|
|
|
|
IPForward=yes
|
|
|
|
%endif
|