I think I fixed the problem. I changed two variables:<br>default-lease-time 600; ( before 1200)<br>max-lease-time 3600; ( before 12000)<br><br>Is it good to have these values when i have more than 1k users ?<br><br><br><div class="gmail_quote">
2012/9/13 Sten Carlsen <span dir="ltr"><<a href="mailto:stenc@s-carlsen.dk" target="_blank">stenc@s-carlsen.dk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFCC" text="#000000"><div class="im">
    <br>
    <div>On 13/09/12 14:31, Glenn Satchell
      wrote:<br>
    </div>
    <blockquote type="cite">
      <pre>Actually defining pools at the shared-network level is ok, if somewhat
unusual. The server will match the pool up with an appropriate subnet. So
no need to re-write the config file.</pre>
    </blockquote></div>
    Right, but then defining hosts at that level might get you in some
    "interesting" situations with inheritance of options from unexpected
    scopes.<br>
    <br>
    I think there might still be a good reason to go over the structure
    of the file and check it vs. best practices.<div><div class="h5"><br>
    <blockquote type="cite">
      <pre>Now, as to what is going on, perhaps using grep to find entries in the log
file for that mac address and ip address. With thousands of entries, the
log file is going to be cluttered with other things.

regards,
-glenn

On Thu, September 13, 2012 6:22 pm, Jan nowak wrote:
</pre>
      <blockquote type="cite">
        <pre>thanks for fast reply. You scared the hell out of me. I have 1k users in
this config and every record have same pattern, all of this lines are in
shared netowrk

