spawning classes bug?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

spawning classes bug?

Troy Ayers
We limit each customer, which is uniquely identified with a combination of circuit ID, and remote id, to two IP addresses.  Like so:

class "customer" {spawn with concat(option agent.remote-id," interface ",binary-to-ascii(10,8,".",substring(option agent.circuit-id,0,2)));
lease limit 2;}


This is reproducible with dhcp 442.  There are no other spawn classes.  Lease times are 24 hours.


Customer has router A, using one IP with mac 11:11:11:11:11:11

Router A gets disconnected and replaced with Router B.

Router B gets an IP.  This is the 2nd IP with mac 22:22:22:22:22:22

Router B updates firmware, and reboots. 


Then we get this over and over...​
DHCPDISCOVER from 22:22:22:22:22:22 via 10.x.x.x: no available billing: lease limit reached in all matching classes (last: 'customer')


The clients MAC did not change.

The clients billing sub-class (concatenated remote id, circuit id) did not change.


I've examined the leases file while this is occurring.  There is:

billing subclass "customer" "ShelfXYZ interface 0.0"; 

One for Router A's MAC and one for Router B's MAC address.


When we run into this, we have to allow their billing subclass to have a lease limit of 3, temporarily.


Re-examining the leases file after allowing a "3rd IP", shows that the client gets the same 2nd IP on the Router B,  and the leases file shows the same two billing sub-classes & same MAC addresses.


I've tried ignore-client-uids, to no effect. 


What can I do to allow this Router B, without temporarily allowing a lease limit of "3" ?


Also, this behavior is not always reproducible, this is what is especially baffling to me.


-Troy


_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: spawning classes bug?

Philippe Maechler
Hi Troy

I can't help you here, but we use a similar approach and that works pretty well for us:
class "CUSTOMER001_CPE_DHCP" { 
  match if ( substring ( option agent.circuit-id, 0, 30 ) = "someAwesome String 2 m-a-t-c-h" ); 
  spawn with option agent.circuit-id; lease limit 1;
}

And I never saw nor see the issue you are describing. This setup is working fine, although router changes may bite us, because they are not so easy doable
But our lease time is set to 1h

This is currently on dhcp-4.3.6-P1 and we have that setup since 4.2 (maybe 4.1, can't remember). the standby machine runs 4.4.1 (no failover involved here)

/BR
Philippe

On Fri, 30 Oct 2020 at 15:33, Troy Ayers <[hidden email]> wrote:
We limit each customer, which is uniquely identified with a combination of circuit ID, and remote id, to two IP addresses.  Like so:

class "customer" {spawn with concat(option agent.remote-id," interface ",binary-to-ascii(10,8,".",substring(option agent.circuit-id,0,2)));
lease limit 2;}


This is reproducible with dhcp 442.  There are no other spawn classes.  Lease times are 24 hours.


Customer has router A, using one IP with mac 11:11:11:11:11:11

Router A gets disconnected and replaced with Router B.

Router B gets an IP.  This is the 2nd IP with mac 22:22:22:22:22:22

Router B updates firmware, and reboots. 


Then we get this over and over...​
DHCPDISCOVER from 22:22:22:22:22:22 via 10.x.x.x: no available billing: lease limit reached in all matching classes (last: 'customer')


The clients MAC did not change.

The clients billing sub-class (concatenated remote id, circuit id) did not change.


I've examined the leases file while this is occurring.  There is:

billing subclass "customer" "ShelfXYZ interface 0.0"; 

One for Router A's MAC and one for Router B's MAC address.


When we run into this, we have to allow their billing subclass to have a lease limit of 3, temporarily.


Re-examining the leases file after allowing a "3rd IP", shows that the client gets the same 2nd IP on the Router B,  and the leases file shows the same two billing sub-classes & same MAC addresses.


I've tried ignore-client-uids, to no effect. 


What can I do to allow this Router B, without temporarily allowing a lease limit of "3" ?


Also, this behavior is not always reproducible, this is what is especially baffling to me.


-Troy

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users