[Kea-users] Dropping the packets in load balancing
Kraishak Mahtha
kraishak.edu at gmail.com
Wed May 10 12:07:49 UTC 2023
Hi Peter,
ok, I tried this way stopping the kea-dhcp service on failover and see if
that will make a difference, and see if the client get able to get the ACK,
I have three doubts,
1)I stopped kea-DHCP on failover and it crossed the max-response-delay time
i.e 60000, and also it crosses the max-unacked-clients values too but
still, the failover state is showing as communication-recovery not sure
when it will change to partner-down state.
HA code snippet:
==============
"hooks-libraries": [
{
"library": "/usr/local/kea/hooks/libdhcp_ha.so",
"parameters": {"high-availability": [{
"mode": "load-balancing",
"heartbeat-delay": 10000,
"trust-anchor": "",
"multi-threading": {
"http-dedicated-listener": true,
"enable-multi-threading": true,
"http-client-threads": 4,
"http-listener-threads": 4
},
"max-response-delay": 60000,
"cert-file": "",
"this-server-name": "dhcp1",
"max-ack-delay": 10000,
"peers": [
{
"role": "primary",
"name": "dhcp1",
"auto-failover": true,
"url": "http://192.168.0.125:8001"
},
{
"role": "secondary",
"name": "dhcp2",
"auto-failover": true,
"url": "http://192.168.0.126:8001"
}
],
"key-file": "",
"max-unacked-clients": 13
}]}
},
status get output:
=================
[root at dhcp1 ~]# echo '{"command":"status-get"}' | socat -
UNIX:/var/kea4-ctrl-socket | jq
{
"arguments": {
"high-availability": [
{
"ha-mode": "load-balancing",
"ha-servers": {
"local": {
"role": "primary",
"scopes": [
"dhcp1"
],
"state": "communication-recovery"
},
"remote": {
"age": 4141,
"analyzed-packets": 93,
"communication-interrupted": true,
"connecting-clients": 19,
"in-touch": true,
"last-scopes": [
"dhcp2"
],
"last-state": "unavailable",
"role": "secondary",
"unacked-clients": 1,
"unacked-clients-left": 13
}
}
}
],
"multi-threading-enabled": true,
"packet-queue-size": 7,
"packet-queue-statistics": [
1,
0.954504,
0.23734
],
"pid": 14491,
"reload": 4284,
"sockets": {
"status": "ready"
},
"thread-pool-size": 4,
"uptime": 4284
},
"result": 0
}
2)Based on the hash value the kea-dhcp will decide which server to grant
leases but now even after kea-dhcp is down on failover the primary is not
able to give a lease, it completed the max-ack-delay duration too but still
it is dropping the packet
last,
3)Can we manually set the failover state to partner-down and is it
recommended?
Thanks
Kraishak
On Wed, May 10, 2023 at 1:05 PM Peter Davies <peterd at isc.org> wrote:
> Hi Kraishak,
> This behaviour is expected when HA is configured in "load-balancing"
> mode.
>
> Under normal operations, the two Kea servers divide the clients between
> them.
>
> The server decides which clients they need to respond to based on a hash
> of the
> client identifier; this is often the client's Mac address. The split is
> 50/50.
>
> Kind Regards Peter
>
> ------------------------------
> *From: *"Kraishak Mahtha" <kraishak.edu at gmail.com>
> *To: *"Kea-users at lists.isc.org" <kea-users at lists.isc.org>
> *Sent: *Wednesday, 10 May, 2023 08:45:08
> *Subject: *[Kea-users] Dropping the packets in load balancing
>
> Hi all,
> I have configured the kea-HA in load-balancing mode, and I am testing the
> flow by hitting the discover packets only to the primary server using my
> lease test tool but I see a few of the packets get dropped or have not been
> seen.
>
> When I see the log I see as:
> HA_BUFFER4_RECEIVE_NOT_FOR_US [hwtype=1 82:ff:ff:00:00:01],
> cid=[01:82:ff:ff:00:00:01], tid=0x29652559: dropping query to be processed
> by another server
>
> I have a few doubts about this
> 1)I have only 10 active leases in the given scope range and we still have
> so many free leases then why does the server drop the query and hand it
> over to its peer?
> 2)Do we need to add any parameters in the config file to make the kea-DHCP
> primary to forcefully check its all free available IPs?
>
> Thanks in advance
> Kraishak
>
>
> Attached are my kea-dhcp configs of primary and failover
>
> --
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230510/dcaab960/attachment.htm>
More information about the Kea-users
mailing list