diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-05-17 20:15:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-05-17 20:16:18 +0200 |
commit | faa85accc99d6ff777f12f5dd9e43a6dd8f7e7a2 (patch) | |
tree | 25b829b035940ade8ac5037bee33843a0318c504 /python/vyos | |
parent | 46d92ac80bdaa23d11b10b9261aa12a24c5cc5a1 (diff) | |
download | vyos-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 'python/vyos')
-rw-r--r-- | python/vyos/ifconfig/dhcp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/dhcp.py b/python/vyos/ifconfig/dhcp.py index 95623a76e..f8fdeb6a9 100644 --- a/python/vyos/ifconfig/dhcp.py +++ b/python/vyos/ifconfig/dhcp.py @@ -86,6 +86,7 @@ class _DHCPv6 (Control): 'ifname': ifname, 'dhcpv6_prm_only': False, 'dhcpv6_temporary': False, + 'dhcpv6_pd': [], }) self._conf_file = f'/run/dhcp6c/dhcp6c.{ifname}.conf' @@ -107,7 +108,7 @@ class _DHCPv6 (Control): raise Exception( 'DHCPv6 temporary and parameters-only options are mutually exclusive!') - render(self._conf_file, 'dhcp-client/ipv6.tmpl', self.options) + render(self._conf_file, 'dhcp-client/ipv6.tmpl', self.options, trim_blocks=True) return self._cmd('systemctl restart dhcp6c@{ifname}.service'.format(**self.options)) def delete(self): |