<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I meant to reply earlier. I have nothing to add to the excellent responses you already have in hand, but we are doing what you are trying to do, I think, by using option-82 information
 to determine the source network of the request and assigning to the desired pool accordingly.<br>
<br>
I'm sure there are other ways, but I thought I would share that one since I know it works for our equipment and our network.<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF197142"><font color="#000000" face="Tahoma" size="2"><b>From:</b> dhcp-users-bounces@lists.isc.org [dhcp-users-bounces@lists.isc.org] on behalf of Roberto De Oliveira [rcdeoliveira@gmail.com]<br>
<b>Sent:</b> Wednesday, October 28, 2015 9:29 AM<br>
<b>To:</b> Users of ISC DHCP<br>
<b>Subject:</b> Re: Weird behavior with multiple pool inside shared networks<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Thanks Simon,
<div><br>
</div>
<div>Excellent explanation, I think that I have to rethink somethings on my network.</div>
<div><br>
</div>
<div>Thanks to Steven and Niall also.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-10-27 4:47 GMT-04:30 Simon Hobson <span dir="ltr"><<a href="mailto:dhcp1@thehobsons.co.uk" target="_blank">dhcp1@thehobsons.co.uk</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<span class="">Steven Carr <<a href="mailto:sjcarr@gmail.com" target="_blank">sjcarr@gmail.com</a>> wrote:<br>
<br>
> On 27 October 2015 at 04:18, Roberto De Oliveira <<a href="mailto:rcdeoliveira@gmail.com" target="_blank">rcdeoliveira@gmail.com</a>> wrote:<br>
>> What is wrong with my configuration?<br>
><br>
> Nothing, it's working as intended. A shared network means that those<br>
> two networks inside of there are in the same broadcast domain,<br>
> therefore it doesn't matter which pool of addresses the clients are<br>
> assigned an IP address from it should still work. DHCPD won't move on<br>
> to the second pool until it's exhausted the first pool.<br>
<br>
</span>To expand on that a bit ...<br>
The shared-network statement tells the server that the two (or more) subnets are on the same network (broadcast domain). That explicitly means all IP addresses are to be considered equal.<br>
There is no way to determine in advance which subnet any client will get an address from - which is the same for the case of a larger subnet and two pools within the one subnet.<br>
<br>
A key thing to remember is that there is no such thing as "I receive packages from subnet 186.90.0.0" for broadcast packets. When a client is configuring itself, it has no IP address, so the concept of belonging to a specific subnet does not exist - the only
 "location" for the client is the broadcast domain which in the case of a shared-network hosts multiple subnets. When the server receives a packet from IP address 0.0.0.0, there just isn't any way to say it belongs to one subnet or another.<br>
<br>
As an aside, this is also the reason you can't run a DHCP service on a sub-interface (eg eth0.1) - when broadcast packets come in, there's no way to route that packet to the main interface (eth0) or the subinterface (eth0.1).<br>
<br>
Only when a client has been allocated an address, and configured it's interface, does it "belong" to a specific subnet.<br>
<br>
<br>
For a "fresh" install, the address allocation order is determined by the way the code works - which is not specified and liable to change without notice. At present this is a "top down" ordering where the highest numerical address is issued first.<br>
Once there are no "never used before" addresses left, then addresses are re-used on a least recently used basis - at which point allocation takes on a pseudo-random appearance.<br>
If a client requests a specific address, and that address is available, then that address will be given. So if there are clients which already had addresses on the network, then depending on how "clingy" they are, you will see "out of order" allocation of never
 used before addresses.<br>
<br>
If you need specific clients to get addresses in specific pools, then you need to tell the server about your requirements. This may be as simple as defining host statements for certain clients and using allow/deny known-clients in the pools. Or it may be more
 complicated, using classes and possibly subclasses.<br>
<div class="HOEnZb">
<div class="h5">_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">Saludos,<br>
Roberto De Oliveira</div>
</div>
</div>
</div>
</div>
</body>
</html>