[Kea-users] Subnet/pool selection

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

[Kea-users] Subnet/pool selection

Juan Settecase - Interlink S.R.L.

Hi kea-users list,

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

Suppose I have 3 IPv4 subnets for example,

....

       "subnet4": [
            {
                "subnet": "10.42.0.0\/16",
                "pools": [
                    {
                        "pool": "10.42.0.10 - 10.42.0.100"
                    }
                ],
            {
                "subnet": "10.43.0.0\/16",
                "pools": [
                    {
                        "pool": "10.43.0.10 - 10.43.0.100"
                    }
                ],

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

....

So now suppose I have 150 dhcp clients.... how it work kea's "subnet/pool selection"? which subnet or pool is going to selected first and which is going to be exausted first? there is  a "priority"/"order" option i didn't found yet?

Please, forget the syntax check  on this example

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] Subnet/pool selection

Francis Dupont
In a shared network the subnet selection in fact select the shared network.

When a host is looked up all the subnets of the shared network are scanned
starting from the selected one if there are less subnets than allowed
identifier types.

Pools are a bit different: they are scanned starting by the last used so
the selected subnet matters only once.

There is the code a comment explaining this mechanism:

 // Need to check if the subnet belongs to a shared network. If so,
 // we might be able to find a better subnet for lease allocation,
 // for which it is more likely that there are some leases available.
 // If we stick to the selected subnet, we may end up walking over
 // the entire subnet (or more subnets) to discover that the pools
 // have been exhausted. Using a subnet from which a lease was
 // assigned most recently is an optimization which increases
 // the likelyhood of starting from the subnet which pools are not
 // exhausted.
                                   
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] Subnet/pool selection

Juan Settecase - Interlink S.R.L.

Hi Francis,

I understand ...
 - The "best way" for multiple subnets and apply balance between them is to use shared-networks with their subnets and their pools.
 - There "no priority" parameter to select subnet "B" from a shared-network before subnet "A". The "priority" to select or pickup a subnet inside a shared-network is which subnet was defined first in config file.  So if I defined subnet "B" before subnet  "A", kea is going to offer IP from subnet "B" first and when it hasn't more leases is going to offer IPs from subnet "A"

This is correct?

Thanks.
Juan







El 21/1/19 a las 20:57, Francis Dupont escribió:
In a shared network the subnet selection in fact select the shared network.

When a host is looked up all the subnets of the shared network are scanned
starting from the selected one if there are less subnets than allowed
identifier types.

Pools are a bit different: they are scanned starting by the last used so
the selected subnet matters only once.

There is the code a comment explaining this mechanism:

 // Need to check if the subnet belongs to a shared network. If so,
 // we might be able to find a better subnet for lease allocation,
 // for which it is more likely that there are some leases available.
 // If we stick to the selected subnet, we may end up walking over
 // the entire subnet (or more subnets) to discover that the pools
 // have been exhausted. Using a subnet from which a lease was
 // assigned most recently is an optimization which increases
 // the likelyhood of starting from the subnet which pools are not
 // exhausted.
				    
Regards

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