summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-client/ipv6.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/dhcp-client/ipv6.tmpl')
-rw-r--r--data/templates/dhcp-client/ipv6.tmpl43
1 files changed, 40 insertions, 3 deletions
diff --git a/data/templates/dhcp-client/ipv6.tmpl b/data/templates/dhcp-client/ipv6.tmpl
index be0235add..6cfe24d3e 100644
--- a/data/templates/dhcp-client/ipv6.tmpl
+++ b/data/templates/dhcp-client/ipv6.tmpl
@@ -1,4 +1,41 @@
# generated by dhcp.py
-interface "{{ ifname }}" {
- request routers, domain-name-servers, domain-name;
-}
+# man https://www.unix.com/man-page/debian/5/dhcp6c.conf/
+
+interface {{ ifname }} {
+ request domain-name-servers;
+ request domain-name;
+{% if dhcpv6_prm_only %}
+ information-only;
+{% endif %}
+{% if not dhcpv6_temporary %}
+ send ia-na 1; # non-temporary address
+{% endif %}
+{% if dhcpv6_pd %}
+ send ia-pd 2; # prefix delegation
+{% endif %}
+};
+
+{% if not dhcpv6_temporary %}
+id-assoc na 1 {
+ # Identity association NA
+};
+{% endif %}
+
+{% if dhcpv6_pd %}
+id-assoc pd 2 {
+{% for intf in dhcpv6_pd %}
+ prefix-interface {{ intf.ifname }} {
+{% if intf.sla_id %}
+ sla-id {{ intf.sla_id }};
+{% endif %}
+{% if intf.sla_len %}
+ sla-len {{ intf.sla_len }};
+{% endif %}
+{% if intf.if_id %}
+ ifid {{ intf.if_id }};
+{% endif %}
+ };
+{% endfor %}
+};
+{% endif %}
+