[Kea-users] kea-dhcp failover not working
Kraishak Mahtha
kraishak.edu at gmail.com
Tue Apr 18 16:26:38 UTC 2023
Hi,
I am trying to configure the kea-DHCP failover.
Initially, I ran two DHCP servers as two separate standalone and tested the
DHCP leases. It is working fine but when I add that to the failover type it
is not working. unable to get leases.
I tried checking the logs, netstat, and config of both dhcp4 and the
control agent, everything seems to be ok. I am not sure where the service
is getting stuck, I have attached the required config files and
"status-get" command output, can someone guide me on this
netstat output on primary
=====================
[root at dhcp1 ~]# netstat -tulpna | grep kea
tcp 0 0 192.168.0.125:8000 0.0.0.0:* LISTEN
27223/kea-ctrl-agen
tcp 0 0 192.168.0.125:8000 192.168.0.126:49792
ESTABLISHED 27223/kea-ctrl-agen
tcp 0 0 192.168.0.125:60346 192.168.0.169:8000
ESTABLISHED 27194/kea-dhcp4
udp 213248 0 192.168.0.125:67 0.0.0.0:*
27194/kea-dhcp4
[root at dhcp1 ~]# netstat -tulpna | grep 67
udp 213248 0 192.168.0.125:67 0.0.0.0:*
27194/kea-dhcp4
[root at dhcp1 ~]#
netstat output on failover
===================
[root at dhcp2 ~]# netstat -tulpna | grep 67
udp 141440 0 192.168.0.126:67 0.0.0.0:*
14380/kea-dhcp4
[root at dhcp2 ~]# netstat -tulpna | grep kea
tcp 0 0 192.168.0.126:8000 0.0.0.0:* LISTEN
14411/kea-ctrl-agen
tcp 0 0 192.168.0.126:49792 192.168.0.125:8000
ESTABLISHED 14380/kea-dhcp4
udp 141440 0 192.168.0.126:67 0.0.0.0:*
14380/kea-dhcp4
Sample packet capture of the Discover packet
---------------------------------------------------------------------------
TIME: 14:45:47.859127
IP: > (00:50:56:99:5c:f3) > (00:50:56:99:d3:32)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 25296629
SECS: 0
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 4.0.0.1
CHADDR: 55:5f:ff:00:00:01:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 61 ( 7) Client-identifier 01:55:5f:ff:00:00:01
OPTION: 12 ( 18) Host name dhcp-client-000001
---------------------------------------------------------------------------
TIME: 14:45:48.359827
IP: > (00:50:56:99:5c:f3) > (00:50:56:99:d3:32)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 25296629
SECS: 0
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 4.0.0.1
CHADDR: 55:5f:ff:00:00:01:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 61 ( 7) Client-identifier 01:55:5f:ff:00:00:01
OPTION: 12 ( 18) Host name dhcp-client-000001
---------------------------------------------------------------------------
TIME: 14:45:48.860530
IP: > (00:50:56:99:5c:f3) > (00:50:56:99:d3:32)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: 25296629
SECS: 0
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 4.0.0.1
CHADDR: 55:5f:ff:00:00:01:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 61 ( 7) Client-identifier 01:55:5f:ff:00:00:01
OPTION: 12 ( 18) Host name dhcp-client-000001
---------------------------------------------------------------------------
Thanks in Advance
Kraishak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230418/e139be13/attachment-0001.htm>
-------------- next part --------------
[root at dhcp1 ~]# echo '{"command":"status-get"}' | socat - UNIX:/usr/local/tmp/kea4-ctrl-socket1 | jq
{
"arguments": {
"high-availability": [
{
"ha-mode": "hot-standby",
"ha-servers": {
"local": {
"role": "primary",
"scopes": [],
"state": "waiting"
},
"remote": {
"age": 144,
"analyzed-packets": 0,
"communication-interrupted": true,
"connecting-clients": 0,
"in-touch": true,
"last-scopes": [],
"last-state": "unavailable",
"role": "standby",
"unacked-clients": 0,
"unacked-clients-left": 6
}
}
}
],
"multi-threading-enabled": false,
"pid": 26189,
"reload": 144,
"sockets": {
"status": "ready"
},
"uptime": 144
},
"result": 0
}
[root at dhcp1 ~]#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kea-ctrl-agent.conf.primary
Type: application/octet-stream
Size: 462 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230418/e139be13/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kea-dhcp4.conf.primary
Type: application/octet-stream
Size: 2414 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230418/e139be13/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kea-dhcp4.conf.failover
Type: application/octet-stream
Size: 2415 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230418/e139be13/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kea-ctrl-agent.conf.failover
Type: application/octet-stream
Size: 482 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20230418/e139be13/attachment-0007.obj>
-------------- next part --------------
[root at dhcp2 ~]# echo '{"command":"status-get"}' | socat - UNIX:/usr/local/tmp/kea4-ctrl-socket | jq
{
"arguments": {
"high-availability": [
{
"ha-mode": "hot-standby",
"ha-servers": {
"local": {
"role": "standby",
"scopes": [],
"state": "waiting"
},
"remote": {
"age": 912,
"analyzed-packets": 0,
"communication-interrupted": true,
"connecting-clients": 0,
"in-touch": true,
"last-scopes": [],
"last-state": "unavailable",
"role": "primary",
"unacked-clients": 0,
"unacked-clients-left": 1
}
}
}
],
"multi-threading-enabled": false,
"pid": 14380,
"reload": 912,
"sockets": {
"status": "ready"
},
"uptime": 912
},
"result": 0
}
[root at dhcp2 ~]#
-------------- next part --------------
2023-04-18 15:51:57.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_MEMFILE_GET_EXPIRED4 obtaining maximum 101 of expired IPv4 leases
2023-04-18 15:51:57.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_LEASES_RECLAMATION_COMPLETE reclaimed 0 leases in 0.023 ms
2023-04-18 15:51:57.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_NO_MORE_EXPIRED_LEASES all expired leases have been reclaimed
2023-04-18 15:51:57.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_START_TIMER starting timer: reclaim-expired-leases
2023-04-18 15:52:07.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: reclaim-expired-leases
2023-04-18 15:52:07.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_LEASES_RECLAMATION_START starting reclamation of expired leases (limit = 100 leases or 250 milliseconds)
2023-04-18 15:52:07.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_MEMFILE_GET_EXPIRED4 obtaining maximum 101 of expired IPv4 leases
2023-04-18 15:52:07.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_LEASES_RECLAMATION_COMPLETE reclaimed 0 leases in 0.021 ms
2023-04-18 15:52:07.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_NO_MORE_EXPIRED_LEASES all expired leases have been reclaimed
2023-04-18 15:52:07.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_START_TIMER starting timer: reclaim-expired-leases
2023-04-18 15:52:17.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: reclaim-expired-leases
2023-04-18 15:52:17.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_LEASES_RECLAMATION_START starting reclamation of expired leases (limit = 100 leases or 250 milliseconds)
2023-04-18 15:52:17.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_MEMFILE_GET_EXPIRED4 obtaining maximum 101 of expired IPv4 leases
2023-04-18 15:52:17.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_LEASES_RECLAMATION_COMPLETE reclaimed 0 leases in 0.015 ms
2023-04-18 15:52:17.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_NO_MORE_EXPIRED_LEASES all expired leases have been reclaimed
2023-04-18 15:52:17.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_START_TIMER starting timer: reclaim-expired-leases
2023-04-18 15:52:22.529 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: flush-reclaimed-leases
2023-04-18 15:52:22.529 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_RECLAIMED_LEASES_DELETE begin deletion of reclaimed leases expired more than 3600 seconds ago
2023-04-18 15:52:22.529 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_MEMFILE_DELETE_EXPIRED_RECLAIMED4 deleting reclaimed IPv4 leases that expired more than 3600 seconds ago
2023-04-18 15:52:22.529 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_RECLAIMED_LEASES_DELETE_COMPLETE successfully deleted 0 expired-reclaimed leases
2023-04-18 15:52:22.529 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_START_TIMER starting timer: flush-reclaimed-leases
2023-04-18 15:52:27.599 DEBUG [kea-dhcp4.dhcpsrv/14380.140632206207168] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: reclaim-expired-leases
2023-04-18 15:52:27.599 DEBUG [kea-dhcp4.alloc-engine/14380.140632206207168] ALLOC_ENGINE_V4_LEASES_RECLAMATION_START starting reclamation of expired leases (limit = 100 leases or 250 milliseconds)
-------------- next part --------------
2023-04-18 15:53:04.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_LEASES_RECLAMATION_START starting reclamation of expired leases (limit = 100 leases or 250 milliseconds)
2023-04-18 15:53:04.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_MEMFILE_GET_EXPIRED4 obtaining maximum 101 of expired IPv4 leases
2023-04-18 15:53:04.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_LEASES_RECLAMATION_COMPLETE reclaimed 0 leases in 0.013 ms
2023-04-18 15:53:04.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_NO_MORE_EXPIRED_LEASES all expired leases have been reclaimed
2023-04-18 15:53:04.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_START_TIMER starting timer: reclaim-expired-leases
2023-04-18 15:53:14.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: reclaim-expired-leases
2023-04-18 15:53:14.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_LEASES_RECLAMATION_START starting reclamation of expired leases (limit = 100 leases or 250 milliseconds)
2023-04-18 15:53:14.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_MEMFILE_GET_EXPIRED4 obtaining maximum 101 of expired IPv4 leases
2023-04-18 15:53:14.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_LEASES_RECLAMATION_COMPLETE reclaimed 0 leases in 0.014 ms
2023-04-18 15:53:14.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_NO_MORE_EXPIRED_LEASES all expired leases have been reclaimed
2023-04-18 15:53:14.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_START_TIMER starting timer: reclaim-expired-leases
2023-04-18 15:53:24.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: reclaim-expired-leases
2023-04-18 15:53:24.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_LEASES_RECLAMATION_START starting reclamation of expired leases (limit = 100 leases or 250 milliseconds)
2023-04-18 15:53:24.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_MEMFILE_GET_EXPIRED4 obtaining maximum 101 of expired IPv4 leases
2023-04-18 15:53:24.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_LEASES_RECLAMATION_COMPLETE reclaimed 0 leases in 0.013 ms
2023-04-18 15:53:24.310 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_NO_MORE_EXPIRED_LEASES all expired leases have been reclaimed
2023-04-18 15:53:24.310 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_START_TIMER starting timer: reclaim-expired-leases
2023-04-18 15:53:29.229 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION running operation for timer: flush-reclaimed-leases
2023-04-18 15:53:29.229 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_RECLAIMED_LEASES_DELETE begin deletion of reclaimed leases expired more than 3600 seconds ago
2023-04-18 15:53:29.229 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_MEMFILE_DELETE_EXPIRED_RECLAIMED4 deleting reclaimed IPv4 leases that expired more than 3600 seconds ago
2023-04-18 15:53:29.229 DEBUG [kea-dhcp4.alloc-engine/27194.140097071442112] ALLOC_ENGINE_V4_RECLAIMED_LEASES_DELETE_COMPLETE successfully deleted 0 expired-reclaimed leases
2023-04-18 15:53:29.229 DEBUG [kea-dhcp4.dhcpsrv/27194.140097071442112] DHCPSRV_TIMERMGR_START_TIMER starting timer: flush-reclaimed-leases
More information about the Kea-users
mailing list