[Dnsmasq-discuss] converting ISC dhcpd.conf to dnsmasq
Michael
michael at kmaclub.com
Sat May 24 14:30:30 UTC 2014
On 05/23/2014 06:42 PM, Linux Luser wrote:
> Use the "set:tagname" option in your dhcp-host command. Then use that
> tag in it's own dchp-boot command to send a specific boot file to
> a specific host.
>
>
> # PXE response for non-iPXE clients
> dhcp-match=set:ipxe,175 # iPXE sends a 175 option
> dhcp-boot=tag:!ipxe,ipxe.pxe
>
> # PXE response for host 'mythbed'
> dhcp-host=bc:ee:7b:25:3b:15,*set:mythbed*,mythbed
> tag-if=set:mythbed-ipxe,tag:ipxe,tag:mythbed
> dhcp-boot=mythbed-ipxe,http://minimyth2/conf/mythbed/mythbed.ipxe
>
> # PXE response for host 'mythliv'
> dhcp-host=38:60:77:9c:6b:1d,*set:mythliv*,mythliv
> tag-if=set:mythliv-ipxe,tag:ipxe,tag:mythliv
> dhcp-boot=mythliv-ipxe,http://minimyth2/conf/mythbed/mythliv.ipxe
>
>
> Using the 'tag-if' command, you can effectively combine two tags into
> one. But depending only your case, you might be able to omit this line
> and simply send the 'filename' DHCP field (which is what dhcp-boot
> does) for every DHCP request, regardless if it is during an iPXE boot
> or not.
>
Thanks, your example really helped me get it working. Your example was
only missing the tag on the dhcp-boot line.
# Special boot hosts
# PXE response for non-iPXE clients
dhcp-match=set:ipxe,175 # iPXE sends a 175 option
dhcp-boot=tag:!ipxe,ipxe.pxe
# PXE response for host 'mythbed'
dhcp-host=bc:ee:7b:25:3b:15,set:mythbed,mythbed
tag-if=set:mythbed-ipxe,tag:ipxe,tag:mythbed
dhcp-boot=tag:mythbed-ipxe,http://minimyth2/conf/mythbed/mythbed.ipxe
# PXE response for host 'mythliv'
dhcp-host=38:60:77:9c:6b:1d,set:mythliv,mythliv
tag-if=set:mythliv-ipxe,tag:ipxe,tag:mythliv
dhcp-boot=tag:mythliv-ipxe,http://minimyth2/conf/mythliv/mythliv.ipxe
I really appreciate the help. I can now EOL my local copy of tftp,
bind, and dhcpd in favor of dnsmasq!
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140524/595f8a35/attachment.html>
More information about the Dnsmasq-discuss
mailing list