Jump to content
Калькуляторы

ISC-DHCPD Class Subclass

Hi all!

Что-то не могу понять как работать с subclass в ISC-DHCPD, вот такая фишка работает:

 

class "172.16.1.66" {

match pick-first-value(

concat( binary-to-ascii(10, 8, ".", packet(24, 4)), ":",

binary-to-ascii(10, 8, "", substring(option agent.circuit-id, 5, 1))) );

}

 

subclass "172.16.1.66" "172.16.1.66:1";

subclass "172.16.1.66" "172.16.1.66:2";

subclass "172.16.1.66" "172.16.1.66:3";

subclass "172.16.1.66" "172.16.1.66:4";

 

shared-network "clients" {

option domain-name-servers 172.16.0.1;

subnet 172.16.0.0 netmask 255.255.0.0 { }

 

subnet 10.255.4.0 netmask 255.255.255.0 {

ping-check off;

option routers 10.255.4.1;

option subnet-mask 255.255.255.0;

option classless-static-routes 0c:ac:10:0a:ff:04:01:08:0a:0a:ff:04:01;

 

pool {

range 10.255.4.3 10.255.4.254;

allow members of "172.16.1.66";

deny members of "ANY";

}

}

}

 

 

 

А хочется что-то вроде:

class "172.16.1.66" {

match binary-to-ascii(10, 8, ".", packet(24, 4)) = "172.16.1.66" and

pick-first-value(binary-to-ascii(10, 8, "", substring(option agent.circuit-id, 5, 1)) );

}

 

subclass "172.16.1.66" "1";

subclass "172.16.1.66" "2";

subclass "172.16.1.66" "3";

 

т.е. одно из сравнений запихать в основной класс.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this