[Dnsmasq-discuss] issue with dhcp-option tags for dnsmasq

Drew Horn horn.drew at gmail.com
Mon Jun 18 20:51:03 BST 2012


Based on the dnsmasq man page, it appears that tags aren't working for
dhcp-options in dnsmasq-2.45.  Here's my understanding of how it should be
used:

To set dhcp options for a dhcp range:

domain-needed
bogus-priv
bind-interfaces

listen-address=192.168.118.1

dhcp-range=set:0,192.168.118.50,192.168.118.99,255.255.255.0

dhcp-option=tag:0,6,10.50.8.218
dhcp-option=tag:0,3,192.168.118.2

Based on this setup, the client should get:

IP: In the dhcp-range (.50 - .99)
Netmask: 255.255.255.0
GW: 192.168.118.2
DNS: 10.50.8.218

Instead I see:

IP: In the dhcp-range (.50 - .99)
Netmask: 255.255.255.0
GW: 192.168.118.1
DNS: 192.168.118.1

It appears that the tags are being ignored.  I'm having to use either
"net:" or "set:" in place of what I have (see below):

dhcp-range=net:voip,192.168.118.50,192.168.118.99,255.255.255.0
dhcp-option=net:voip,6,10.50.8.218
dhcp-option=net:voip,3,192.168.118.2

--- OR ---

dhcp-range=set:0,192.168.118.50,192.168.118.99,255.255.255.0
dhcp-option=set:0,6,10.50.8.218
dhcp-option=set:0,3,192.168.118.2

Based on the man page, using "net:" seems to be a legacy option, and "set:"
isn't even supported for dhcp-option:

"This system evolved from an earlier, more limited one and for backward
compatibility "net:" may be used instead of "tag:" and "set:" may be
omitted. (Except in *dhcp-host,* where "net:" may be used instead of
"set:".) For the same reason, '#' may be used instead of '!' to indicate
NOT.

.
.
.

*-O,
--dhcp-option=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-encap:<enterprise>,][vendor:[<vendor-class>],][<opt>|option:<opt-name>|option6:<opt>|option6:<opt-name>],[<value>[,<value>]]
*"


Am I missing something here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20120618/67745a47/attachment.html>


More information about the Dnsmasq-discuss mailing list