<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFCC" text="#000000">
    Hi<br>
    <br>
    My first guess was right, see below for comments:<br>
    <br>
    <div class="moz-cite-prefix">On 09/09/12 17:50, chamara samarakoon
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKg3th8uMOV0MjCQ5H_RHGKsOS2K5k93UgDTqadBQqUH8x4xzA@mail.gmail.com"
      type="cite">Hi,<br>
      First thank you very much for reply.<br>
      <br>
      In my set up ip's issued first time will be bind as static using
      dhcp on commit script.<br>
      <br>
      Below are the all related conf files,<br>
      <br>
      <br>
      <br>
dhcpd.conf:------------------------------------------------------------------------------------<br>
      <br>
      # DHCP Server - Configuration file for Primary<br>
       #<br>
       # File $Id: dhcpd.conf,v 1.9 2009/07/09 16:31:20 root Exp root $<br>
       <br>
       # Global configuration<br>
       set vendorclass = option vendor-class-identifier;<br>
      <br>
       #record  the relay agent information options sent during<br>
       #the client's initial DHCPREQUEST message<br>
       stash-agent-options true;<br>
      <br>
       # Make the server authoritative for the network segments that<br>
       # are configured, and tell it to send DHCPNAKs to bogus requests<br>
       authoritative;<br>
      <br>
       # Allow each client to have exactly one lease, and expire<br>
       # old leases if a new DHCPDISCOVER occurs<br>
       one-lease-per-client true;<br>
         deny duplicates;<br>
      <br>
       # Log to the local0 facility by default<br>
       #log-facility local0;<br>
      log-facility local7;<br>
      <br>
       # Ping the IP address that is being offered to make sure it   
      isn't<br>
       # configured on another node. This has some potential 
      repercussions<br>
       # for clients that don't like delays.<br>
      ping-check true;<br>
       <br>
       # Dynamic DNS Updates<br>
       #include "/etc/ddns-update.dnskey";<br>
       #include "/etc/dhcpd.conf_ddns";<br>
       <br>
       # DHCP Failover, Primary<br>
       include "/etc/dhcpd.conf_primary";<br>
       <br>
       # Subnet declaration<br>
       include "/etc/dhcpd.conf_subnet";<br>
       <br>
       # Static IP addresses<br>
      <br>
      include
      "/etc/dhcp_static_lease/dhcp_static_conf/dhcpd_static.conf";<br>
      <br>
      <br>
      on commit {<br>
      set ClientIP = binary-to-ascii(10, 8, ".", leased-address);<br>
      set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1,
      6));<br>
      set ClientName = binary-to-ascii(10, 8, ".", leased-address);<br>
      set ClientGW =  binary-to-ascii(10,8,".",config-option routers);<br>
      log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, " Name:
      ", ClientName ,"ClientGW: ",ClientGW));<br>
execute("/etc/script/dynamic2Static.sh",ClientIP,ClientMac,ClientName,ClientGW);<br>
      }<br>
      <br>
      # EOF<br>
-----------------------------------------------------------------------------------------------------------------------<br>
      <br>
/etc/dhcpd.conf_subnet:------------------------------------------------------------------------------------<br>
      <br>
      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>
    </blockquote>
    This range includes 51.101.0.10, that means the server is allowed to
    hand that out to any client that is not a bootp client.<br>
    The problem is caused by the fact that you are not aware that hosts
    with fixed leases go through a completely different part of the
    system and do not reserve the address so it can not be handed out
    dynamically.<br>
    <br>
    The solution is that any fixed address MUST be outside the dynamic
    range.<br>
    <br>
    The other method to solve this is to use reserved leases, those are
    handled by the same code as normal leases and reside in the normal
    range. A lease can be made reserved by editing the leases file or by
    using omshell.<br>
    <br>
    I have never used omshell but AFAIK you could include such a call in
    your commit script. Others will have to step in here and explain
    more about this.<br>
    <br>
    <blockquote
cite="mid:CAKg3th8uMOV0MjCQ5H_RHGKsOS2K5k93UgDTqadBQqUH8x4xzA@mail.gmail.com"
      type="cite">}<br>
-----------------------------------------------------------------------------------------------------------------------<br>
      <br>
/etc/dhcp_static_lease/dhcp_static_conf/dhcpd_static.conf----------------------------------<br>
      <br>
      include "/etc/dhcp_static_lease/51.101.0.0.txt";<br>
      <br>
      <br>
---------------------------------------------------------------------------------------------------------------------------<br>
      <br>
/etc/dhcp_static_lease/51.101.0.0.txt---------------------------------------------------------------------<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>
      <br>
