[Kea-users] Multiple Subnets - 1 NIC

Tomek Mrugalski tomasz at isc.org
Tue Aug 16 14:51:41 UTC 2016


W dniu 16.08.2016 o 09:01, Maxime Lareo pisze:
> Hi Klaus,
> 
> Thank you for your quick answer,
> 
> What do you mean by 'the subnet as one that's owned by Kea', the one the
> NIC belong to ?
> 
> I have different scope for my subnets, here is a part of my config :
> 
> --->8---
> 
> "client-classes": [{ "name": "VoIP", "test":
> "substring(option[60].hex,0,6) == 'Aastra"}],
> 
>  "subnet4": [
>   {
>    "id": 1,
>     "client-class": "VoIP",
>     "pools": [{"pool": "192.168.4.10 - 192.168.4.50"}],
>     "subnet": "192.168.4.0/24"
>   },
>   {
>   "id": 2,
>    "pools": [{"pool": "192.168.10.160 - 192.168.10.180"}],
>    "subnet": "192.168.10.0/24"
>   }
> ]
> 
> ---8<----
> 
> The IP adress of my server is 192.168.10.100/24  and I tried to use an
> interface alias to add the IP address 192.168.4.100/24 to my server. I'm
> sure that the Ip phones belong to the class VoIP, I see it in the kea
> log file, but it still doesn't working...
> 
> All devices are connected on the same switch, and belong to the same VLAN.
> 
> I also tried to use reservations to see if the subnet selection will be
> affected by reservations but this is not the case, KEA find the
> reservation but don't use it because it is not inside the subnet it
> belong to.
> 
> So I tried to use larger mask, like '/20' for the first subnet and use
> the option 1 'subnet-mask', to make the KEA server part of this subnet,
> but it seems not working because devices using the /20 and not the /24
> specified into the subnet-mask option. 
> 
> I'm running out of ideas.
client-class match is necessary, but not sufficient condition for Kea to
select a given subnet. I don't know how your network is organized, but
here are couple things you can try. If both are on the same link that
Kea uses, you can add "interface": "eth0" to each subnet to tell Kea
that those subnets are available locally. Replace eth0 with whatever
interface you're receiving this traffic on.

Try this:

 "subnet4": [
  {
    "id": 1,
    "client-class": "VoIP",
    "interface": "eth0",
    "pools": [{"pool": "192.168.4.10 - 192.168.4.50"}],
      "subnet": "192.168.4.0/24"
 },
 {
   "id": 2,
   "interface": "eth0",
   "pools": [{"pool": "192.168.10.160 - 192.168.10.180"}],
      "subnet": "192.168.10.0/24"
 }
]

On a related note, I think we failed to document the "interface"
parameter properly. For the time being, you may want to read Section
8.2.14 "IPv6 Subnet Selection" and apply that logic to IPv4. If that
works, could you create a ticket on kea.isc.org regarding the v4
documentation needing update?

Finally, a general comment. Kea does not yet support shared networks in
the sense ISC DHCPD does. You need some way to classify the incoming
packet. Fortunately, you have that problem solved by using VoIP class.
But for other people who would like to have two subnets on the same
link, allocate addresses from the first one and then seamlessly start
allocating from the other subnet - nope, that's not gonna work. At least
not yet.

Hope that helps,
Tomek




More information about the Kea-users mailing list