[Dnsmasq-discuss] converting ISC dhcpd.conf to dnsmasq

Linux Luser linuxluser at gmail.com
Sat May 24 01:42:52 UTC 2014


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.


On Mon, May 12, 2014 at 9:45 AM, Michael <michael at kmaclub.com> wrote:

> Hello,
>
> i am trying to convert my existing isc dhcp service to dnsmasq.
>
> The only issue I am having is with netbooting.
>
> For isc dhcp, I have a few entries like:
> host mythbed {
>         hardware ethernet bc:ee:7b:25:3b:15;
>         fixed-address mythbed;
>         if exists user-class and option user-class = "iPXE" {
>                 #filename "http://minimyth/ipxe/mythbed";
>                 filename "http://minimyth2/conf/mythbed/mythbed.ipxe";
>         } else{
>                 filename "ipxe.pxe";
>         }
>         default-lease-time 604800;
>         max-lease-time 1209600;
> }
> host mythliv {
>         hardware ethernet 38:60:77:9c:6b:1d;
>         fixed-address mythliv;
>         if exists user-class and option user-class = "iPXE" {
>                 filename "http://minimyth2/conf/mythliv/mythliv.ipxe";
>         } else {
>                 filename "ipxe.pxe";
>         }
> }
>
> I have been trying to translate this into dnsmasq, but not having much
> luck.
>
> Something like this will let one host boot:
>
> dhcp-match=set:ipxe,175 # iPXE sends a 175 option
> dhcp-host=bc:ee:7b:25:3b:15,mythbed
> dhcp-boot=tag:!ipxe,ipxe.pxe
> dhcp-boot=tag:ipxe,http://minimyth2/conf/mythbed/mythbed.ipxe
>
> But adding:
> dhcp-host=bc:ee:7b:25:3b:15,mythbed
> dhcp-boot=tag:!ipxe,ipxe.pxe
> dhcp-boot=tag:ipxe,http://minimyth2/conf/mythbed/mythbed.ipxe
>
>
> causes the options for the first to get overwritten.
>
> Could someone give me an example of how to only supply  pxe options
> requested, if it is a certain host/mac, boot ipxe the first time, and then
> pass a URL to ipxe on the next request?
>
> I tried using multiple tags but either that isn't allowed or I didn't use
> them correctly.
>
> Any help would be much appreciated.
>
> Michael
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20140523/8eccc3c0/attachment.html>


More information about the Dnsmasq-discuss mailing list