[Kea-users] [EXTERNAL] Re: Need to have DHCP Relay in order for Kea to work...?

Ubence Quevedo thatrat at gmail.com
Sun Aug 4 03:06:52 UTC 2024


I added the "host-reservation-identifiers": [ "hw-address" ], just before
the subnet declarations like I saw in the Kea documentation and I'm still
getting a non-reserved IP address.

I then did some digging into the lease file and logs and here's what I'm
seeing:
The /var/lib/kea-leases4.csv before the change and after. The only changes
are the subnet_id [from 2 [correct] to 1 [incorrect]] and the hostname:
address,hwaddr,client_id,valid_lifetime,expire,subnet_id,fqdn_fwd,fqdn_rev,hostname,state,user_context,pool_id
192.168.11.118,c8:2a:14:45:53:24,01:c8:2a:14:45:53:24,28800,1722765662,2,1,1,
mac-ubuntu-laptop-wired.totusmel.com,0,,0
192.168.10.227,c8:2a:14:45:53:24,01:c8:2a:14:45:53:24,28800,1722765662,1,1,1,
ubuntu-system.totusmel.com,0,,0

The relevant lines from 04-dhcp_servers.11.json reservation file:
{
  "hostname": "mac-ubuntu-laptop-wired",
  "hw-address": "c8:2a:14:45:53:24",
  "ip-address": "192.168.11.118"
},