#######################################################################################
host m69 { hardware ethernet 00:0a:73:f9:e6:3a; fixed-address
172.16.10.69;
filename "<a href="http://file.cm" target="_blank">file.cm</a>";}
class "M069" { match if binary-to-ascii(16, 8, ":", option
agent.remote-id)
= "0:a:73:f9:e6:3a"; spawn with option agent.remote-id; lease limit 1;}
pool { allow members of "M069"; range 172.16.20.69; }

host m70 { hardware ethernet 00:0a:73:f9:e6:31; fixed-address
172.16.10.70;
filename "<a href="http://file.cm" target="_blank">file.cm</a>";}
class "M070" { match if binary-to-ascii(16, 8, ":", option
agent.remote-id)
= "0:a:73:f9:e6:31"; spawn with option agent.remote-id; lease limit 1;}
pool { allow members of "M070"; range 172.16.20.70; }

host m71 { hardware ethernet 00:0a:73:f9:e6:32; fixed-address
172.16.10.71;
filename "<a href="http://file.cm" target="_blank">file.cm</a>";}
class "M071" { match if binary-to-ascii(16, 8, ":", option
agent.remote-id)
= "0:a:73:f9:e6:32"; spawn with option agent.remote-id; lease limit 1;}
pool { allow members of "M071"; range 172.16.20.71; }

host m72... etc
##########################################################################################
and it would be very difficult to rewrite it. In this pattern every modem
should have only one CPE device connected, so pool provides only one ip
address. As you can see the class and poll fields aren't between host
braces, they're independent of each other.
So what should i do now, should i rewrite entire config file ?

kind regards,
Jan

2012/9/13 Simon Hobson <a href="mailto:dhcp1@thehobsons.co.uk" target="_blank"><dhcp1@thehobsons.co.uk></a>

</pre>
        <blockquote type="cite">
          <pre>Jan nowak top-posted:


 Sep 13 07:32:35 debian dhcpd: ICMP Echo reply while lease 172.16.20.203
</pre>
          <blockquote type="cite">
            <pre>valid.
Sep 13 07:32:35 debian dhcpd: ICMP Echo reply while lease 172.16.20.203
valid.
Sep 13 07:32:35 debian dhcpd: ICMP Echo reply while lease 172.16.20.203
valid.
Sep 13 07:32:35 debian dhcpd: ICMP Echo reply while lease 172.16.20.203
valid.
Sep 13 07:32:37 debian dhcpd: Reclaiming abandoned lease 172.16.20.203.
Sep 13 07:32:37 debian dhcpd: Reclaiming abandoned lease 172.16.20.203.
Sep 13 07:32:37 debian dhcpd: Reclaiming abandoned lease 172.16.20.203.
Sep 13 07:32:37 debian dhcpd: Reclaiming abandoned lease 172.16.20.203.

</pre>
          </blockquote>
          <pre>Not seen that first message before, but basically it means the server
has
pinged the address and got a reply - when it shouldn't have. So it's
marked
the lease as abandoned - abandoned leases are only used as last resort
if
nothing else is available.

But this is a different address to the one of interest ...


 Sep 13 07:32:41 debian dhcpd: data: "leased-address" configuration
</pre>
          <blockquote type="cite">
            <pre>directive: there is no lease associated with this client.

</pre>
          </blockquote>
          <pre>That would be correct - the lease has been abandoned and there's nothing
leased to the client.


 Sep 13 07:32:58 debian dhcpd: DHCPDISCOVER from 00:14:5e:7f:35:3c via
</pre>
          <blockquote type="cite">
            <pre>eth0: network xxx: no free leases

</pre>
          </blockquote>
          <pre> Sep 13 07:32:58 debian dhcpd: DHCPDISCOVER from 00:14:5e:7f:35:3c via
</pre>
          <blockquote type="cite">
            <pre>eth0: network xxx: no free leases

</pre>
          </blockquote>
          <pre>This is what you expect to see when using restricted lease ranges and
old
leases are still active. There isn't anything for the server to assign
to
the client. Again, this isn't the client (MAC) in the config snippet.

It's not that helpful to see this unrelated log extract. If it's a
network
with too much DHCP traffic to extract only the relevant entries, then
you
probably need to either temporarily disable DHCP service for all but one
client, or setup a test environment with only the one client.


 shared-network xxx{
</pre>
          <blockquote type="cite">
            <pre>subnet 172.16.0.0 netmask 255.255.0.0 {
next-server 192.168.0.1;
option domain-name-servers 217.30.129.149, 217.30.137.200;
option routers 172.16.0.1;
option subnet-mask 255.255.0.0;
option broadcast-address 172.16.255.255;
}

</pre>
          </blockquote>
          <pre>Could I suggest better formatting would be a good idea ? Something like
this would make the nesting more readily viewable :


shared-network xxx{

  subnet 172.16.0.0 netmask 255.255.0.0 {
    next-server 192.168.0.1;
    option domain-name-servers 217.30.129.149, 217.30.137.200;
    option routers 172.16.0.1;
    option subnet-mask 255.255.0.0;
    option broadcast-address 172.16.255.255;
  }

  subnet ...

This is especially true when we get to your host statements.


 ##############################**###########
</pre>
          <blockquote type="cite">
            <pre>host m69 { hardware ethernet 00:0a:73:f9:e6:3a; fixed-address
172.16.10.69; filename "<a href="http://plik.cm" target="_blank"><http://plik.cm></a><a href="http://plik.cm" target="_blank">plik.cm</a>";}

class "M069" { match if binary-to-ascii(16, 8, ":", option
agent.remote-id) = "0:a:73:f9:e6:3a"; spawn with option
agent.remote-id;
lease limit 1;}
pool { allow members of "M069"; range 172.16.20.69; }
##############################**################
}

</pre>
          </blockquote>
          <pre>Not only is this hard to read, it's mixing scopes as well.


host m69 {
  hardware ethernet 00:0a:73:f9:e6:3a;
  fixed-address 172.16.10.69;
  filename "<a href="http://plik.cm" target="_blank">plik.cm</a>";}
  class "M069" {
    match if binary-to-ascii(16, 8, ":", option agent.remote-id) =
"0:a:73:f9:e6:3a";
    spawn with option agent.remote-id; lease limit 1;
  }
  pool {
    allow members of "M069";
    range 172.16.20.69;
  }
}

So what *exactly* are you trying to achieve with this ?
You've correctly put the host statement in the global scope, but then
you've defined a class and pool within it.
I'm not sure about the class (do these need to be in the global scope
?),
but the pool really belongs within the subnet.

And there should be no need to have both the class/pool AND a fixed
address - either one or the other. So either :


host m69 {
  hardware ethernet 00:0a:73:f9:e6:3a;
  fixed-address 172.16.10.69;
  filename "<a href="http://plik.cm" target="_blank">plik.cm</a>";}
}

or :

class "M069" {

  match if option agent.remote-id) = 0:a:73:f9:e6:3a;
  spawn with option agent.remote-id; lease limit 1;
}
and

  subnet 172.16.0.0 netmask 255.255.0.0 {
    next-server 192.168.0.1;
    option domain-name-servers 217.30.129.149, 217.30.137.200;
    option routers 172.16.0.1;
    option subnet-mask 255.255.0.0;
    option broadcast-address 172.16.255.255;
    pool {
      allow members of "M069";
      range 172.16.20.69;
    }
  }

Ahh, now I've split that up, it becomes clearer. 172.16.10.69 is for the
device with MAC address 00:0a:73:f9:e6:3a and 172.16.20.69 is for the
downstream device.
As you've defined it, I don't think the class would be matched because
the
definition (and pool statement) are within a host statement that will
not
apply to the downstream client.
By definition, the downstream client will not be the host with MAC
address
0:a:73:f9:e6:3a, so the host statement will not be matches, and nothing
inside it will be acted upon.

--
Simon Hobson

Visit
<a href="http://www.**magpiesnestpublishing.co.uk/" target="_blank">http://www.**magpiesnestpublishing.co.uk/</a><a href="http://www.magpiesnestpublishing.co.uk/" target="_blank"><http://www.magpiesnestpublishing.co.uk/></a>for
books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

______________________________**_________________
dhcp-users mailing list
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>
<a href="https://lists.isc.org/mailman/**listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/**listinfo/dhcp-users</a><a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank"><https://lists.isc.org/mailman/listinfo/dhcp-users></a>

</pre>
        </blockquote>
        <pre>_______________________________________________
dhcp-users mailing list
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
      </blockquote>
      <pre>_______________________________________________
dhcp-users mailing list
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
    </blockquote>
    <br>
    </div></div><div class="im"><pre cols="72">-- 
Best regards

Sten Carlsen

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

<br>_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></blockquote></div><br>