[Kea-users] Multiple Subnets - 1 NIC

Maxime Lareo max.lareo at gmail.com
Tue Aug 16 07:01:51 UTC 2016


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.

Any help is welcome.

Thank you,

Max


On 16/08/2016 00:07, Klaus Steden wrote:
>
> Hi Maxime,
>
> Have you defined the subnet as one that's owned by Kea in the config 
> file? Assuming you have different routers, netmasks, etc., you would 
> have to define a separate scope for both networks.
>
> Presumably you've got DHCP forwarding enabled on your switches as well 
> so that DHCP requests get relayed through to your Kea server, which is 
> the only way you can have any DHCP server provide leases for a network 
> it is not directly connected to.
>
> If it's useful, here's a sample from my config that serves three 
> different subnets via a single NIC on a different network:
>
> -- cut --
>   "subnet4": [
>     {
>         "subnet": "10.129.129.0/29 <http://10.129.129.0/29>",
>         "id": 1,
>         "pools": [{ "pool": "10.129.129.2 - 10.129.129.6" }],
>         "option-data": [{ "name": "routers", "data": "10.129.129.1" }]
>     },
>     {
>         "subnet": "10.129.129.8/29 <http://10.129.129.8/29>",
>         "id": 2,
>         "pools": [{ "pool": "10.129.129.10 - 10.129.129.14" }],
>         "option-data": [{ "name": "routers", "data": "10.129.129.9" }]
>     },
>     {
>         "subnet": "10.0.194.0/28 <http://10.0.194.0/28>",
>         "id": 3,
>         "pools": [{ "pool": "10.0.194.2 - 10.0.194.14" }],
>         "option-data": [{ "name": "routers", "data": "10.0.194.1" }]
>     }
>   ]
> -- cut --
>
> cheers,
> Klaus
>
>
>
> On Mon, Aug 15, 2016 at 5:08 AM, Maxime Lareo <max.lareo at gmail.com 
> <mailto:max.lareo at gmail.com>> wrote:
>
>     Hi,
>
>     I currently testing KEA with 2 servers for HA with a Mariadb
>     Galera Cluster Backend and it works pretty well.
>
>     It running like a charm with one subnet, but when it come managing
>     multiple subnet, with only 1 NIC, it seems impossible to make it
>     work. KEA just doesn't want to give an IP address that doesn't
>     belong to its own subnet.
>
>     I don't succeed to use ip relay or client classification properly
>     to make it work.
>
>     Do I missing something ?
>
>     I just want to have VoIP devices on another subnet than the
>     original subnet. All the devices (VoIP or not) are on the same
>     VLAN and switch.
>
>     To explain my actual configuration :
>
>     I have a client classes testing the option 60 and it work, I can
>     see in the log file, the expression evaluated to 1, but KEA
>     doesn't choose the subnet with the client-class but the one who
>     match its subnet (the one my server ip address belong to), which
>     is after the VoIP subnet in the conf file.
>
>     Someone know a way to make it works ?
>
>     Thank you !
>     _______________________________________________
>     Kea-users mailing list
>     Kea-users at lists.isc.org <mailto:Kea-users at lists.isc.org>
>     https://lists.isc.org/mailman/listinfo/kea-users
>     <https://lists.isc.org/mailman/listinfo/kea-users>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20160816/d8e210d3/attachment.htm>


More information about the Kea-users mailing list