dhcpd.leases overrides configuration in dhcpd.conf

Bill Shirley Bill at Henagar.PolymerIndustries.biz
Fri Oct 10 18:34:18 UTC 2014


On 10/10/2014 5:28 AM, Ronnie Flink wrote:
> Hi All.
>
>
> I'm working at a small ISP where we among other access technologies use DOCSIS and every modem receives a ip and 
> download its configuration from tftp based on information the modem gets from dhcp.
>
> I have been having a problem since upgrading to dhcpd 4.2.4 (Ubuntu 14.04 stock) from dhcpd 3.0.5 (on FreeBSD).
> The problem that occurs is when we make changes to the configuration of dhcpd and restart it the client that should 
> have been affected isn't (other clients that shouldn't be affected remain unaffected) and other normal dhcp operation 
> works as expected.
>
>
> Steps taken we take to notice the problem:
>
> We take a modems mac address (as listed below) and change the class it is associated with (to get the modem to load a 
> different configuration file) and then restart the dhcp server to activate this change.
> Next we restart the modem to force it to make a new dhcp-request and in the dhcp-reply we send the name of the 
> configuration file the modem should download but the modem doesn't download this file, looking at the reply we still 
> see the old filename.
> The only way to force the modem to download the new file is to manually remove all objects associated with the modems 
> mac-address from the dhcpd.leases file (with dhcp-server stoped and using a text editor), then when we have saved the 
> edited dhcpd.leases file,  started dhcpd again and finally restarted the modem again it downloads the correct file.
> If we look inside dhcpd.leases before and after this manual update the modem is associated with one class before and 
> another after.
>
> Each class has a option set to so that each modem assigned to that class should use a for the class specific 
> configuration file.
> Does anyone know if there a way we can get this working as before again so that what is in dhcpd.conf doesn't get 
> overridden by what's in dhcpd.leases or have any input on the issue?
>
>
> In the config-extract below 10.10.10.10 is the tftp-server that serves the modem configuration files and 172.16.x.x is 
> used to represent public addresses.
> There is a section from dhcpd.leases for a modem at the end for reference.
>
> class "bf83941a-5e71-7628-e049-13413865ccbf" {
>     match option dhcp-client-identifier;
>     filename "8000-800-2.cm <http://8000-800-2.cm>";
>     lease limit 4000;
> }
>
> class "772d4661-9dd6-5228-3342-6547a59a980b" {
>     match option dhcp-client-identifier;
>     filename "8000-4000-2.cm <http://8000-4000-2.cm>";
>     lease limit 4000;
> }
>
> class "none-docsis" {
>         match if not (substring (option vendor-class-identifier, 0, 6) = "docsis");
> }
>
> shared-network DOCSISNET-CABLENETWORK-2-XYZ {
> subnet 192.168.192.0 netmask 255.255.252.0 {
> option subnet-mask 255.255.252.0;
> option routers 192.168.195.254;
> next-server 10.10.10.10;
> pool {
> # Class Pool (START)
> allow members of "bf83941a-5e71-7628-e049-13413865ccbf";
> allow members of "772d4661-9dd6-5228-3342-6547a59a980b";
> allow members of "77e0e1ee-96b0-f6c4-40f8-6abcb23db39d";
> allow members of "e9fee5ad-0a10-de2e-82d2-98ec10e7f920";
> allow members of "1d66adaf-d85d-fbfd-93b5-7d842d398208";
> allow members of "20615bd4-23a5-d873-3f23-65df6a131944";
> # Class Pool (END)
> range 192.168.192.1 192.168.195.250;
> }
> }
>
> subnet 172.16.165.0 netmask 255.255.255.0 {
> option subnet-mask 255.255.255.0;
> option domain-name "domain.tld";
> option routers 172.16.165.254;
> pool {
> deny members of "docsis";
> allow members of "none-docsis";
> range 172.16.165.1 172.16.165.253;
> }
> log (info, concat("cmts-2-xyz (EuroDOCSIS): CM Mac = ",binary-to-ascii(16, 8, ":", option agent.remote-id), "; CPE IP 
> = ",binary-to-ascii (10, 8, ".", leased-address)));
> }
>
> }
>
> # Modems with DOCSIS 8/4
> subclass "772d4661-9dd6-5228-3342-6547a59a980b" 1:e4:48:c7:b3:c7:86;
> subclass "772d4661-9dd6-5228-3342-6547a59a980b" 1:00:23:ed:21:dc:01;
> subclass "772d4661-9dd6-5228-3342-6547a59a980b" 1:e4:48:c7:b3:b1:46;
>
> # Modems with DOCSIS 8
> subclass "bf83941a-5e71-7628-e049-13413865ccbf" 1:00:23:ed:21:d5:9a;
> subclass "bf83941a-5e71-7628-e049-13413865ccbf" 1:00:23:ed:21:dc:9f;
> subclass "bf83941a-5e71-7628-e049-13413865ccbf" 1:00:23:ed:9b:0a:d9;
> subclass "bf83941a-5e71-7628-e049-13413865ccbf" 1:00:23:ed:21:d7:99;
>
>
>
> lease 192.168.192.210 {
>   starts 4 2014/10/09 08:55:19;
>   ends 4 2014/10/09 14:55:19;
>   tstp 4 2014/10/09 14:55:19;
>   cltt 4 2014/10/09 08:55:19;
>   binding state active;
>   next binding state free;
>   billing subclass "772d4661-9dd6-5228-3342-6547a59a980b" 01:e4:48:c7:b3:c7:86;
>   hardware ethernet e4:48:c7:b3:c7:86;
>   uid "\001\344H\307\263\307\206";
>   option agent.circuit-id 80:2:4:12;
>   option agent.remote-id e4:48:c7:b3:c7:86;
>   option agent.unknown-9 0:0:11:8b:6:1:4:1:2:3:0;
> }
>
>
> /BR,
> Ronnie F
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

Is there an DHCP option called 'filename'?  I don't see it here:
http://www.ipamworldwide.com/dhcp-options/isc-dhcpv4-options.html

There is an option bootfile-name. I would think your class should be:

class "bf83941a-5e71-7628-e049-13413865ccbf" {
     match option dhcp-client-identifier;
     option bootfile-name "8000-800-2.cm <http://8000-800-2.cm>";
     lease limit 4000;
}

Also, I don't see anything about filename in the lease you provided.  If you restarted dhcpd, how could it remember the 
old filename?

Bill


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20141010/a780c213/attachment.html>


More information about the dhcp-users mailing list