<div dir="ltr"><div>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.<br><br><br># PXE response for non-iPXE clients<br>

dhcp-match=set:ipxe,175 # iPXE sends a 175 option<br>dhcp-boot=tag:!ipxe,ipxe.pxe<br><br># PXE response for host 'mythbed'<br>dhcp-host=bc:ee:7b:25:3b:15,<b>set:mythbed</b>,mythbed<br>tag-if=set:mythbed-ipxe,tag:ipxe,tag:mythbed<br>

dhcp-boot=mythbed-ipxe,<a href="http://minimyth2/conf/mythbed/mythbed.ipxe">http://minimyth2/conf/mythbed/mythbed.ipxe</a><br><br># PXE response for host 'mythliv'<br>dhcp-host=38:60:77:9c:6b:1d,<b>set:mythliv</b>,mythliv<br>

tag-if=set:mythliv-ipxe,tag:ipxe,tag:mythliv<br>dhcp-boot=mythliv-ipxe,<a href="http://minimyth2/conf/mythbed/mythliv.ipxe">http://minimyth2/conf/mythbed/mythliv.ipxe</a></div><div><br></div><div><br></div><div>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.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 12, 2014 at 9:45 AM, Michael <span dir="ltr"><<a href="mailto:michael@kmaclub.com" target="_blank">michael@kmaclub.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello,<br>
<br>
i am trying to convert my existing isc dhcp service to dnsmasq.<br>
<br>
The only issue I am having is with netbooting.<br>
<br>
For isc dhcp, I have a few entries like:<br>
host mythbed {<br>
        hardware ethernet bc:ee:7b:25:3b:15;<br>
        fixed-address mythbed;<br>
        if exists user-class and option user-class = "iPXE" {<br>
                #filename "<a href="http://minimyth/ipxe/mythbed" target="_blank">http://minimyth/ipxe/mythbed</a>"<u></u>;<br>
                filename "<a href="http://minimyth2/conf/mythbed/mythbed.ipxe" target="_blank">http://minimyth2/conf/<u></u>mythbed/mythbed.ipxe</a>";<br>
        } else{<br>
                filename "ipxe.pxe";<br>
        }<br>
        default-lease-time 604800;<br>
        max-lease-time 1209600;<br>
}<br>
host mythliv {<br>
        hardware ethernet 38:60:77:9c:6b:1d;<br>
        fixed-address mythliv;<br>
        if exists user-class and option user-class = "iPXE" {<br>
                filename "<a href="http://minimyth2/conf/mythliv/mythliv.ipxe" target="_blank">http://minimyth2/conf/<u></u>mythliv/mythliv.ipxe</a>";<br>
        } else {<br>
                filename "ipxe.pxe";<br>
        }<br>
}<br>
<br>
I have been trying to translate this into dnsmasq, but not having much luck.<br>
<br>
Something like this will let one host boot:<br>
<br>
dhcp-match=set:ipxe,175 # iPXE sends a 175 option<br>
dhcp-host=bc:ee:7b:25:3b:15,<u></u>mythbed<br>
dhcp-boot=tag:!ipxe,ipxe.pxe<br>
dhcp-boot=tag:ipxe,<a href="http://minimyth2/conf/mythbed/mythbed.ipxe" target="_blank">http://<u></u>minimyth2/conf/mythbed/<u></u>mythbed.ipxe</a><br>
<br>
But adding:<br>
dhcp-host=bc:ee:7b:25:3b:15,<u></u>mythbed<br>
dhcp-boot=tag:!ipxe,ipxe.pxe<br>
dhcp-boot=tag:ipxe,<a href="http://minimyth2/conf/mythbed/mythbed.ipxe" target="_blank">http://<u></u>minimyth2/conf/mythbed/<u></u>mythbed.ipxe</a><br>
<br>
<br>
causes the options for the first to get overwritten.<br>
<br>
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?<br>
<br>
I tried using multiple tags but either that isn't allowed or I didn't use them correctly.<br>
<br>
Any help would be much appreciated.<br>
<br>
Michael<br>
<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a></blockquote></div></div></div>