Send dhcp-users mailing list submissions to dhcp-users@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/dhcp-users or, via email, send a message with subject or body 'help' to dhcp-users-requ...@lists.isc.org You can reach the person managing the list at dhcp-users-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of dhcp-users digest..." Today's Topics: 1. Re: Configuring option 82 (Surya Teja) 2. Re: DHCP restart with bulk lease data (Simon Hobson) 3. Re: DHCP restart with bulk lease data (Surya Teja) 4. Re: Configuring option 82 (Surya Teja) ---------------------------------------------------------------------- Message: 1 Date: Thu, 26 Sep 2019 19:42:19 +0530 From: Surya Teja <suryateja...@gmail.com> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Configuring option 82 Message-ID: <ca+0ac3xc_l_ijmzasqca-8cntmzgsl0rg1xuu_xljlhp2a-...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi is the option 82 supported by using class concept only ? or can it be defined as other general options like domain-name server, router in scope section ? On Tue, Sep 24, 2019 at 12:49 PM Surya Teja <suryateja...@gmail.com> wrote: > Hi, > I am trying to configure the dhcp option 82, went through the google > forums and one of it suggest the syntax like > # vim /etc/dhcp/dhcpd.conf > ######################################################## > log-facility local7; > > > > > > > *class "VLAN10" { match if > binary-to-ascii(10,16,"",substring(option agent.circuit-id,2,2)) = "10";} # > VLAN10class "VLAN20" { match if ( substring(option > agent.remote-id,2,15)="10.5.20.4" and binary-to-ascii(10, 16, > "",substring(option agent.circuit-id, 4, 2)) = "2" ); }* > subnet 192.168.10.0 netmask 255.255.255.0 { > pool { > *allow members of "VLAN10";* > default-lease-time 600; > max-lease-time 7200; > range 192.168.10.1 > 192.168.10.199; > option routers 192.168.10.254; > option broadcast-address 192.168.10.255; > option subnet-mask 255.255.255.0; > option domain-name-servers 4.2.2.2; > } > } > subnet 192.168.20.0 netmask 255.255.255.0 { > pool { > * allow members of "VLAN20";* > default-lease-time 600; > max-lease-time 7200; > range 192.168.20.20 192.168.20.199; > option routers 192.168.20.254; > option broadcast-address 192.168.20.255; > option subnet-mask 255.255.255.0; > option domain-name-servers 4.2.2.2; > > } > (Just ignore ip values) > can we configure this concept only by using classes and make it allow or > deny like that? > or can we use the option space concept to get it worked(do we have any > other syntax). Thanks in advance > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20190926/af4205bb/attachment-0001.html> ------------------------------ Message: 2 Date: Thu, 26 Sep 2019 18:05:25 +0100 From: Simon Hobson <dh...@thehobsons.co.uk> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: DHCP restart with bulk lease data Message-ID: <766f0ab5-4f5a-4700-b9fe-dd316bbfe...@thehobsons.co.uk> Content-Type: text/plain; charset=us-ascii Surya Teja <suryateja...@gmail.com> wrote: > I have an issue with dhcpd service restart when it handles a bulk lease data. > As part of testing I have simulated the dhcp server to lease test using > dhcperf tool to check the performance statistics when the dhcpserver handles > a huge lease data Ex :300689(3M). It is taking 3 to 4 minutes of duration to > start up the service, Is this the expected behaviour when we have a such > large lease file ? (FYI: No memory, disk space problem on the system) > > When I restarted dhcpd in the log message I have a seen statement like > Wrote 300689 leases to leases file. > Does the restart dhcpd will rewrite the lease file again? > I also observed as new lease file with extension ~ at end like after restart > dhcpd > I see two lease file one with dhcpd.leases and other dhcpd.leases~ > If it is not expected behaviour can anyone have any reference tool or steps > to check what is taking time to bring the service up It is a known issue that the server can take some time to start up when there is a large number of potential addresses in the defined pools. The reason for this being the way the server builds hashing tables internally. It is probably to be expected as well in the situation you've described - it must read the leases file and process each lease in turn, updating the internal structures as it goes. The leases file is a log file database - nothing is ever changed, only new entries added at the end. Obviously, such a file would grow without bounds over time without some sort of cleanup routine. Periodically, default is every hour, the server will write out a fresh leases file from it's internal structures - this file will contain no duplicate entries. It writes this to a new file, moves the existing lease file to a backup name (the one with "~" on the end), and moves the new file into place as the active leases file. The leases file is ONLY read at server startup and never after that - everything is done from in memory structures. In between cleanups as detailed above, every time anything changes, a new record is appended to the on-disk leases file. ------------------------------ Message: 3 Date: Fri, 27 Sep 2019 13:03:07 +0530 From: Surya Teja <suryateja...@gmail.com> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: DHCP restart with bulk lease data Message-ID: <CA+0Ac3yD+yTNLZ3UrQHdDgFeEzgv=4c3k97dkidp__-3cv9...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi Simon Thanks for reply, Periodically, default is every hour, the server will write out a fresh leases file from it's internal structures ---> I have a doubt when the server write out a fresh leases file from it's internal structures will the dhcpd service be in off state at this duration? this file will contain no duplicate entries ---> Hi I have seen the duplicate entry in my server lease file sample snippet: ============== lease *192.168.2.52* { * starts 5 2019/09/27 07:21:32; ends 5 2019/09/27 08:21:32;* tstp 5 2019/09/27 08:51:32; tsfp 5 2019/09/27 08:21:32; cltt 5 2019/09/27 07:21:32; * binding state active;* next binding state expired; hardware ethernet 70:bb:e9:37:d9:9e; uid "\001p\273\3517\331\236"; set vendor-class-identifier = "android-dhcp-9"; client-hostname "RedmiNote6Pro"; } lease *192.168.2.52* { * starts 5 2019/09/27 07:21:32; ends 5 2019/09/27 08:21:32;* tstp 5 2019/09/27 08:51:32; tsfp 5 2019/09/27 08:51:32; atsfp 5 2019/09/27 08:51:32; cltt 5 2019/09/27 07:21:32; *binding state active;* next binding state expired; hardware ethernet 70:bb:e9:37:d9:9e; uid "\001p\273\3517\331\236"; set vendor-class-identifier = "android-dhcp-9"; client-hostname "RedmiNote6Pro"; } Yes It has same data, I don't see any issue on client side but want to make sure that, Is this acceptable in lease file ? or do we need to add any parameter in the config to avoid such duplicates in lease file? Thanks in Advance. On Thu, Sep 26, 2019 at 10:35 PM Simon Hobson <dh...@thehobsons.co.uk> wrote: > Surya Teja <suryateja...@gmail.com> wrote: > > > I have an issue with dhcpd service restart when it handles a bulk lease > data. As part of testing I have simulated the dhcp server to lease test > using dhcperf tool to check the performance statistics when the dhcpserver > handles a huge lease data Ex :300689(3M). It is taking 3 to 4 minutes of > duration to start up the service, Is this the expected behaviour when we > have a such large lease file ? (FYI: No memory, disk space problem on the > system) > > > > When I restarted dhcpd in the log message I have a seen statement like > > Wrote 300689 leases to leases file. > > Does the restart dhcpd will rewrite the lease file again? > > I also observed as new lease file with extension ~ at end like after > restart dhcpd > > I see two lease file one with dhcpd.leases and other dhcpd.leases~ > > If it is not expected behaviour can anyone have any reference tool or > steps to check what is taking time to bring the service up > > It is a known issue that the server can take some time to start up when > there is a large number of potential addresses in the defined pools. The > reason for this being the way the server builds hashing tables internally. > It is probably to be expected as well in the situation you've described - > it must read the leases file and process each lease in turn, updating the > internal structures as it goes. > > The leases file is a log file database - nothing is ever changed, only new > entries added at the end. Obviously, such a file would grow without bounds > over time without some sort of cleanup routine. Periodically, default is > every hour, the server will write out a fresh leases file from it's > internal structures - this file will contain no duplicate entries. It > writes this to a new file, moves the existing lease file to a backup name > (the one with "~" on the end), and moves the new file into place as the > active leases file. The leases file is ONLY read at server startup and > never after that - everything is done from in memory structures. In between > cleanups as detailed above, every time anything changes, a new record is > appended to the on-disk leases file. > > _______________________________________________ > dhcp-users mailing list > dhcp-users@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/20190927/b18dcad5/attachment-0001.html> ------------------------------ Message: 4 Date: Fri, 27 Sep 2019 13:14:43 +0530 From: Surya Teja <suryateja...@gmail.com> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Configuring option 82 Message-ID: <CA+0Ac3xz=k8-KmU8MZv2eje4kcVKYLGHe_ef6x=rzvymsdb...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi It might be too many questions but I wan to configure my dhcpd configuration file by avoiding the classes as much as possible If the subnet is configured as like below snippet subnet 192.168.10.0 netmask 255.255.255.0 { pool { range 192.168.10.10 192.168.10.199; option subnet-mask 255.255.255.0; option routers 10.1.10.1; option domain-name "test.com"; option agent.circuit-id "22"; option agent.remote-id "192.168.10.242"; } } can we achieve the option 82 configuration setup with above snippet Thanks in advance and or if any reference links to setup the option 82 functionality without class can also be appreciated On Thu, Sep 26, 2019 at 7:42 PM Surya Teja <suryateja...@gmail.com> wrote: > Hi is the option 82 supported by using class concept only ? > or can it be defined as other general options like domain-name server, > router in scope section ? > > On Tue, Sep 24, 2019 at 12:49 PM Surya Teja <suryateja...@gmail.com> > wrote: > >> Hi, >> I am trying to configure the dhcp option 82, went through the google >> forums and one of it suggest the syntax like >> # vim /etc/dhcp/dhcpd.conf >> ######################################################## >> log-facility local7; >> >> >> >> >> >> >> *class "VLAN10" { match if >> binary-to-ascii(10,16,"",substring(option agent.circuit-id,2,2)) = "10";} # >> VLAN10class "VLAN20" { match if ( substring(option >> agent.remote-id,2,15)="10.5.20.4" and binary-to-ascii(10, 16, >> "",substring(option agent.circuit-id, 4, 2)) = "2" ); }* >> subnet 192.168.10.0 netmask 255.255.255.0 { >> pool { >> *allow members of "VLAN10";* >> default-lease-time 600; >> max-lease-time 7200; >> range 192.168.10.1 >> 192.168.10.199; >> option routers 192.168.10.254; >> option broadcast-address 192.168.10.255; >> option subnet-mask 255.255.255.0; >> option domain-name-servers 4.2.2.2; >> } >> } >> subnet 192.168.20.0 netmask 255.255.255.0 { >> pool { >> * allow members of "VLAN20";* >> default-lease-time 600; >> max-lease-time 7200; >> range 192.168.20.20 192.168.20.199; >> option routers 192.168.20.254; >> option broadcast-address 192.168.20.255; >> option subnet-mask 255.255.255.0; >> option domain-name-servers 4.2.2.2; >> >> } >> (Just ignore ip values) >> can we configure this concept only by using classes and make it allow or >> deny like that? >> or can we use the option space concept to get it worked(do we have any >> other syntax). Thanks in advance >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20190927/7770b70d/attachment.html> ------------------------------ Subject: Digest Footer _______________________________________________ dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 131, Issue 19 *******************************************