serving different filenames to docsis 1, 1.1, and 2.0 modems

Brian Raaen braaen at zcorum.com
Thu Oct 18 15:14:57 UTC 2007


I am not sure of the best way to do this.  Currently we provision cablemodems using host statements like the following example.

host 00080e063e42 {filename "153651202sc.cfg"; hardware ethernet 00:08:0e:06:3e:42;}

I am trying to create a meathod that will note the configure at the host level without setting the filename,
 so that I can override it and send different files based on the speed they should get.

I have tried changing the provisioning to use an option instead of hardcoding the filename at the host level.
  I am thinking something like the following

host 00080e063e42       {option modem-config "153651202sc.cfg";  hardware ethernet 00:08:0e:06:3e:42;}


then in the subnet I assign the filename using the following format.

#Global scope
option modem-config code 243 = text;
option modem-config on;
include "/etc/dhcpd/modems.conf";

....

#Inside a subnet

if config-option modem-config = "153651202sc.cfg" {

                        if substring (option vendor-class-identifier, 0 , 9) = "docsis2.0" {
                                filename = "153651202sc20.cfg";

                        } else if substring (option vendor-class-identifier, 0 , 9) = "docsis1.1" {
                                filename = "153651202sc11.cfg";

                        } else {
                                filename = "153651202sc10.cfg";

                        }
                }

The problem I am having is the the option I set in the host statement is not being detected by the first 'if' statement.
If I remove the line to detect the modem-config option the other lines work, but I need to still server more than one speed.  Is there a way to set a option
that is like a variable that is only significant to the server, so that I can know which speed to use.  Our provisioning system can be modified to use a string
other than 'filename' in the host statement.

Our config has all the modem configs in a separate file called "modems.conf" where it sets the host statments.

I know this may sound confusing, but I appreciate any help anyone can give.
I have spent about two days pouring over the man pages (dhcd.conf, dhcp-options, and dhcp-eval) and the dhcp book to no avail.


-- 
Brian Raaen
Network Engineer
braaen at zcorum.com
Tel 678-507-5000x5574


More information about the dhcp-users mailing list