Easiest way to split users into separate classes?

Jon Chesnut Jon.Chesnut at skilouise.com
Tue Feb 22 16:19:34 UTC 2011


On our public access subnet, I'm hoping to use DHCP to assign 50% of users (approx.) to one access controller, and 50% to another.  If usage continues to grow, I'll need to split it up further so that usage is split between 3 access controllers.

So far, the only way I've managed to get this to work is to to match the last byte of the hardware (even bytes to class A and odd bytes to class B).  While this works, it's taking 260 lines of config, which is neither elegant nor efficient.  Can anyone think of an easier way to accomplish this?  How the 50% split is accomplished doesn't really matter.

Thanks!


class "public_wireless_a" {match suffix(hardware,1); }
        subclass "public_wireless_a"    00;
        subclass "public_wireless_a"    02;
<...>

class "public_wireless_b" {match suffix(hardware,1); }
        subclass "public_wireless_b"    01;
        subclass "public_wireless_b"    03;
<...>

# 172.26.16.0 PUBLIC WIRELESS

subnet 172.26.16.0 netmask 255.255.248.0 {

        pool {
                allow members of "public_wireless_a";
                deny members of "public_wireless_b";
                range 172.26.18.1 172.26.20.255;
                option routers 172.26.16.2;
                option domain-name-servers 172.26.3.10, 208.67.222.222, 208.67.220.220;
                ddns-updates off;
        }

        pool {
                allow members of "public_wireless_b";
                deny members of "public_wireless_a";
                range 172.26.21.1 172.26.23.254;
                option routers 172.26.16.1;
                option domain-name-servers 172.26.3.10, 208.67.222.222, 208.67.220.220;
                ddns-updates off;
        }
}


More information about the dhcp-users mailing list