summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-server
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-18 22:09:05 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-19 12:32:17 +0200
commitb72fff14c4061e26657835d72e0944229a196940 (patch)
treebeb0695bd2ac9fe34c29d66537defa682c807968 /data/templates/dhcp-server
parent6e015f3c56f6766a9356120d836b47349470aa1c (diff)
downloadvyos-1x-b72fff14c4061e26657835d72e0944229a196940.tar.gz
vyos-1x-b72fff14c4061e26657835d72e0944229a196940.zip
dhcp-server: T3839: support name-servers and domain config per shared-network
DHCP servers "shared-network" level only makes sense if one can specify configuration items that can be inherited by individual subnets. This is now possible for name-servers and the domain-name. set service dhcp-server shared-network-name LAN domain-name 'vyos.net' set service dhcp-server shared-network-name LAN name-server '192.0.2.1' (cherry picked from commit d411a40a3598c55fae7abd8bc5f1876007aa704b)
Diffstat (limited to 'data/templates/dhcp-server')
-rw-r--r--data/templates/dhcp-server/dhcpd.conf.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/dhcp-server/dhcpd.conf.tmpl b/data/templates/dhcp-server/dhcpd.conf.tmpl
index 7173986a4..a2d5cb242 100644
--- a/data/templates/dhcp-server/dhcpd.conf.tmpl
+++ b/data/templates/dhcp-server/dhcpd.conf.tmpl
@@ -70,6 +70,12 @@ shared-network {{ network | replace('_','-') }} {
{% if network_config.authoritative is defined %}
authoritative;
{% endif %}
+{% if network_config.name_server is defined and network_config.name_server is not none %}
+ option domain-name-servers {{ network_config.name_server | join(', ') }};
+{% endif %}
+{% if network_config.domain_name is defined and network_config.domain_name is not none %}
+ option domain-name "{{ network_config.domain_name }}";
+{% endif %}
{% if network_config.ping_check is defined %}
ping-check true;
{% endif %}