[Kea-users] Subdividing a subnet based on class

Sutherland, Rob Robert.B.Sutherland at windstream.com
Wed Nov 22 14:26:37 UTC 2017


I am looking forward to these changes!

-----Original Message-----
From: Francis Dupont [mailto:fdupont at isc.org] 
Sent: Wednesday, November 22, 2017 3:59 AM
To: Sutherland, Rob
Cc: Francis Dupont; kea-users at lists.isc.org
Subject: Re: [Kea-users] Subdividing a subnet based on class

"Sutherland, Rob" writes:
> The reason why I'm looking to this has to do with ISC DHCPd behavior 
> (aside=
> : I'm sure that you are tired of hearing "But that's what DHCPd 
> does!"). Co= nsider this example of DHCP configuration from a production server:
> 
>    subnet 10.64.5.0 netmask 255.255.255.0
>    {
>       # This is the main IP address for the router
>       option routers 10.64.5.1;
>       # Start Site DHCP Options
>       option time-offset -18000;
>       option domain-name-servers 10.64.0.141;
>       option ntp-servers 10.64.0.118;
>       # End Site DHCP Options
>       pool
>       {
>          range 10.64.5.26 10.64.5.200;
>          allow members of "phones";
>       }
>       pool
>       {
>          range 10.64.5.202 10.64.5.242;
>          deny members of "phones";
>       }
>    }
> 
> The subnet (10.64.5.0/24) is subdivided (arbitrarily) into separate 
> pools. = Is there a way of getting comparable behaviour from Kea?

=> not yet: the code supporting client class in pools is under review so is not merged. BTW we should redesign client classes code so it will be more "not member(phone)" class than "deny" (it is a matter of taste but IMHO it is clearer and more powerful to be able to combine classes than to reproduce the ISC DHCP allow/deny).

Thanks

Francis Dupont <fdupont at isc.org>

PS: translation of the ISC DHCP config to Kea should give:

{
  /// This configuration declares some subnets but has no interfaces-config
  /// Reference Kea #5256
  "Dhcp4": {
    "subnet4": [
      {
        "subnet": "10.64.5.0/24",
        "option-data": [
          # This is the main IP address for the router
          {
            "space": "dhcp4",
            "name": "routers",
            "code": 3,
            "data": "10.64.5.1"
          },
          # Start Site DHCP Options
          {
            "space": "dhcp4",
            "name": "time-offset",
            "code": 2,
            "data": "-18000"
          },
          {
            "space": "dhcp4",
            "name": "domain-name-servers",
            "code": 6,
            "data": "10.64.0.141"
          },
          {
            "space": "dhcp4",
            "name": "ntp-servers",
            "code": 42,
            "data": "10.64.0.118"
          }
        ],
        "pools": [
          # End Site DHCP Options
          {
            "pool": "10.64.5.26 - 10.64.5.200"
            /// From:
            ///   allow phones
            "client-class": "phones"
          },
          {
            "pool": "10.64.5.202 - 10.64.5.242"
            /// From:
            ///   deny phones
            "client-class": "gen#_AND_#!phones#"
          }
        ]
      }
    ],
    "client-classes": [
      {
        "name": "gen#_AND_#!phones#",
        "test": "not member('phones')"
      }
    ]
  }
}



More information about the Kea-users mailing list