[Dnsmasq-discuss] dhcp-match option:hostname fails with syntax error
Benedikt Hochstrasser
tictactux at gmail.com
Tue Feb 26 14:35:17 GMT 2013
(dnsmasq 2.63 here)
Hi list,
I am currently setting up a small-time staging system for Windows clients.
dnsmasq is to serve PXE requests (which boot a windows PE image) and DHCP
requests from the aforementioned PE image, but should ignore everything
else.
Now, all Windows clients request their addresses with a vendor id "MSFT",
so I cannot ignore all "MSFT" clients. But all PE images generate a host
name in the form of "minint-abcdef" which is supplied in the DHCPDISCOVER
message. So I just have to catch the client-supplied host name and tag it
accordingly, right?
In an earlier post (<
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2012q3/006206.html>)
it was discussed how to wildcard-match host names, but when I enter
dhcp-match=set:winpe, option:hostname, minint-
I get "dnsmasq: bad dhcp-option at line xyz"
If I use
dhcp-match=set:winpe, option:domain-name, minint-
then I get no error, but of course I won't get an address as the client is
only supplying the hostname (option 12) and not a domain name. (I also
tried host-name, "12" and every other option I could think of. It just
fails when I use the option "hostname" which, according to line 459 in
dhcp-common.c, is the one I should use.) I also ran wireshark and the
client is indeed supplying option 12.
What am I doing wrong?
(here's my config)
filterwin2k
interface=em0
domain=staging.local,172.16.0.0/24
# Common options
dhcp-option=19,0
dhcp-option=44,0.0.0.0
dhcp-option=45,0.0.0.0
dhcp-option=46,8
dhcp-lease-max=150
log-queries
log-dhcp
# PXE Clients
dhcp-vendorclass=set:pxe,PXEClient
dhcp-range=tag:pxe,172.16.0.150,172.16.0.199,2h
dhcp-boot=tag:pxe,pxelinux.bin,nas4free,172.16.0.100
# Windows Clients
dhcp-vendorclass=set:msft,MSFT
dhcp-match=set:winpe, option:hostname, minint- # <----- Syntax error
here
dhcp-ignore=tag:!pxe,tag:!winpe
dhcp-range=tag:winpe,172.16.0.200,172.16.0.249,2h
dhcp-option=vendor:MSFT,1,2i
dhcp-option=vendor:MSFT,2,1i
Stumped in Zurich,
--
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20130226/d80ba578/attachment.html>
More information about the Dnsmasq-discuss
mailing list