summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-client/ipv4.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-07 21:30:31 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-07 21:30:31 +0100
commited6e1f556b290231f1683a06ec366dbeb4c0776a (patch)
tree4c6c711dbb18de8ca9485fe12efa1d785cf8881d /data/templates/dhcp-client/ipv4.tmpl
parentd1b68af630b20c0d66f2f0a840c91dcb5823e829 (diff)
downloadvyos-1x-ed6e1f556b290231f1683a06ec366dbeb4c0776a.tar.gz
vyos-1x-ed6e1f556b290231f1683a06ec366dbeb4c0776a.zip
interfaces: dhcp-client: T2997: add option to not request DHCP router address
Some might want to have an IP address handed out by a DHCP server but not want a default route to be installed. This can be done using the CLI command: "set interfaces ethernet eth2 dhcp-options no-default-route"
Diffstat (limited to 'data/templates/dhcp-client/ipv4.tmpl')
-rw-r--r--data/templates/dhcp-client/ipv4.tmpl7
1 files changed, 6 insertions, 1 deletions
diff --git a/data/templates/dhcp-client/ipv4.tmpl b/data/templates/dhcp-client/ipv4.tmpl
index 8a44a9761..71b429db6 100644
--- a/data/templates/dhcp-client/ipv4.tmpl
+++ b/data/templates/dhcp-client/ipv4.tmpl
@@ -12,8 +12,13 @@ interface "{{ ifname }}" {
{% if dhcp_options.vendor_class_id is defined and dhcp_options.vendor_class_id is not none %}
send vendor-class-identifier "{{ dhcp_options.vendor_class_id }}";
{% endif %}
- request subnet-mask, broadcast-address, routers, domain-name-servers,
+ # The request statement causes the client to request that any server responding to the
+ # client send the client its values for the specified options.
+ request subnet-mask, broadcast-address,{{ " routers," if dhcp_options.no_default_route is not defined }} domain-name-servers,
rfc3442-classless-static-routes, domain-name, interface-mtu;
+
+ # The require statement lists options that must be sent in order for an offer to be
+ # accepted. Offers that do not contain all the listed options will be ignored!
require subnet-mask;
}