[Dnsmasq-discuss] Help: my dnsmasq per-MAC config not working?
Paul Smith
psmith at gnu.org
Thu Feb 25 16:10:31 GMT 2010
I have an environment with a standard PXE boot config, like this (in a
file in /etc/dnsmasq.d):
dhcp-authoritative
dhcp-lease-max=255
dhcp-boot=/tftpboot/linux-install/pxelinux.0
# ----- Configure the FABRIC network
dhcp-range=FABRIC,10.0.2.0,10.0.15.254,infinite
dhcp-option-force=FABRIC,77,"FABRIC"
# ----- Configure PXE
dhcp-option-force=208,f1:00:74:7e
dhcp-option-force=209,default.cfg
dhcp-option-force=210,/std/var/boot/
This works fine and has for many months now. But, sometimes I have a
need for one particular system to boot a separate image, with a
different config file. When this happens I add a NEW file
to /etc/dnsmasq.d, then restart the service; the new file contains this:
dhcp-host=00:06:72:00:01:09,net:replace
dhcp-host=00:06:72:01:01:09,net:replace
dhcp-host=00:06:72:FF:F9:9D,net:replace
dhcp-host=00:06:72:FF:F9:9E,net:replace
dhcp-boot=net:replace,/alt/update_bundle/pxedir/pxelinux.0
dhcp-option-force=replace,208,f1:00:74:7e
dhcp-option-force=replace,209,default.cfg
dhcp-option-force=replace,210,/alt/update_bundle/pxedir/
(the system has 4 nics and I'm not sure which one will do the PXE boot
request so I set all 4). Here I assign a network ID to the 4 MACs, then
I specify a different boot file and PXE config file for just this
network ID. This worked at least once, but now is not working anymore
and I cannot figure out why.
The oddest thing is that the boot file IS replaced; I can see on the
boot line that it loads the /alt/update_bundle/pxedir/pxelinux.0 image,
but the PXE configuration options are wrong; they are still the ones
from the main configuration, not the ones specific to the network ID.
I've sniffed the interface on the DHCP server with tcpdump and viewed
the output and I can confirm this concretely: the dnsmasq server is
sending back the correct boot file (i.e., the dhcp-boot override works
fine) but the wrong PXE elements (i.e., the three dhcp-option-force
items are not taking effect).
I've checked syslog and I don't see any odd messages from dnsmasq, and
I've looked through the man pages to verify my syntax and for some kind
of extra debugging to turn on that might show info on how dnsmasq is
choosing the network ID or whatever, but no luck.
I'm using the default dnsmasq instance that comes with Red Hat
Enterprise Linux 5.3, which is:
Dnsmasq version 2.39 Copyright (C) 2000-2007 Simon Kelley
Compile time options IPv6 GNU-getopt no-ISC-leasefile no-DBus no-I18N TFTP
Help!! I need to get this working quickly. I'm sure it's something
very stupid but I can't figure it out :-/.
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith at gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
More information about the Dnsmasq-discuss
mailing list