Allow statement in pool

Lars Jacobsen lj at sydfynsel.dk
Wed Feb 28 15:15:37 UTC 2007


Hi

Having a bit of trouble matching the right syntax.
I want to assign a client to a specific scope (IP-TV) if two parameters
is true:

1 - is member of class "ch1"
2 - is member of class "stb"

So both has to be true, not just one of them.


So I need something like: 

allow members of "ch1" AND allow members of "stb";

in my pool declaration, but that syntax wont work.

Any ideas ?


Btw allow/deny syntax in #ch1 works as expectet.


Thanks 
/Lars






Snip from my dhcp.conf:


class "1130022" {
         match if  substring ( (option agent.circuit-id) , 0,7)=
"1130022";
lease limit 1; 
}       

class "stb" {
            match substring(hardware, 1, 3);
                    }
        subclass "db-stb" 00:02:9B;      #   Kreatel


class "ch1" {
         match if  substring ( (option agent.circuit-id) , 0,4)= "1130"
AND (substring ( (option agent.circuit-id) , 4,2)= "01" OR
substring ( (option agent.circuit-id) , 4,2)= "02" OR
substring ( (option agent.circuit-id) , 4,2)= "03" OR
substring ( (option agent.circuit-id) , 4,2)= "04" OR
substring ( (option agent.circuit-id) , 4,2)= "05" OR
substring ( (option agent.circuit-id) , 4,2)= "06" OR
substring ( (option agent.circuit-id) , 4,2)= "07" OR
substring ( (option agent.circuit-id) , 4,2)= "08" OR
substring ( (option agent.circuit-id) , 4,2)= "09" OR
substring ( (option agent.circuit-id) , 4,2)= "10" OR
substring ( (option agent.circuit-id) , 4,2)= "11" OR
substring ( (option agent.circuit-id) , 4,2)= "12" OR
substring ( (option agent.circuit-id) , 4,2)= "13" OR
substring ( (option agent.circuit-id) , 4,2)= "14" OR
substring ( (option agent.circuit-id) , 4,2)= "15" OR
substring ( (option agent.circuit-id) , 4,2)= "16");
spawn with option agent.circuit-id;
lease limit 1;     
}

# ch1
	subnet 85.27.128.224 netmask 255.255.255.224 {
		option routers 85.27.128.225;
		option subnet-mask 255.255.255.224;
                pool {
			allow members of "1130022";
			range 85.27.128.226 85.27.128.226;
			}
		pool {
			deny members of "stb";
			deny members of "1130022";
			allow members of "ch1";
			range 85.27.128.227 85.27.128.254;
			}
		}	

# IP-TV
	subnet 10.228.0.0 netmask 255.252.0.0 {
		option subnet-mask 255.255.255.240;
		option routers 10.228.0.1;
		pool {
			range 10.228.0.11 10.228.0.30;
			allow members of "ch1"; 
                                 allow members of "stb";
			}
		}



More information about the dhcp-users mailing list