<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=gb2312"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:等线;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@等线";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:等线;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:宋体;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:等线;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:等线;}
/* Page Definitions */
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link="#0563C1" vlink="#954F72" style='text-justify-trim:punctuation'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi Guys,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>I deploy a dnsmasq with “dhcp-range=2234:aabb:ccff:ffe::2,2234:aabb:ccff:ffe:0:ff:ffff:ffff,static,120,24h”</span><span style='font-size:10.5pt;color:#24292E'>,</span><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'> I hope that dnsmasq will reply success <b>ONLY</b> when the [mac, ip] match the binding in dhcp-hostfle.<o:p></o:p></span></p><p style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>But dnsmasq will reply success when it received a dhcp confirmation with [mac, ip] not in dhcp-hostfle.<o:p></o:p></span></p><p style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>Do you have any idea how to achive this? <o:p></o:p></span></p><p style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>Thanks in advance.<o:p></o:p></span></p><p style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>here is the the conf file:<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;background:white'><code><span lang=EN-US style='font-size:9.0pt;font-family:Consolas;color:#24292E'># </span></code><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>ps -aux | grep dns<br>nobody 16473 0.0 0.0 15604 980 ? S 11:33 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/dnsmasq/dnsmasq.conf<br></span><code><span lang=EN-US style='font-size:9.0pt;font-family:Consolas;color:#24292E'># </span></code><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>cat /var/lib/dnsmasq/dnsmasq.conf<br>domain-needed<br>bogus-priv<br>no-hosts<br>dhcp-option=vendor:MSFT,2,1i<br>dhcp-lease-max=65535<br>dhcp-hostsfile=/var/lib/dnsmasq/hosts.dhcp<br>interface=inner3<br>except-interface=lo<br>bind-interfaces<br>leasefile-ro<br>dhcp-range=2234:aabb:ccff:ffe::2,2234:aabb:ccff:ffe:0:ff:ffff:ffff,static,88,24h<br></span><code><span lang=EN-US style='font-size:9.0pt;font-family:Consolas;color:#24292E'>#</span></code><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'> cat /var/lib/dnsmasq/hosts.dhcp<br>fa:a5:bd:b2:1f:00,set:faa5bdb21f00,[2234:aabb:ccff:ffe::43:5b58],2234-aabb-ccff-ffe--43-5b58,infinite<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'><o:p> </o:p></span></p><p style='margin-top:0cm;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>From the manpage of dnsmasq:<o:p></o:p></span></p><p style='margin-top:0cm;background:white'><span lang=EN-US style='font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#24292E'>"The optional keyword may be static which tells dnsmasq to enable DHCP for the network specified, but not to dynamically allocate IP addresses: only hosts which have static addresses given via --dhcp-host or from /etc/ethers will be served."<br><a href="http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html"><span style='color:#0366D6'>http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html</span></a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>