<div dir="ltr">Hi,<div><br></div><div>While it might seem weird, it is a valid scenario. There might be reasons to let reusing IP addresses.</div><div><br></div><div>To answer your question about deployment of NAT devices, it shouldn't be just a NAT device. Each LAN segment can have its own NAT gateway. </div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 4:07 PM, /dev/rob0 <span dir="ltr"><<a href="mailto:rob0@gmx.co.uk" target="_blank">rob0@gmx.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Feb 22, 2017 at 02:55:30PM +0100, S. M. Hossein Hamidi wrote:<br>
> I am new to dnsmasq and my mind is busy with a DHCP scenario that I<br>
> would like to consult with you before getting my hands dirty.<br>
><br>
> Suppose that we have several subnets which are behind a NAT device<br>
> which additionally acts as a DHCP relay agent. I know that using<br>
> DHCP relay agent information option, I can distinguish between<br>
> different subnets. However, the additional constraint is to use<br>
> duplicate or overlapping subnets instead of distinct subnets.<br>
<br>
</span>That is a very strange constraint.  RFC 1918 is quite large enough;<br>
it's not necessary to share your netblocks.  And how will your NAT<br>
device distinguish one segment with a shared netblock from another<br>
segment using the same netblock?<br>
<br>
Sounds like broken IP networking to me.  Compliant IP stacks do<br>
routing based on IP address blocks.<br>
<span class=""><br>
> Since, the traffic comes from each segment goes through NAT, it<br>
> wouldn't be any problem to use duplicate IP addresses, knowing<br>
> that each segment has its own autonomy.<br>
<br>
</span>But again, how does the NAT device do this?<br>
<span class=""><br>
> So, may I know if can I exploit tagging feature of dnsmasq so<br>
> that it can handle separate potentially overlapping leases for<br>
> each subnet?<br>
<br>
</span>I'm pretty sure this would not be possible in dnsmasq nor in ISC<br>
dhcpd.  Either one could do a single netblock shared among many<br>
distinct segments, but each would only be able to give out any one<br>
address to only one client.<br>
<br>
But wait and see what Simon says. :)<br>
<span class="HOEnZb"><font color="#888888">--<br>
  <a href="http://rob0.nodns4.us/" rel="noreferrer" target="_blank">http://rob0.nodns4.us/</a><br>
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:<br>
<br>
______________________________<wbr>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.<wbr>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.<wbr>uk/mailman/listinfo/dnsmasq-<wbr>discuss</a><br>
</font></span></blockquote></div><br></div>