SV: classes and subclasses parameters question

Lars Jacobsen lars-jacobsen at newmail.dk
Mon Mar 20 19:50:58 UTC 2006


Hi Erick
Not to disappoint you, but I don't think you will find much help inhere. 
I tried the last 3 weeks to get help, sample conf, or links on this specific
subj. (subclasses and spawning classes).
Only solution so far was to browse the lists for the subj. and hope you find
the right things.
The man pages does in fact answer a lot of the questions about the options
etc. itself, but not on how to use the match syntax/evaluation in different
ways. Seems that all folks are using simple hardware addresses/MAC in all
their matches and thus don’t need to do an option evaluation on something
else.

Hope this "hiccup" will cause somebody to bring light on the subject ;-)

My problem is that I need to write an evaluation that could be written like
this: 
Match if part of "identifier" is equal to "xyz" and another part of
"identifier" is between 1 and 16 then "class" = "class one"
Should be possible to use subclasses or spawning classes on this one, but
how ?

/Lars




-----Oprindelig meddelelse-----
Fra: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] På vegne
af Erick Perez
Sendt: 20. marts 2006 17:44
Til: dhcp-users at isc.org
Emne: classes and subclasses parameters question

Hi, I have been playing with classes and subclasses and would like to
know where can I read about the parameters being used:

Example:
class "TEMPORARY" {
         match pick-first-value (option dhcp-client-identifier, hardware);}

I know that i can read about "match" and "pick first value"  doing a
man dhcp-eval, but where can i read about the "option",
"dhcp-client-identifier" and the syntaxis and all the other parameters
that I can query/match/parse?


Currently my dhcpd.conf is like this:

# Red Interna
ddns-update-style ad-hoc;
# RedInterna
# min y default lease es 72 horas x 3600 segundos
# max son 5 dias
ddns-updates off;
min-lease-time 432000;
default-lease-time 432000;
max-lease-time 432000;


        class "CONTABILIDAD" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

       class "COBROS_RECOBROS" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

        class "TRAMITE_PRESTAMO_MERCADEO" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

        class "COMPUTO" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

        class "ACCESO_TOTAL" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

        class "TEMPORALES" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

subclass "CONTABILIDAD"         00:00:e8:55:a2:22;
subclass "CONTABILIDAD"         00:40:33:a3:27:6f;
subclass "CONTABILIDAD"         00:10:dc:20:f7:3b;
subclass "CONTABILIDAD"         00:80:ad:c9:dd:cf;
subclass "CONTABILIDAD"         00:0b:6a:72:60:5e;
subclass "CONTABILIDAD"         00:10:dc:20:f1:2f;
subclass "CONTABILIDAD"         00:80:ad:70:48:1f;
subclass "CONTABILIDAD"         00:0b:6a:e6:bd:a3;
subclass "CONTABILIDAD"         00:0a:e6:71:d9:8c;
subclass "CONTABILIDAD"         00:50:bf:16:53:19;
subclass "CONTABILIDAD"         00:0b:6a:44:ce:5b;

subclass "COBROS_RECOBROS"      00:80:ad:01:d2:99;
subclass "COBROS_RECOBROS"      00:0c:6e:26:57:2a;
subclass "COBROS_RECOBROS"      00:0c:6e:26:56:62;
subclass "COBROS_RECOBROS"      00:d0:09:e2:83:fa;
subclass "COBROS_RECOBROS"      00:0a:e6:5a:9c:df;
subclass "COBROS_RECOBROS"      00:08:54:00:0e:c0;
subclass "COBROS_RECOBROS"      00:0b:6a:99:0a:d9;
subclass "COBROS_RECOBROS"      00:13:8f:71:40:93;
subclass "COBROS_RECOBROS"      00:50:8b:ea:ef:51;
subclass "COBROS_RECOBROS"      00:0c:6e:62:a9:58;
subclass "COBROS_RECOBROS"      00:0a:e6:5a:9f:b5;

subclass "TRAMITE_PRESTAMO_MERCADEO"    00:80:ad:70:9b:31;
subclass "TRAMITE_PRESTAMO_MERCADEO"    00:80:ad:75:cc:70;
subclass "TRAMITE_PRESTAMO_MERCADEO"    00:07:95:37:2c:bf;
subclass "TRAMITE_PRESTAMO_MERCADEO"    00:50:da:4e:73:20;
subclass "TRAMITE_PRESTAMO_MERCADEO"    00:0a:e6:71:e3:96;
subclass "TRAMITE_PRESTAMO_MERCADEO"    00:0c:6e:24:b3:73;
subclass "TRAMITE_PRESTAMO_MERCADEO"    00:0c:76:b6:52:6d;

       subnet 192.168.1.0 netmask 255.255.255.0 {
         pool {
           allow members of "CONTABILIDAD";
           range 192.168.1.50 192.168.1.70;
         }
         pool {
           allow members of "COBROS_RECOBROS";
           range 192.168.1.71 192.168.1.91;
         }
         pool {
           allow members of "TRAMITE_PRESTAMO_MERCADEO";
           range 192.168.1.92 192.168.1.112;
         }
         pool {
           allow members of "COMPUTO";
           range 192.168.1.113 192.168.1.133;
         }
         pool {
           allow members of "ACCESO_TOTAL";
           range 192.168.1.134 192.168.1.154;
         }
         pool {
           allow members of "TEMPORALES";
           range 192.168.1.155 192.168.1.175;
         }

       }


Thanks,

--

-------------------------------------------
Erick Perez
Linux User 376588
http://counter.li.org/  (Get counted!!!)
Panama, Republic of Panama




More information about the dhcp-users mailing list