[Kea-users] Multiple classes match

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

[Kea-users] Multiple classes match

Juan Settecase - Interlink S.R.L.

Hi kea-users list,

I'm working on kea 1.4 and I have a few questions.

It's possible to match multiple classes for same subnet?

Please, forget the syntax check  on this example

Suppose I have 3 clases, and 3 IPv4 subnets... for example,

....

  "subnet4": [

 "client-classes": [
            {
                "name": "A"
            },
            {
                "name": "B"
            },

            {
                "name": "C"
            },

            {
                "name": "AorB",
                "test": "member('A') or member('B')",
                "only-if-required": true
            }
        ],

            {
                "subnet": "10.42.0.0\/16",
                "pools": [
                    {
                        "pool": "10.42.0.10 - 10.42.0.100"
                    }
                "require-client-classes": [ "AorB" ], /////this subnet must be selected only for hosts that match within  A or B classes
                ],
            {
                "subnet": "10.43.0.0\/16",
                "pools": [
                    {
                        "pool": "10.43.0.10 - 10.43.0.100"
                    }

                "client-class": "B",                 ],// //this subnet must be selected only for hosts that match within  B class

            {
                "subnet": "10.44.0.0\/16",
                "pools": [
                    {
                        "pool": "10.44.0.10 - 10.44.0.100"
                    },

                "client-class": "C", // //this subnet must be selected only for hosts that match within  C class

                ],

....

Thanks in advanced!

--

Juan


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

Re: [Kea-users] Multiple classes match

Francis Dupont
> It's possible to match multiple classes for same subnet?

=> No. The initial design proposed black/white lists (as in ISC DHCP)
but it was never implemented and the unique class guard is far simpler.
You can build the class guard using the member'<class>' token in a boolean
expression: it does the same without possible ambiguity.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Multiple classes match

Juan Settecase - Interlink S.R.L.

Hi and Thanks Francis!

I had already tested "class guard" using member'<class>', but can't get it work as i want. I send to you my config example:

I have a host on class  "notice", but kea offer  IP from 10.42/16...and i don't want give that IP...i haven't a subnet for "notice" class

    "Dhcp4": {
     "client-classes": [
            {
                "name": "active"
            },
            {
                "name": "suspend"
            },
            {
                "name": "notice"
            },            {
                "name": "active-suspend",
                "test": "member('active') or member('suspend')",
                "only-if-required": true

            }
        ],
     "subnet4": [
            {
                "subnet": "10.42.0.0\/16",
                "pools": [
                    {
                        "pool": "10.42.0.10 - 10.42.0.100"
                    }
                ],
            "require-client-classes": ["active-suspend"],
            // "client-class": "active-suspend", //I added this line too in one of my  test....but the host  in "notice" class still having ip from 10.42...
.....


Is right? Can you help me?

Juan







El 21/1/19 a las 20:42, Francis Dupont escribió:
It's possible to match multiple classes for same subnet?
=> No. The initial design proposed black/white lists (as in ISC DHCP)
but it was never implemented and the unique class guard is far simpler.
You can build the class guard using the member'<class>' token in a boolean
expression: it does the same without possible ambiguity.

Regards

Francis Dupont [hidden email]


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