summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-client
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-17 20:15:45 +0200
committerChristian Poessinger <christian@poessinger.com>2020-05-17 20:16:18 +0200
commitfaa85accc99d6ff777f12f5dd9e43a6dd8f7e7a2 (patch)
tree25b829b035940ade8ac5037bee33843a0318c504 /data/templates/dhcp-client
parent46d92ac80bdaa23d11b10b9261aa12a24c5cc5a1 (diff)
downloadvyos-1x-faa85accc99d6ff777f12f5dd9e43a6dd8f7e7a2.tar.gz
vyos-1x-faa85accc99d6ff777f12f5dd9e43a6dd8f7e7a2.zip
pppoe: dhcpv6-pd: T421: initial support
The following configuration will assign a /64 prefix out of a /56 delegation to eth0. The IPv6 address assigned to eth0 will be <prefix>::ffff/64. If you do not know the prefix size delegated to you, start with sla-len 0. pppoe pppoe0 { authentication { password vyos user vyos } description sadfas dhcpv6-options { delegate eth0 { interface-id 65535 sla-id 0 sla-len 8 } } ipv6 { address { autoconf } enable } source-interface eth1 } vyos@vyos:~$ show interfaces Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address S/L Description --------- ---------- --- ----------- eth0 2001:db8:8003:400::ffff/64 u/u
Diffstat (limited to 'data/templates/dhcp-client')
-rw-r--r--data/templates/dhcp-client/ipv6.tmpl35
1 files changed, 33 insertions, 2 deletions
diff --git a/data/templates/dhcp-client/ipv6.tmpl b/data/templates/dhcp-client/ipv6.tmpl
index 8485c9d78..6cfe24d3e 100644
--- a/data/templates/dhcp-client/ipv6.tmpl
+++ b/data/templates/dhcp-client/ipv6.tmpl
@@ -1,10 +1,41 @@
# generated by dhcp.py
+# man https://www.unix.com/man-page/debian/5/dhcp6c.conf/
+
interface {{ ifname }} {
- request domain-name-servers,domain-name;
+ request domain-name-servers;
+ request domain-name;
{% if dhcpv6_prm_only %}
information-only;
{% endif %}
{% if not dhcpv6_temporary %}
- send ia-na 0;
+ 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 %}
+