ISC-dhcp subnet limit?

Rob Morin rmorin at datavalet.com
Thu Feb 4 19:04:00 UTC 2016


Thanks for the quick reply Denis..

So i found a number which seems to be ok, I have 8 gigs of ram on that 
dhcp server... at its current full tilt it uses 4

Feb  4 13:59:05 localhost dhcpd: Lease IP hash:  Contents/Size (%): 
1664250/1800017 (92%). Min/max: 0/2
Feb  4 13:59:05 localhost dhcpd: Lease UID hash: Contents/Size (%): 
0/1800017 (0%). Min/max: 0/0
Feb  4 13:59:05 localhost dhcpd: Lease HW hash:  Contents/Size (%): 
0/1800017 (0%). Min/max: 0/0

What do you think?

Rob Morin
Montreal, Canada

On 2016-02-04 1:50 PM, Denis Laventure wrote:
>
> Hi Rob,
>
> I don’t remember having any problem with someone not getting a lease. 
> If that was the case, the stock apt-get version would have done the 
> same thing with the default value anyway.
>
> I think you should have a number under 100% so yeah I would up that 
> number (find a prime number above 1664250). A value that high will 
> probably impact the memory used by the daemon.
>
> Denis
>
> *De :*dhcp-users-bounces at lists.isc.org 
> [mailto:dhcp-users-bounces at lists.isc.org] *De la part de* Rob Morin
> *Envoyé :* 4 février 2016 13:44
> *À :* Users of ISC DHCP <dhcp-users at lists.isc.org>
> *Objet :* Re: ISC-dhcp subnet limit?
>
> Would a too low lease_hash prevent users from getting a lease or IP at 
> a certain point? I had this issue last night where i was running on 
> stock apt-get install and after we moved one more controller to that 
> server , people started not being able to get leases....
>
> With the increase of lease_has after a restart i get this
>
> Feb  4 13:41:49 localhost dhcpd: Lease IP hash:  Contents/Size (%): 
> 1664250/400009 (416%). Min/max: 3/5
> Feb  4 13:41:49 localhost dhcpd: Lease UID hash: Contents/Size (%): 
> 0/400009 (0%). Min/max: 0/0
> Feb  4 13:41:49 localhost dhcpd: Lease HW hash:  Contents/Size (%): 
> 0/400009 (0%). Min/max: 0/0
> Feb  4 13:41:49 localhost dhcpd: Server starting service.
>
> So i should up it until i have space??
>
> Rob Morin
> Gestionnaire des systèmes | Senior Systems Administrator
> Tel: 514 385-4448 #174
> DATAVALET.COM
> 5275, chemin Queen-Mary, Montréal (Québec) H3W 1Y3 Canada
>   
> CE COURRIEL AINSI QUE CES DOCUMENTS JOINTS peuvent contenir des renseignements confidentiels et privilégiés. Si vous n’êtes pas le destinataire désigné, veuillez nous en informer immédiatement et effacer toute copie. Merci.
> THIS EMAIL AND THE DOCUMENTS ATTACHED may contain privileged or confidential information. If the reader of this message is not the intended recipient, please notify the sender immediately and delete the original message. Thank you.
>
> On 2016-01-29 9:58 AM, Denis Laventure wrote:
>
>     Hi Rob,
>
>     I can't help for issue on your interface problem but I think I can
>     help with the performance.
>
>     I used to have performance problem with my failover setup and
>     someone at ISC told me to change some value in the code to get
>     debug information about memory usage.
>
>     Add this to the file "includes/dhcpd.h"
>
>     #if !defined (REPORT_HASH_PERFORMANCE)
>
>     # define REPORT_HASH_PERFORMANCE 1
>
>     #endif
>
>     Compile and start the daemon and you should get something like
>     this on screen and in the log:
>
>     dhcpd: DHCP name hash: Contents/Size (%): 106/401 (26%). Min/max: 0/2
>
>     dhcpd: DHCP code hash: Contents/Size (%): 106/254 (41%). Min/max: 0/1
>
>     dhcpd: NWIP name hash: Contents/Size (%): 11/17 (64%). Min/max: 0/2
>
>     dhcpd: NWIP code hash: Contents/Size (%): 11/17 (64%). Min/max: 0/1
>
>     dhcpd: FQDN name hash: Contents/Size (%): 8/13 (61%). Min/max: 0/2
>
>     dhcpd: FQDN code hash: Contents/Size (%): 8/13 (61%). Min/max: 0/1
>
>     dhcpd: VIVCO name hash: Contents/Size (%): 1/127 (0%). Min/max: 0/1
>
>     dhcpd: VIVCO code hash: Contents/Size (%): 1/127 (0%). Min/max: 0/1
>
>     dhcpd: VIVSO name hash: Contents/Size (%): 1/127 (0%). Min/max: 0/1
>
>     dhcpd: VIVSO code hash: Contents/Size (%): 1/127 (0%). Min/max: 0/1
>
>     dhcpd: ISC name hash: Contents/Size (%): 2/3 (66%). Min/max: 0/1
>
>     dhcpd: ISC code hash: Contents/Size (%): 2/3 (66%). Min/max: 0/1
>
>     dhcpd: Relay Agent name hash: Contents/Size (%): 5/11 (45%).
>     Min/max: 0/1
>
>     dhcpd: Relay Agent code hash: Contents/Size (%): 5/11 (45%).
>     Min/max: 0/1
>
>     dhcpd: Server-Config Option name hash: Contents/Size (%): 67/136
>     (49%). Min/max: 0/4
>
>     dhcpd: Server-Config Option code hash: Contents/Size (%): 67/136
>     (49%). Min/max: 0/1
>
>     dhcpd: data: hardware: no raw packet or lease is available
>
>     dhcpd: data: hardware: no raw packet or lease is available
>
>     dhcpd: data: hardware: no raw packet or lease is available
>
>     dhcpd: data: hardware: no raw packet or lease is available
>
>     dhcpd: data: hardware: no raw packet or lease is available
>
>     dhcpd: data: hardware: no raw packet or lease is available
>
>     dhcpd: Config file: /dhcpd/dhcpd.conf
>
>     dhcpd: Database file: /dhcpd/dhcpd.leases
>
>     dhcpd: PID file: /var/run/dhcpd.pid
>
>     dhcpd: Wrote 0 class decls to leases file.
>
>     dhcpd: Wrote 0 deleted host decls to leases file.
>
>     dhcpd: Wrote 0 new dynamic host decls to leases file.
>
>     dhcpd: Wrote 48578 leases to leases file.
>
>     dhcpd: Host HW hash:   Contents/Size (%): 1420/22501 (6%).
>     Min/max: 0/4
>
>     dhcpd: Host UID hash:  No table.
>
>     dhcpd: Lease IP hash:  Contents/Size (%): 70324/100003 (70%).
>     Min/max: 0/5
>
>     dhcpd: Lease UID hash: Contents/Size (%): 8708/100003 (8%).
>     Min/max: 0/3
>
>     dhcpd: Lease HW hash:  Contents/Size (%): 9036/100003 (9%).
>     Min/max: 0/3
>
>     "Lease IP hash" is where you should look.
>
>     By default the server use a lease hash size value of 100003. I had
>     over 350000 leases so I was exceeding that value and the server
>     was very slow to start.
>
>     To change the size you must edit the file "includes/dhcpd.h" and
>     find LEASE_HASH_SIZE and replace the value. This value must be a
>     prime number (I used 400009).
>
>     -# define LEASE_HASH_SIZE       100003
>
>     +# define LEASE_HASH_SIZE       400009
>
>     Compile and start again. That was the answer for me.
>
>     One other thing with the failover setup, the peer will always be
>     in recover state when starting for the duration of the "MCLT"
>     (time in second) in your failover definition (1800 in your case),
>     so it will be in recover start for 30 minutes. I use 300 (5 minutes).
>
>     Le texte aurait été plus facile à écrire en français mais comme la
>     liste est en anglais et que ça peut aider d'autres personnes alors
>     je me suis forcé. En espérant que ce soit clair pour toi !
>
>     Denis Laventure
>
>     Université du Québec à Chicoutimi
>
>     *De :*dhcp-users-bounces at lists.isc.org
>     <mailto:dhcp-users-bounces at lists.isc.org>
>     [mailto:dhcp-users-bounces at lists.isc.org] *De la part de* Rob Morin
>     *Envoyé :* 27 janvier 2016 20:12
>     *À :* dhcp-users at lists.isc.org <mailto:dhcp-users at lists.isc.org>
>     *Objet :* ISC-dhcp subnet limit?
>
>     Hello all, my first post here, so please be gentle J
>
>     I have inherited 2 dhcp servers, one primary(dhcp-1) & one
>     secondary(dhcp-2) running isc-dhcpd-4.2.4 on Ubuntu 14.0(Trusty)
>
>     We are having a few issues, and I cannot seem to figure out whats
>     going on. I have a few questions, maybe someone can help me with.
>
>     Is there a max limit to how many subnets can be used in the pools?
>     As currently we are using just over 6000 subnets
>
>     Currently our secondary dhcp-server is always in recovery mode,
>     not sure why?
>
>     Does it matter if a DISCOVER comes in on eth1 but OFFER goes out
>     on eth0?
>
>     My primary server /etc/dhcpd.conf file
>
>     authoritative;
>
>     log-facility local7;
>
>     option domain-name "dyn";
>
>     option domain-name-servers 172.30.64.210, 172.30.64.220;
>
>     default-lease-time 1200;
>
>     max-lease-time 3600; # 1h
>
>     include "/etc/dhcp/dhcpd_pools.conf";
>
>     # Include the primary configuration
>
>     include "/etc/dhcp/dhcpd_primary.conf";
>
>     /etc/dhcp/dhcpd_primary has the following
>
>     ## PRIMARY
>
>     failover peer "tdl-dhcp-failover" {
>
>       primary; # declare this to be the primary server
>
>                    address 172.30.128.9;
>
>                    port 647;
>
>       peer address 172.30.128.10;
>
>       peer port 647;
>
>       max-response-delay 30;
>
>       max-unacked-updates 10;
>
>       load balance max seconds 3;
>
>       mclt 1800;
>
>       split 128;
>
>     }
>
>     Exert from dhcpd_pools file, starts like this….
>
>     subnet 10.32.0.0 netmask 255.255.255.0 {
>
>       option routers 10.32.0.1;
>
>       pool {
>
>             failover peer "dhcp-failover";
>
>             range 10.32.0.5 10.32.0.254;
>
>       }
>
>     }
>
>     And finishes like this, with all the subnets in between…
>
>     subnet 10.57.255.0 netmask 255.255.255.0 {
>
>       option routers 10.57.255.1;
>
>       pool {
>
>             failover peer "dhcp-failover";
>
>             range 10.57.255.5 10.57.255.254;
>
>       }
>
>     }
>
>     Example Exert from logs on both serves of a client that could not
>     get an IP
>
>
>     from dhcp-1
>     Jan 27 18:30:31 dhcp-1 dhcpd: DHCPDISCOVER from fc:e9:98:bc:a8:7b
>     (iPhone) via 10.50.170.1
>     Jan 27 18:30:31 dhcp-1 dhcpd: DHCPOFFER on 10.50.170.93 to
>     fc:e9:98:bc:a8:7b (iPhone) via 10.50.170.1
>
>     from dhcp-2
>     Jan 27 18:53:55 dhcp-2 dhcpd: DHCPDISCOVER from fc:e9:98:bc:a8:7b
>     via 10.50.170.1: peer holds all free leases
>     Jan 27 18:54:04 dhcp-2 dhcpd: DHCPDISCOVER from fc:e9:98:bc:a8:7b
>     via 10.50.170.1: peer holds all free leases
>
>     Never see the ACK.
>
>     Any suggestion would be greatly appreciated.. :
>
>     Thanks…
>
>     Rob
>
>     Montreal Canada
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20160204/176a6429/attachment-0001.html>


More information about the dhcp-users mailing list