---------------------------------------------------------------------------------------------------------------------------<br>
      <br>
      Regards,<br>
      chamara samarakoon.<br>
      <br>
      <br>
      <div class="gmail_quote">
        On Sun, Sep 9, 2012 at 8:58 PM, Sten Carlsen <span dir="ltr"><<a
            moz-do-not-send="true" href="mailto:stenc@s-carlsen.dk"
            target="_blank">stenc@s-carlsen.dk</a>></span> wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFCC" text="#000000"> Hi<br>
            <br>
            It is very likely doing what you have asked it to do.<br>
            <br>
            For anybody on this list to be able to help you find out
            what happens and why that  is different from what you want
            to happen, please post your dhcpd.conf in its entirety with
            no edits (except secret keys).<br>
            <br>
            First guess is that you give the fixed address inside your
            range of dynamic IPs, it must be outside or you will see the
            below happening.
            <div>
              <div class="h5"><br>
                <br>
                <br>
                <div>On 09/09/12 17:17, chamara samarakoon wrote:<br>
                </div>
              </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">Hi,<br>
                  <br>
                  I am new to isc dhcp, and i am facing following
                  situation , and need help to understand,<br>
                  <br>
                  Scenario.:<br>
                  I am having 3 devices called, A,B,C. On dhcp conf pool
                  is restricted to <b>only one IP</b>.<br>
                  Also on dhcpd conf <b>static bind is enabled</b> for
                  device A.<br>
                  <br>
                  <br>
                  1.Plug device A to network -> with out issue device
                  got IP<br>
                  <br>
                  DHCPOFFER on 51.101.0.10 to 00:20:d2:3a:51:69 via
                  51.101.0.1<br>
                  Commit: IP: 51.101.0.10 Mac: 0:20:d2:3a:51:69 Name:
                  51.101.0.10ClientGW: 51.101.0.1<br>
                  <br>
                  2.Unplug device A and change the static conf MAC to
                  B's MAC(Restart dhcpd server) and Plug device B<br>
                  <br>
                  No issue device B got IP,<br>
                  DHCPOFFER on 51.101.0.10 to 00:20:d2:39:24:f8 via
                  51.101.0.1<br>
                  Commit: IP: 51.101.0.10 Mac: 0:20:d2:39:24:f8 Name:
                  51.101.0.10ClientGW: 51.101.0.1<br>
                  <br>
                  3. Replug the device A <b>with out removing device B</b>,<br>
                  A received the IP even though B is having it, A's IP
                  is active and B's IP is not active.<br>
                  <br>
                  DHCPDISCOVER from 00:20:d2:3a:51:69 via <a
                    moz-do-not-send="true" href="http://51.101.0.1"
                    target="_blank">51.101.0.1</a>: network <a
                    moz-do-not-send="true" href="http://51.101.0.0/19"
                    target="_blank">51.101.0.0/19</a>: no free leases<br>
                  Reclaiming abandoned lease 51.101.0.10.<br>
                  ICMP Echo reply while lease 51.101.0.10 valid.<br>
                  Abandoning IP address <a moz-do-not-send="true"
                    href="http://51.101.0.10" target="_blank">51.101.0.10</a>:
                  pinged before offer<br>
                  DHCPDISCOVER from 00:20:d2:3a:51:69 via <a
                    moz-do-not-send="true" href="http://51.101.0.1"
                    target="_blank">51.101.0.1</a>: cancel load balance
                  to peer XXX - no free leases<br>
                  DHCPDISCOVER from 00:20:d2:3a:51:69 via 51.101.0.1<br>
                  DHCPOFFER on 51.101.0.10 to 00:20:d2:3a:51:69 via
                  51.101.0.1<br>
                  Commit: IP: 51.101.0.10 Mac: 0:20:d2:3a:51:69 Name:
                  51.101.0.10ClientGW: 51.101.0.1<br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  Why this is happening, I do not want DHCPD to offer
                  the IP to another device when it is bind on static
                  file to another device.But strange thing is when i
                  plug device C when only device B(<b>same way as device
                    A plug in step 3 but this time not device A instead
                    device C is used.</b>) is there , C naver receive a
                  IP as i expected.Help is very much appreciated,What is
                  happening with device A and B??<br>
                  <br>
                  <br>
                  Thank You,<br>
                  chamara<br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br clear="all">
                  <br>
                  -- <br>
                  chthsa<br>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
              </div>
              <pre>_______________________________________________
dhcp-users mailing list
<a moz-do-not-send="true" href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>
<a moz-do-not-send="true" href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
              <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
            <span class="HOEnZb"><font color="#888888"> <br>
                <pre cols="72">-- 
Best regards

Sten Carlsen

No improvements come from shouting:
       "MALE BOVINE MANURE!!!"
</pre>
              </font></span></div>
          <br>
          _______________________________________________<br>
          dhcp-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.isc.org/mailman/listinfo/dhcp-users"
            target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      chthsa<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best regards

Sten Carlsen

No improvements come from shouting:
       "MALE BOVINE MANURE!!!"
</pre>
  </body>
</html>