From 7dddfa338800303335673df637a05d8aaaccdaa2 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 25 May 2020 21:11:43 +0200 Subject: dhcpv6-pd: T2506: add option to request specific prefix length Some ISPs (e.g. Comcast) only delegate a /64 by default. You have to explicitly "ask" for a bigger (e.g. /60) prefix. This commit adds a CLI node to request a specific prefix length in the range 32 - 64. dhcpv6-options { prefix-delegation { length 60 } } --- python/vyos/configdict.py | 1 + python/vyos/ifconfig_vlan.py | 3 +++ 2 files changed, 4 insertions(+) (limited to 'python') diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 6afc78039..3e1f22d09 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -112,6 +112,7 @@ interface_default_data = { 'dhcp_vendor_class_id': '', 'dhcpv6_prm_only': False, 'dhcpv6_temporary': False, + 'dhcpv6_pd_length': '', 'dhcpv6_pd_interfaces': [], 'disable': False, 'disable_link_detect': 1, diff --git a/python/vyos/ifconfig_vlan.py b/python/vyos/ifconfig_vlan.py index ec4d1da42..53a77c651 100644 --- a/python/vyos/ifconfig_vlan.py +++ b/python/vyos/ifconfig_vlan.py @@ -87,6 +87,9 @@ def apply_vlan_config(vlan, config): if config['dhcpv6_temporary']: vlan.dhcp.v6.options['dhcpv6_temporary'] = True + if config['dhcpv6_pd_length']: + vlan.dhcp.v6.options['dhcpv6_pd_length'] = config['dhcpv6_pd_length'] + if config['dhcpv6_pd_interfaces']: vlan.dhcp.v6.options['dhcpv6_pd_interfaces'] = config['dhcpv6_pd_interfaces'] -- cgit v1.2.3