[Dnsmasq-discuss] Help: my dnsmasq per-MAC config not working?
Simon Kelley
simon at thekelleys.org.uk
Thu Feb 25 16:26:26 GMT 2010
Paul Smith wrote:
> 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 :-/.
>
OK, quick fix to try. Modify yout default PXE options to have a netid of
"#replace", eg
dhcp-option-force=#replace,210,/std/var/boot/
That way they can't be used when the "replace" tag is set.
2.39 is pretty old. Is it possible to upgrade to a newer version? Bugs
have been fixed in this area.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list