Problem with class definition

Reissom Beshir Reissom_Beshir at Mitel.com
Tue Sep 7 19:28:12 UTC 2010


Have you tried just removing the "deny unknown-clients;" statement?
The "allow members" will deny clients that do not match.

Regards,
Reissom Beshir


----- Original Message ----- 
From: კონსტანტინე ქაროსანიძე 
To: dhcp-users at lists.isc.org 
Sent: Tuesday, September 07, 2010 12:00 PM
Subject: Problem with class definition


Hello, 


I run dhcp for my clients (i'm sysadmin at ISP) and using option 82 to identify requests and assign corresponding ip to client but now i have case that I cant use option 82 (because of some network topology option 82 is not added to request)


Solution was to identify clients by source address from where request comes. (actually from ip assigned to that vlan on cisco switch, vlan gateway)


after lots of tries I figured out following config:


class "ADSL_Universal_34" {
    match if ( binary-to-ascii(16, 8, "", packet(24,4)) = "5e89bf1" );
    log(info, "matched class ADSL_Universal_34");
    log(info, concat("matched class gateway, IP: ",binary-to-ascii(16, 8, "", packet(24,4))));
    log(info, concat("matched class gateway, No Binary: ",packet(24,4)));
}


class "ADSL_Universal_35" {
    match if ( binary-to-ascii(16, 8, "", packet(24,4)) = "5e89bf41" );
    log(info, "matched class ADSL_Universal_35");
    log(info, concat("matched class gateway, IP: ",binary-to-ascii(16, 8, "", packet(24,4))));
    log(info, concat("matched class gateway, No Binary: ",packet(24,4)));
}


subnet 94.137.191.0 netmask 255.255.255.128
{


    pool {
        option subnet-mask 255.255.255.192;
        option routers 94.137.191.1;
        option ip-forwarding FALSE;
        deny unknown-clients;
        allow members of "ADSL_Universal_34";
        range 94.137.191.2 94.137.191.5;
    }


    pool {
        option subnet-mask 255.255.255.192;
        option routers 94.137.191.65;
        option ip-forwarding FALSE;
        deny unknown-clients;
        allow members of "ADSL_Universal_35";
        range 94.137.191.66 94.137.191.70;
    }
}


where 5e89bf41 and 5e89bf1 are gateway ip addresses in hex. While using this config strange thing happens.


when i use


        deny unknown-clients;
        allow members of "ADSL_Universal_35";


this directives for matching class to pool nothing works but it's enought for me to remove this lines from config and in log file I see that incomming requests are matched to class.


Sep  7 18:36:04 dhcp dhcpd: matched class ADSL_Universal_35
Sep  7 18:36:04 dhcp dhcpd: DHCPINFORM from 94.137.191.2 via 94.137.191.65
Sep  7 18:36:04 dhcp dhcpd: DHCPACK to 94.137.191.2 (d8:d3:85:21:3f:f3) via em0


but if i uncomment above two lines I have nothing logged and no ip addresses assigned. 


I know that it is not good solution and is just a workaround of problem but I need to make it working.


Any ideas how to fix?

Best Regards,
Konstantine Karosanidze,

CAUCASUS ONLINE ISP
System Administrator




--------------------------------------------------------------------------------


_______________________________________________
dhcp-users mailing list
dhcp-users at 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/20100907/3525d7cf/attachment.html>


More information about the dhcp-users mailing list