If accepted there should be an example of multiple dhcp-options using the same tag added to dnsmasq.conf.example. --- man/dnsmasq.8 | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 index 30429df..5f5ac83 100644 --- a/man/dnsmasq.8 +++ b/man/dnsmasq.8 @@ -1317,6 +1317,34 @@ or The special address 0.0.0.0 is taken to mean "the address of the machine running dnsmasq". +When a dhcp-option has a tag, +.B --dhcp-option=tag:common_option,option:router,192.168.2.1, +then that option maybe used via a +.B set:<tag>, +eg. +.B --dhcp-host=00:20:e0:3b:13:af,set:common_option +indicates that a particular host, +.B 00:20:e0:3b:13:af, +will be given +.B 192.168.2.1 +as its router. This allows the same option to be used for different hosts +and allows changes to be made in one place. So another host could be given +the same tag and get the same router, +.B --dhcp-host=01:29:03:3b:dc:ab,set:common_option. + +It is also possible for multiple dhcp-option's to have the same tag. +For example: +.B --dhcp-option=tag:router_dns_server,option:dns-server,1.1.1.1 +and +.B --dhcp-option=tag:router_dns_server,option:router,192.168.1.1. +Now when +.B set:router_dns_server +s used in +.B --dhcp-host=09:23:ab:11:29,set:router_dns_server +the host will receive both dhcp-options. As before other hosts can use +.B set:router_dns_server +which minimizes repetition. + An option without data is valid, and includes just the option without data. (There is only one option with a zero length data field currently defined for DHCPv4, 80:rapid commit, so this feature is not very useful in practice). Options for which dnsmasq normally provides default values can be ommitted by defining the option with no data. These are @@ -1324,7 +1352,6 @@ netmask, broadcast, router, DNS server, domainname and hostname. Thus, for DHCPv .B --dhcp-option = option:router will result in no router option being sent, rather than the default of the host on which dnsmasq is running. For DHCPv6, the same is true of the options DNS server and refresh time. - Data types allowed are comma separated dotted-quad IPv4 addresses, []-wrapped IPv6 addresses, a decimal number, colon-separated hex digits and a text string. If the optional tags are given then -- 2.42.0 _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss