HOw to add suboptions for option 122 in dhcp server

Chow Chi Ho (FP&HO) chchow at cabletv.com.hk
Fri Mar 23 02:52:07 UTC 2007


Here is my  dhcpd.conf,   it works


ddns-update-style interim;
ddns-updates on;
zone example.com. { primary 192.168.128.40; }
zone 174.10.in-addr.arpa. { primary 192.168.128.40; }
server-identifier 192.168.128.80;
log-facility local7;
ddns-domainname "example.com";


########option for MTA#######
        option space docsis-mta;
        option docsis-mta.dhcp-server-1 code 1 = ip-address;
        option docsis-mta.dhcp-server-2 code 2 = ip-address; 
        option docsis-mta.prov-server code 3 = string;
        option docsis-mta-encap code 122 = encapsulate docsis-mta;
        option docsis-mta.kerberos code 6 = string;


########local subnet declaration#######

        subnet 61.10.0.128 netmask 255.255.255.192 {
        option routers 61.10.0.129;
        option subnet-mask 255.255.255.192;
        }

        subnet 192.168.128.0 netmask 255.255.255.0 {
        option routers 192.168.128.254;
        option subnet-mask 255.255.255.0;
        }

########group declaration ########

        group {
                next-server 192.168.255.183;
                filename "test2.cfg";
                option dhcp.bootfile-name "test1.cfg";
                host 00e0.6f39.f988 {hardware ethernet 00:e0:6f:39:f9:88;}
                } 

        group {
                next-server 192.168.255.183;
                filename "mta_ss1.bin";
                option time-servers 192.168.255.185;
                option log-servers 192.168.255.192;
                option domain-name-servers 192.168.128.40,192.168.128.10;
                option domain-name "example.com";
                ddns-domainname "example.com";
                option host-name = concat (suffix (concat ("0", binary-to-ascii (16, 8, "", substring (hardware, 1, 1))),2),
                                           suffix (concat ("0", binary-to-ascii (16, 8, "", substring (hardware, 2, 1))),2),
                                           suffix (concat ("0", binary-to-ascii (16, 8, "", substring (hardware, 3, 1))),2),
                                           suffix (concat ("0", binary-to-ascii (16, 8, "", substring (hardware, 4, 1))),2),
                                           suffix (concat ("0", binary-to-ascii (16, 8, "", substring (hardware, 5, 1))),2),
                                           suffix (concat ("0", binary-to-ascii (16, 8, "", substring (hardware, 6, 1))),2) );
                option docsis-mta.prov-server 00:06:77:74:74:73:73:31:04:76:6f:69:70:07:68:6b:63:61:62:6c:65:03:63:6f:6d:02:68:6b:00
;
                option docsis-mta.kerberos 05:42:41:53:49:43:01:31:00;
                host 00e0.6f58.4da4 {hardware ethernet 00:e0:6f:58:4d:a4;}
                }

########class declaration########

        class "cm" { 
                match if substring(option vendor-class-identifier,0,6) = "docsis"; 
                spawn with option agent.remote-id; 
                default-lease-time 604800; 
                max-lease-time 604800; 
                min-lease-time 302400; 
                option time-offset -10800; 
                next-server 192.168.255.183; 
                option tftp-server-name "192.168.255.183"; 
                option time-servers 192.168.255.185; 
                option log-servers 192.168.255.192; 
                option domain-name "example.com"; 
                option docsis-mta.dhcp-server-1 192.168.128.80; 
                option docsis-mta.dhcp-server-2 192.168.128.80; 
        } 
        subclass "cm"  00:e0:6f:39:f9:88; 

        class "emta"    {
                match if substring(option vendor-class-identifier,0,8)="pktc1.0:";
                vendor-option-space docsis-mta; 
        } 
        subclass "emta" 00:e0:6f:58:4d:a4;


                shared-network  ABCD {
                option domain-name              "example.com";
                option domain-name-servers      dns.example.com;
                option routers                  10.174.0.1;
                subnet 10.0.0.0 netmask 255.0.0.0 {
                pool {

                        option routers 10.174.0.1;
                        option subnet-mask 255.255.248.0;
                        option domain-name-servers dns.example.com;
                        range 10.174.3.3 10.174.3.254;
                        allow members of "cm";
                        }
                pool {    # this ip range will be updated to dns.........but not work
                        option routers 10.174.8.1;
                        ddns-domainname "example.com";
                        option fqdn.server-update on;
                        option subnet-mask 255.255.252.0;
                        option domain-name "example.com";
                        option domain-name-servers dns.example.com;
                        range 10.174.10.1 10.174.10.10;
                        allow members of "emta";
                        ddns-updates on;
                        }
                } 
        }  # end shared-network



-----Original Message-----
From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org]On Behalf Of Horacio Maiorino
Sent: Friday, March 23, 2007 6:50 AM
To: dhcp-users at isc.org
Subject: RE: HOw to add suboptions for option 122 in dhcp server


Thanks, I think I can work with this. Two newbie questions

1.  in   01:04:0a:00:00:02   01 = option 1   and 04:0a:00:00:02  = 10.0.0.2
correct ?

2. Is there a option 122 calculator or calculator to convert ip 10.0.0.2 to
04:0a:00:00:02

Thanks for any help 

Horacio

-----Original Message-----
From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On Behalf
Of Buddy Bertram
Sent: Thursday, March 22, 2007 7:22 AM
To: dhcp-users at isc.org
Subject: Re: HOw to add suboptions for option 122 in dhcp server

Under your global options
 option voip122 code 122 = string;

under your subnet options
 option voip122 01:04:0a:00:00:02;

you may need an option 122 calculator to create the 122 value. 
this example one is equal to option 1 primary server = 10.0.0.2


Hope this helps.

Buddy




On Wed, 2007-03-21 at 18:33 -0400, Horacio Maiorino wrote:
> I am setting up a dhcp server using Fedora core 9  and I need to send sub
> options of option 122  . I've checked the net and manuals and cannot find
> any instructions to set sub options.
>  
> 
> Any help would be appreciated.
> 
>  
> 
> 
> 
> Thanks, horacio
> 
> 
> 
> 
> 
-- 
Dennis (Buddy) Bertram
Director of Technology
Ispalliance (DBA) Zcorum






More information about the dhcp-users mailing list