<p>Hi,<br>
As you explain first part is correct.  Regarding the sub net declaration, what I posted is wrong,very sorry about that<br>
in my real setup I have used sub net declaration which is having only 1ip.<br>
Thanks,<br>
Chamara<br>
</p>
<div class="gmail_quote">On Sep 10, 2012 12:37 PM, "Simon Hobson" <<a href="mailto:dhcp1@thehobsons.co.uk">dhcp1@thehobsons.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
chamara samarakoon wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
subnet 51.101.0.0 netmask 255.255.224.0 {<br>
option ntp-servers 172.17.0.1;<br>
deny client-updates;<br>
authoritative;<br>
option broadcast-address 51.101.31.255;<br>
option routers 51.101.0.1;<br>
max-lease-time 31536000;<br>
default-lease-time 31536000;<br>
pool {<br>
failover peer "XXXX";<br>
deny dynamic bootp clients;<br>
range 51.101.0.10 51.101.0.254;<br>
}<br>
</blockquote>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
/etc/dhcp_static_lease/dhcp_<u></u>static_conf/dhcpd_static.conf-<u></u>------------------------------<u></u>---<br>
<br>
include "/etc/dhcp_static_lease/51.<u></u>101.0.0.txt";<br>
<br>
<br>
------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>---<br>
<br>
/etc/dhcp_static_lease/51.101.<u></u>0.0.txt-----------------------<u></u>------------------------------<u></u>----------------<br>
<br>
host 51.101.0.10{<br>
                       hardware ethernet 00:20:d2:3a:51:69;<br>
                    fixed-address 51.101.0.10;<br>
                    }<br>
</blockquote>
<br>
<br>
Well there is one problem. Defining a static address does **NOT** exclude it from being offered as a dynamic address if it is still in a pool/range.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2.Unplug device A and change the static conf MAC to B's MAC(Restart dhcpd server) and Plug device B<br>
</blockquote>
<br>
What does this mean ?<br>
I read this as you edited /etc/dhcp_static_lease/51.101.<u></u>0.0.txt and changed the MAC address for the host statement to that of device B and restarted the server - is that correct ?<br>
<br>
If so then you you observe is "correct" behaviour - correct in as much as what you told the server to do.<br>
<br>
You plug in device A. It gets a dynamic lease which is recorded in the lease file.<br>
You unplug device A, manually edit the MAC address in the config file to that of B and restart server. At this point, there is a lease in the leases file for device A, and a static assignment for device B<br>
You plug in device B. It gets offered the static assignment - which does not create a lease record.<br>
You plug in device A. It has an already active lease for the same address so this is selected. The ping-before-offer check detects device B and the lease is abandoned. Because you only have one address in the range, the server then attempts to reclaim abandoned leases in order to free up an address.<br>

<br>
However, while you say there is only one address in the range, your config you posted shows a whole subnet - 245 addresses in the range.<br>
<br>
<br>
<br>
For what you appear to be trying to do, you may be better off with reserved leases.<br>
<br>
-- <br>
Simon Hobson<br>
<br>
Visit <a href="http://www.magpiesnestpublishing.co.uk/" target="_blank">http://www.<u></u>magpiesnestpublishing.co.uk/</a> for books by acclaimed<br>
author Gladys Hobson. Novels - poetry - short stories - ideal as<br>
Christmas stocking fillers. Some available as e-books.<br>
______________________________<u></u>_________________<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" target="_blank">https://lists.isc.org/mailman/<u></u>listinfo/dhcp-users</a><br>
</blockquote></div>