summaryrefslogtreecommitdiff
path: root/data/templates/dhcpv6-server
diff options
context:
space:
mode:
authorLucas Christian <lucas@lucasec.com>2020-10-04 17:50:53 -0500
committerLucas Christian <lucas@lucasec.com>2020-10-04 17:50:53 -0500
commit51a6eaa324775049ee666503ca0a63571750ac25 (patch)
treee043768206ee3d6ec8c39df8e6f3c5d5c83c986f /data/templates/dhcpv6-server
parent41ff73882fb6dad2484d841ed59494f0c963bf5e (diff)
downloadvyos-1x-51a6eaa324775049ee666503ca0a63571750ac25.tar.gz
vyos-1x-51a6eaa324775049ee666503ca0a63571750ac25.zip
dhcpv6: T2961: support stateless dhcpv6 clients
This commit adds support for configuring the DHCPv6 server to serve "stateless" DHCPv6 clients (those that send an information-request message and do not request an address). The change introduces a `common-options` node at the `shared-network-name` level, which allows specifying options applicable to clients regardless of subnet assigned (or in the case of stateless clients, when no subnet is assigned). Parameters specified at the subnet level take precedence over those set at the shared-network level. Presently, only parameters that are meaningful to stateless clients have been exposed under `common-options`, as there is no precedent of exposing parameters at multiple levels under the current DHCPv4 or DHCPv6 configuration syntax. If desired, additional parameters could certainly be added with relative ease.
Diffstat (limited to 'data/templates/dhcpv6-server')
-rw-r--r--data/templates/dhcpv6-server/dhcpdv6.conf.tmpl9
1 files changed, 9 insertions, 0 deletions
diff --git a/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl b/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl
index ff7822b0d..bdeea71da 100644
--- a/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl
+++ b/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl
@@ -12,6 +12,15 @@ option dhcp6.preference {{ preference }};
{% for network in shared_network %}
{%- if not network.disabled -%}
shared-network {{ network.name }} {
+ {%- if network.common.info_refresh_time %}
+ option dhcp6.info-refresh-time {{ network.common.info_refresh_time }};
+ {%- endif %}
+ {%- if network.common.domain_search %}
+ option dhcp6.domain-search "{{ network.common.domain_search | join('", "') }}";
+ {%- endif %}
+ {%- if network.common.dns_server %}
+ option dhcp6.name-servers {{ network.common.dns_server | join(', ') }};
+ {%- endif %}
{%- for subnet in network.subnet %}
subnet6 {{ subnet.network }} {
{%- for range in subnet.range6_prefix %}