Around 19:01 is when the config changed, around 19:06 is when it went back,
I then switched back and forth a few times, but the same MAC address is
referenced for every entry:
dhcp4-packets.log
2024-08-03 19:01:02.461 INFO  [kea-dhcp4.packets/2455551.139122383521472]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xc485128a: DHCPREQUEST (type 3) received
from 0.0.0.0 to 255.255.255.255 on interface eno2.11
2024-08-03 19:01:02.461 INFO  [kea-dhcp4.packets/2455551.139122394007232]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xc485128a: DHCPREQUEST (type 3) received
from 0.0.0.0 to 255.255.255.255 on interface eno2
2024-08-03 19:01:02.462 INFO  [kea-dhcp4.packets/2455551.139122383521472]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xc485128a: trying to send packet DHCPACK (type 5) from 192.168.11.3:67
to 192.168.11.118:68 on interface eno2.11
2024-08-03 19:01:02.462 INFO  [kea-dhcp4.packets/2455551.139122373035712]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xc485128a: trying to send packet DHCPNAK (type 6) from 192.168.10.3:67
to 255.255.255.255:68 on interface eno2
2024-08-03 19:01:02.480 INFO  [kea-dhcp4.packets/2455551.139122362549952]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xae543e60: DHCPDISCOVER (type 1) received
from 0.0.0.0 to 255.255.255.255 on interface eno2
2024-08-03 19:01:02.480 INFO  [kea-dhcp4.packets/2455551.139122394007232]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xae543e60: DHCPDISCOVER (type 1) received
from 0.0.0.0 to 255.255.255.255 on interface eno2.11
2024-08-03 19:01:02.481 INFO  [kea-dhcp4.packets/2455551.139122362549952]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: trying to send packet DHCPOFFER (type 2) from
192.168.10.3:67 to 192.168.10.227:68 on interface eno2
2024-08-03 19:01:02.481 INFO  [kea-dhcp4.packets/2455551.139122383521472]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: trying to send packet DHCPOFFER (type 2) from
192.168.11.3:67 to 192.168.11.118:68 on interface eno2.11
2024-08-03 19:01:02.500 INFO  [kea-dhcp4.packets/2455551.139122394007232]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xae543e60: DHCPREQUEST (type 3) received
from 0.0.0.0 to 255.255.255.255 on interface eno2.11
2024-08-03 19:01:02.500 INFO  [kea-dhcp4.packets/2455551.139122373035712]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xae543e60: DHCPREQUEST (type 3) received
from 0.0.0.0 to 255.255.255.255 on interface eno2
2024-08-03 19:01:02.501 INFO  [kea-dhcp4.packets/2455551.139122373035712]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: trying to send packet DHCPACK (type 5) from 192.168.10.3:67
to 192.168.10.227:68 on interface eno2
2024-08-03 19:06:07.620 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xca2112d4: DHCPREQUEST (type 3) received
from 192.168.11.1 to 192.168.11.3 on interface eno2.11
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.packets/2456561.131659156424384]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xca2112d4: DHCPREQUEST (type 3) received
from 192.168.10.1 to 192.168.10.3 on interface eno2
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.packets/2456561.131659177395904]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xca2112d4: DHCPREQUEST (type 3) received
from 192.168.12.1 to 192.168.12.3 on interface eno2.12
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xca2112d4: trying to send packet DHCPNAK (type 6) from 192.168.11.3:67
to 192.168.11.1:67 on interface eno2.11
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.packets/2456561.131659156424384]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xca2112d4: trying to send packet DHCPNAK (type 6) from 192.168.10.3:67
to 192.168.11.1:67 on interface eno2
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.packets/2456561.131659166910144]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xca2112d4: trying to send packet DHCPNAK (type 6) from 192.168.12.3:67
to 192.168.11.1:67 on interface eno2.12
2024-08-03 19:06:07.661 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xa44870bc: DHCPDISCOVER (type 1) received
from 192.168.12.1 to 192.168.12.3 on interface eno2.12
2024-08-03 19:06:07.661 INFO  [kea-dhcp4.packets/2456561.131659177395904]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xa44870bc: DHCPDISCOVER (type 1) received
from 192.168.10.1 to 192.168.10.3 on interface eno2
2024-08-03 19:06:07.661 INFO  [kea-dhcp4.packets/2456561.131659156424384]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0xa44870bc: DHCPDISCOVER (type 1) received
from 192.168.11.1 to 192.168.11.3 on interface eno2.11
2024-08-03 19:06:07.662 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xa44870bc: trying to send packet DHCPOFFER (type 2) from
192.168.12.3:67 to 192.168.11.1:67 on interface eno2.12
2024-08-03 19:06:07.662 INFO  [kea-dhcp4.packets/2456561.131659166910144]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xa44870bc: trying to send packet DHCPOFFER (type 2) from
192.168.11.3:67 to 192.168.11.1:67 on interface eno2.11
2024-08-03 19:06:10.621 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0x893a4ca9: DHCPDISCOVER (type 1) received
from 192.168.11.1 to 192.168.11.3 on interface eno2.11
2024-08-03 19:06:10.621 INFO  [kea-dhcp4.packets/2456561.131659156424384]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0x893a4ca9: DHCPDISCOVER (type 1) received
from 192.168.12.1 to 192.168.12.3 on interface eno2.12
2024-08-03 19:06:10.621 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: trying to send packet DHCPOFFER (type 2) from
192.168.11.3:67 to 192.168.11.1:67 on interface eno2.11
2024-08-03 19:06:10.622 INFO  [kea-dhcp4.packets/2456561.131659177395904]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0x893a4ca9: DHCPDISCOVER (type 1) received
from 192.168.10.1 to 192.168.10.3 on interface eno2
2024-08-03 19:06:10.622 INFO  [kea-dhcp4.packets/2456561.131659166910144]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: trying to send packet DHCPOFFER (type 2) from
192.168.12.3:67 to 192.168.11.1:67 on interface eno2.12
2024-08-03 19:06:10.622 INFO  [kea-dhcp4.packets/2456561.131659156424384]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: trying to send packet DHCPOFFER (type 2) from
192.168.10.3:67 to 192.168.11.1:67 on interface eno2
2024-08-03 19:06:10.661 INFO  [kea-dhcp4.packets/2456561.131659166910144]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0x893a4ca9: DHCPREQUEST (type 3) received
from 192.168.12.1 to 192.168.12.3 on interface eno2.12
2024-08-03 19:06:10.661 INFO  [kea-dhcp4.packets/2456561.131659187881664]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0x893a4ca9: DHCPREQUEST (type 3) received
from 192.168.11.1 to 192.168.11.3 on interface eno2.11
2024-08-03 19:06:10.661 INFO  [kea-dhcp4.packets/2456561.131659177395904]
DHCP4_PACKET_RECEIVED [hwtype=1 c8:2a:14:45:53:24],
cid=[01:c8:2a:14:45:53:24], tid=0x893a4ca9: DHCPREQUEST (type 3) received
from 192.168.10.1 to 192.168.10.3 on interface eno2
2024-08-03 19:06:10.662 INFO  [kea-dhcp4.packets/2456561.131659166910144]
DHCP4_PACKET_SEND [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: trying to send packet DHCPACK (type 5) from 192.168.12.3:67
to 192.168.11.1:67 on interface eno2.12

dhcp4-leases.log
2024-08-03 19:01:02.481 DEBUG [kea-dhcp4.leases/2455551.139122383521472]
DHCP4_DISCOVER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: server is processing DHCPDISCOVER with hint=192.168.11.118
2024-08-03 19:01:02.481 INFO  [kea-dhcp4.leases/2455551.139122383521472]
DHCP4_LEASE_OFFER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: lease 192.168.11.118 will be offered
2024-08-03 19:01:02.500 DEBUG [kea-dhcp4.leases/2455551.139122394007232]
DHCP4_REQUEST [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: server is processing DHCPREQUEST with hint=192.168.10.227
2024-08-03 19:01:02.500 DEBUG [kea-dhcp4.leases/2455551.139122373035712]
DHCP4_REQUEST [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: server is processing DHCPREQUEST with hint=192.168.10.227
2024-08-03 19:01:02.500 INFO  [kea-dhcp4.leases/2455551.139122373035712]
DHCP4_LEASE_ALLOC [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xae543e60: lease 192.168.10.227 has been allocated for 28800 seconds
2024-08-03 19:06:07.620 INFO  [kea-dhcp4.leases/2456561.131659187881664]
DHCP4_INIT_REBOOT [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xca2112d4: client is in INIT-REBOOT state and requests address
192.168.10.227
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.leases/2456561.131659156424384]
DHCP4_INIT_REBOOT [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xca2112d4: client is in INIT-REBOOT state and requests address
192.168.10.227
2024-08-03 19:06:07.621 INFO  [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_INIT_REBOOT [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xca2112d4: client is in INIT-REBOOT state and requests address
192.168.10.227
2024-08-03 19:06:07.661 DEBUG [kea-dhcp4.leases/2456561.131659187881664]
DHCP4_DISCOVER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xa44870bc: server is processing DHCPDISCOVER with hint=192.168.10.227
2024-08-03 19:06:07.662 INFO  [kea-dhcp4.leases/2456561.131659187881664]
DHCP4_LEASE_OFFER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xa44870bc: lease 192.168.11.118 will be offered
2024-08-03 19:06:07.662 DEBUG [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_DISCOVER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xa44870bc: server is processing DHCPDISCOVER with hint=192.168.10.227
2024-08-03 19:06:07.662 INFO  [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_LEASE_OFFER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0xa44870bc: lease 192.168.11.118 will be offered
2024-08-03 19:06:10.621 DEBUG [kea-dhcp4.leases/2456561.131659187881664]
DHCP4_DISCOVER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: server is processing DHCPDISCOVER with hint=192.168.10.227
2024-08-03 19:06:10.621 INFO  [kea-dhcp4.leases/2456561.131659187881664]
DHCP4_LEASE_OFFER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: lease 192.168.11.118 will be offered
2024-08-03 19:06:10.622 DEBUG [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_DISCOVER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: server is processing DHCPDISCOVER with hint=192.168.10.227
2024-08-03 19:06:10.622 INFO  [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_LEASE_OFFER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: lease 192.168.11.118 will be offered
2024-08-03 19:06:10.622 DEBUG [kea-dhcp4.leases/2456561.131659156424384]
DHCP4_DISCOVER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: server is processing DHCPDISCOVER with hint=192.168.10.227
2024-08-03 19:06:10.622 INFO  [kea-dhcp4.leases/2456561.131659156424384]
DHCP4_LEASE_OFFER [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: lease 192.168.11.118 will be offered
2024-08-03 19:06:10.661 DEBUG [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_REQUEST [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: server is processing DHCPREQUEST with hint=192.168.11.118
2024-08-03 19:06:10.661 INFO  [kea-dhcp4.leases/2456561.131659166910144]
DHCP4_LEASE_ALLOC [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: lease 192.168.11.118 has been allocated for 28800 seconds
2024-08-03 19:06:10.662 DEBUG [kea-dhcp4.leases/2456561.131659156424384]
DHCP4_REQUEST [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: server is processing DHCPREQUEST with hint=192.168.11.118
2024-08-03 19:06:10.662 INFO  [kea-dhcp4.leases/2456561.131659156424384]
DHCP4_LEASE_ALLOC [hwtype=1 c8:2a:14:45:53:24], cid=[01:c8:2a:14:45:53:24],
tid=0x893a4ca9: lease 192.168.11.118 has been allocated for 28800 seconds

Both the WiFi and ethernet MAC are returning when I arping the system I've
been testing with?
root at cube:/var/lib/kea# arping -c 6 mac-ubuntu-laptop-wired.totusmel.com
ARPING 192.168.11.118
60 bytes from c8:2a:14:45:53:24 (192.168.11.118): index=0 time=373.545 usec
56 bytes from e4:ce:8f:28:9e:24 (192.168.11.118): index=1 time=40.527 msec
60 bytes from c8:2a:14:45:53:24 (192.168.11.118): index=2 time=303.398 usec
56 bytes from e4:ce:8f:28:9e:24 (192.168.11.118): index=3 time=268.226 msec
60 bytes from c8:2a:14:45:53:24 (192.168.11.118): index=4 time=966.349 usec
60 bytes from c8:2a:14:45:53:24 (192.168.11.118): index=5 time=509.973 usec
56 bytes from e4:ce:8f:28:9e:24 (192.168.11.118): index=6 time=130.663 msec
60 bytes from c8:2a:14:45:53:24 (192.168.11.118): index=7 time=241.655 usec
56 bytes from e4:ce:8f:28:9e:24 (192.168.11.118): index=8 time=50.869 msec
60 bytes from c8:2a:14:45:53:24 (192.168.11.118): index=9 time=532.040 usec
56 bytes from e4:ce:8f:28:9e:24 (192.168.11.118): index=10 time=278.733 msec

--- 192.168.11.118 statistics ---
6 packets transmitted, 11 packets received,   0% unanswered (5 extra)
rtt min/avg/max/std-dev = 0.242/70.177/278.733/103.031 ms

arping another system but only getting one MAC address back:
root at cube:/etc/kea# arping -c 6 ubence-mini-wired.totusmel.com
ARPING 192.168.11.45
60 bytes from 4c:20:b8:ab:1b:eb (192.168.11.45): index=0 time=365.985 usec
60 bytes from 4c:20:b8:ab:1b:eb (192.168.11.45): index=1 time=422.983 usec
60 bytes from 4c:20:b8:ab:1b:eb (192.168.11.45): index=2 time=369.058 usec
60 bytes from 4c:20:b8:ab:1b:eb (192.168.11.45): index=3 time=416.778 usec
60 bytes from 4c:20:b8:ab:1b:eb (192.168.11.45): index=4 time=428.881 usec
60 bytes from 4c:20:b8:ab:1b:eb (192.168.11.45): index=5 time=310.630 usec

--- 192.168.11.45 statistics ---
6 packets transmitted, 6 packets received,   0% unanswered (0 extra)
rtt min/avg/max/std-dev = 0.311/0.386/0.429/0.042 ms

I can't seem to arping by MAC address reliably and I'm not sure why.

Any other suggestions?

-Ubence

On Sat, Aug 3, 2024 at 6:55 PM Sonic <sonicsmith at gmail.com> wrote:

> Looks like you don't really need that, although if the hw-address is
> the only thing you use to identify reservations then it's best to have
> it and eliminate all other checks.
> Are you double checking the logs to verify that the mac addresses of
> the devices getting pool addresses match the hw-addresses in your
> reservation statements?
> Are you sure the reserved addresses in question are not in use (will
> not answer an arping)?
> --
> 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/20240803/95523af4/attachment-0001.htm>


More information about the Kea-users mailing list