Class is working but spawn is not.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Class is working but spawn is not.

Leandro
Hi , guys ...
Trying to give an special treatment to a group of clients according to vendor id option (now im using circuit-id, then will change).
I would like to classify them so first I declared a class using the class statement as follows:

on dhcpd.conf.

class "premium" {
match if option agent.circuit-id = "em3";
}


subnet 192.168.88.128 netmask 255.255.255.128 {
    pool{
    failover peer "failover-partner";
    range 192.168.88.130 192.168.88.249;
    deny members of "premium";
    }
    pool{
    allow members of "premium";
    failover peer "failover-partner";
    range 192.168.88.250 192.168.88.254;
    }

option broadcast-address 192.168.88.255;
option subnet-mask 255.255.255.128;
option routers 192.168.88.129;
}


But ... When i Try with spawn:


class "premium" {
spawn with option agent.circuit-id;
}

      subnet 192.168.88.128 netmask 255.255.255.128 {

                        pool{
                        failover peer "failover-partner";
                        range 192.168.88.130 192.168.88.249;
                        deny members of "premium" "em3"; #### Semicolon expected here.
                        }
                        pool{
                        allow members of "premium" "em3";
                        failover peer "failover-partner";
                        range 192.168.88.250 192.168.88.254;
                        }

                option broadcast-address 192.168.88.255;
                option subnet-mask 255.255.255.128;
                option routers 192.168.88.129;
                }

Then , Daemon refuses to start with "Semicolon expected".
Any ideas?
Thanks
Leandro.





_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Class is working but spawn is not.

Simon Hobson
Leandro <[hidden email]> wrote:

>                         deny members of "premium" "em3"; #### Semicolon expected here.

>                         allow members of "premium" "em3";

The syntax is wrong, you do it with multiple allow or deny statements :


deny members of "premium" ;
deny members of "em3";

allow members of "premium" ;
allow members of "em3";

But don't mix allow and deny in one pool, it doesn't work as most people expect !



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users