<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=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">Hi,<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">I’m using the program as a DHCP server for a Linux machine. The server needs to toggle between two different subnets, with different GW (on the same interface – ‘br0’), and assign an IP for a windows
PC.<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">So for example upon power up the DHCP will assign an IP to the PC (connected via Ethernet), with subnet ‘A’.<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">After a while, the DHCP will need to assign a different IP, on a different subnet ‘B’.<br>
The way I implemented it is running dnsmasq on the Linux machine :<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""> -C /etc/dnsmasq.conf</span><span dir="RTL"></span><span lang="HE" style="font-family:"Times New Roman","serif""><span dir="RTL"></span>/</span><span dir="LTR" style="font-family:"Times New Roman","serif"">sbin/dnsmasq
-d --clear-on-rel<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">With The following dnsmask.conf file (subnet ‘A’) :<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">dhcp-range=27.187.20.14,27.187.20.14,255.255.255.0,3600<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">interface=br0<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">dhcp-option=3,27.187.20.1<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">dhcp-option=6,27.187.20.1<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">dhcp-leasefile=/etc/dnsmasq.leases<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">dhcp-lease-max=253<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">log-dhcp<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">After I receive an indication to change the subnet, I kill the dnsmasq server, and run it again the same way only with the second subnet ‘B’.<br>
I noticed that the dnsmasq.leases is empty, and there are no connected clients after the second power up. The PC is sending DHCPINFORM messages (with no response) and
<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">In order to have the PC ask for a new IP, I cut the power to the Ethernet Iface. This causing the PC to send DHCPREQUEST messages (with no DISCOVER messages before).<br>
The dnsmasq is not responding to the REQUEST messages although it’s a broadcast message, and I can see at tcpdump that they arrive to the Linux machine…<o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">I can see in the app logs that the dnsmask is receiving the INFORM messages, but I cannot see the REQUEST messages (in the app logs).<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">The thing is the PC remembers the first IP it was assigned (subnet ‘A’), and although the DHCP server has a different IP range configuration, the PC is still showing the old IP.<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">So my goal is to have the PC assigned a new IP (without any PC involvement, meaning no ipconfig renew\release commands). from a different pool, different subnet and GW, after the dnsmasq is restarted.<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">Thank,<o:p></o:p></span></p>
<p class="MsoNormal" align="right" dir="RTL" style="text-align:left;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-family:"Times New Roman","serif"">Dany<br>
<br>
<o:p></o:p></span></p>
</div>
</body>
</html>