[Kea-users] issue with lease renewing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] issue with lease renewing

sven.roehrig
Hi,

I have a problem while renewing a lease. When the client sends a DISCOVER a
subnet is selected and the client is getting an IP. After reboot KEA-DHCP is
extending the lifetime as expected (first log).
When the client is sending a DHCP-RENEW-REQUEST the subnet is selected but
no valid lease is found. I donĀ“t know why and do not see the problem (second
log). The config for the shared network is also attached.

What are the requirements for the lease check?

We are using our own hook to check host reservations based on option 82
(sub-option 2) if there is no match with hwaddr. With this we can set
privileged or unprivileged class used for subnet selection. Could this
interfere with lease renewing?

2018-12-11 14:40:56.820 DEBUG [kea-dhcp4.packets/1810] DHCP4_PACKET_RECEIVED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516: DHCPREQUEST
(type 3) received from 10.139.88.1 to 185.78.252.53 on interface ens18
2018-12-11 14:40:56.820 DEBUG [kea-dhcp4.packets/1810] DHCP4_QUERY_DATA
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516, packet details:
local_address=185.78.252.53:67, remote_address=10.139.88.1:67,
msg_type=DHCPREQUEST (3), transid=0xd3670516,
options:
  type=012, len=010: "infoscreen" (string)
  type=050, len=004: 207.89.93.10 (ipv4-address)
  type=053, len=001: 3 (uint8)
  type=055, len=016: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8) 6(uint8)
119(uint8) 12(uint8) 44(uint8) 47(uint8) 26(uint8) 121(uint8) 42(uint8)
249(uint8) 33(uint8) 252(uint8)
  type=082, len=055:,
options:
    type=001, len=004: 00:09:03:e9
    type=002, len=006: 78:23:ae:93:05:69
    type=004, len=004: 00:00:80:00
    type=009, len=033:
00:00:11:8b:06:01:04:01:02:03:01:00:00:00:09:11:01:0f:4c:50:5a:2d:54:41:47:2
d:43:42:52:2d:30:30:31
2018-12-11 14:40:56.820 DEBUG [kea-dhcp4.callouts/1810] HOOKS_CALLOUTS_BEGIN
begin all callouts for hook pkt4_receive
2018-12-11 14:40:56.821 DEBUG [kea-dhcp4.hook-sethostname/1810]
SetHostnameHook: pkt4_receive: Option82: 7823ae930569
'cm-7823ae930569.mta.voip-cc.net' Hostname aus Datenbank
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.callouts/1810] HOOKS_CALLOUT_CALLED
hooks library with index 2 has called a callout on hook pkt4_receive that
has address 0x7fba858f453d (callout duration: 1.390 ms)
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.callouts/1810]
HOOKS_CALLOUTS_COMPLETE completed callouts for hook pkt4_receive (total
callouts duration: 1.390 ms)
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.packets/1810] DHCP4_SUBNET_SELECTED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516: the subnet with
ID 7 was selected for client assignments
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.packets/1810] DHCP4_SUBNET_DATA
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516: the selected
subnet details: 10.39.88.0/24
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier: hwaddr=B827EBC09878
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=B827EBC09878,
found 0 host(s)
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier: circuit-id=000903E9
2018-12-11 14:40:56.822 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier circuit-id=000903E9,
found 0 host(s)
2018-12-11 14:40:56.825 DEBUG [kea-dhcp4.dhcp4/1810] DHCP4_CLASS_ASSIGNED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516: client packet
has been assigned to the following class(es): UNKNOWN
2018-12-11 14:40:56.825 DEBUG [kea-dhcp4.dhcp4/1810] DHCP4_CLASS_ASSIGNED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516: client packet
has been assigned to the following class(es): ALL, CLASS-CPE, PRIVILEGED,
UNKNOWN
2018-12-11 14:40:56.825 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_CLIENT_HOSTNAME_PROCESS [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xd3670516: processing client's Hostname option
2018-12-11 14:40:56.825 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xd3670516: client sent Hostname option: cm-7823ae930569.mta.voip-cc.net
2018-12-11 14:40:56.825 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xd3670516: client sent Hostname option: cm-7823ae930569.mta.voip-cc.net
2018-12-11 14:40:56.825 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_RESPONSE_HOSTNAME_DATA [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xd3670516: including Hostname option in the server's response:
cm-7823ae930569.mta.voip-cc.net
2018-12-11 14:40:56.826 INFO  [kea-dhcp4.leases/1810] DHCP4_INIT_REBOOT
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xd3670516: client is in
INIT-REBOOT state and requests address 207.89.93.10
2018-12-11 14:40:56.826 DEBUG [kea-dhcp4.dhcpsrv/1810]
DHCPSRV_MYSQL_GET_HWADDR obtaining IPv4 leases for hardware address hwtype=1
b8:27:eb:c0:98:78
2018-12-11 14:40:56.826 DEBUG [kea-dhcp4.dhcpsrv/1810]
DHCPSRV_MYSQL_GET_HWADDR obtaining IPv4 leases for hardware address hwtype=1
b8:27:eb:c0:98:78
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for
subnet id 8 and IPv4 address 207.89.93.10
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address
207.89.93.10
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 207.89.93.10, found 0 host(s)
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 8
and address 207.89.93.10
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4 trying alternate sources for
host using subnet id 8 and address 207.89.93.10
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.dhcpsrv/1810]
DHCPSRV_MYSQL_GET_ADDR4 obtaining IPv4 lease for address 207.89.93.10
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.alloc-engine/1810]
ALLOC_ENGINE_V4_REQUEST_EXTEND_LEASE [hwtype=1 b8:27:eb:c0:98:78], cid=[no
info], tid=0xd3670516: extending lifetime of the lease for address
207.89.93.10
2018-12-11 14:40:56.827 DEBUG [kea-dhcp4.alloc-engine/1810]
ALLOC_ENGINE_V4_LEASE_RECLAIM [hwtype=1 b8:27:eb:c0:98:78], cid=[no info]:
reclaiming expired lease for address 207.89.93.10




2018-12-11 14:39:02.141 DEBUG [kea-dhcp4.packets/1810] DHCP4_PACKET_RECEIVED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: DHCPREQUEST
(type 3) received from 207.89.93.10 to 185.78.252.53 on interface ens18
2018-12-11 14:39:02.141 DEBUG [kea-dhcp4.packets/1810] DHCP4_QUERY_DATA
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a, packet details:
local_address=185.78.252.53:67, remote_address=207.89.93.10:68,
msg_type=DHCPREQUEST (3), transid=0xc1596b2a,
options:
  type=012, len=010: "infoscreen" (string)
  type=053, len=001: 3 (uint8)
  type=055, len=016: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8) 6(uint8)
119(uint8) 12(uint8) 44(uint8) 47(uint8) 26(uint8) 121(uint8) 42(uint8)
249(uint8) 33(uint8) 252(uint8)
2018-12-11 14:39:02.141 DEBUG [kea-dhcp4.callouts/1810] HOOKS_CALLOUTS_BEGIN
begin all callouts for hook pkt4_receive
2018-12-11 14:39:02.141 DEBUG [kea-dhcp4.hook-sethostname/1810]
SetHostnameHook: pkt4_receive: Option82 kann nicht ausgelesen werden Kein
Hostname gefunden fuer b827ebc09878
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.callouts/1810] HOOKS_CALLOUT_CALLED
hooks library with index 2 has called a callout on hook pkt4_receive that
has address 0x7fba858f453d (callout duration: 0.798 ms)
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.callouts/1810]
HOOKS_CALLOUTS_COMPLETE completed callouts for hook pkt4_receive (total
callouts duration: 0.798 ms)
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.dhcpsrv/1810]
DHCPSRV_CFGMGR_SUBNET4_ADDR selected subnet 207.89.93.0/25 for packet
received by matching address 207.89.93.10
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.packets/1810] DHCP4_SUBNET_SELECTED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: the subnet with
ID 8 was selected for client assignments
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.packets/1810] DHCP4_SUBNET_DATA
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: the selected
subnet details: 207.89.93.0/25
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier: hwaddr=B827EBC09878
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=B827EBC09878,
found 0 host(s)
2018-12-11 14:39:02.142 DEBUG [kea-dhcp4.dhcp4/1810] DHCP4_CLASS_ASSIGNED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: client packet
has been assigned to the following class(es): UNKNOWN
2018-12-11 14:39:02.143 DEBUG [kea-dhcp4.dhcp4/1810] DHCP4_CLASS_ASSIGNED
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: client packet
has been assigned to the following class(es): ALL, CLASS-CPE, UNPRIVILEGED,
UNKNOWN
2018-12-11 14:39:02.143 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_CLIENT_HOSTNAME_PROCESS [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xc1596b2a: processing client's Hostname option
2018-12-11 14:39:02.143 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xc1596b2a: client sent Hostname option: b827ebc09878
2018-12-11 14:39:02.143 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xc1596b2a: client sent Hostname option: b827ebc09878
2018-12-11 14:39:02.143 DEBUG [kea-dhcp4.ddns/1810]
DHCP4_RESPONSE_HOSTNAME_DATA [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xc1596b2a: including Hostname option in the server's response:
b827ebc09878.mta.voip-cc.net
2018-12-11 14:39:02.143 DEBUG [kea-dhcp4.dhcpsrv/1810]
DHCPSRV_MYSQL_GET_HWADDR obtaining IPv4 leases for hardware address hwtype=1
b8:27:eb:c0:98:78
2018-12-11 14:39:02.144 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for
subnet id 8 and IPv4 address 207.89.93.10
2018-12-11 14:39:02.144 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address
207.89.93.10
2018-12-11 14:39:02.144 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 207.89.93.10, found 0 host(s)
2018-12-11 14:39:02.144 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 8
and address 207.89.93.10
2018-12-11 14:39:02.144 DEBUG [kea-dhcp4.hosts/1810]
HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4 trying alternate sources for
host using subnet id 8 and address 207.89.93.10
2018-12-11 14:39:02.144 DEBUG [kea-dhcp4.dhcpsrv/1810]
DHCPSRV_MYSQL_GET_ADDR4 obtaining IPv4 lease for address 207.89.93.10
2018-12-11 14:39:02.145 DEBUG [kea-dhcp4.alloc-engine/1810]
ALLOC_ENGINE_V4_REQUEST_OUT_OF_POOL client [hwtype=1 b8:27:eb:c0:98:78],
cid=[no info], tid=0xc1596b2a, which doesn't have a reservation, requested
address 207.89.93.10 out of the dynamic pool
2018-12-11 14:39:02.145 DEBUG [kea-dhcp4.bad-packets/1810]
DHCP4_PACKET_NAK_0004 [hwtype=1 b8:27:eb:c0:98:78], cid=[no info],
tid=0xc1596b2a: failed to grant a lease, client sent ciaddr 207.89.93.10,
requested-ip-address (no address)
2018-12-11 14:39:02.145 DEBUG [kea-dhcp4.callouts/1810] HOOKS_CALLOUTS_BEGIN
begin all callouts for hook pkt4_send
2018-12-11 14:39:02.145 DEBUG [kea-dhcp4.callouts/1810] HOOKS_CALLOUT_CALLED
hooks library with index 2 has called a callout on hook pkt4_send that has
address 0x7fba858fed40 (callout duration: 0.101 ms)
2018-12-11 14:39:02.145 DEBUG [kea-dhcp4.callouts/1810]
HOOKS_CALLOUTS_COMPLETE completed callouts for hook pkt4_send (total
callouts duration: 0.101 ms)
2018-12-11 14:39:02.146 DEBUG [kea-dhcp4.options/1810] DHCP4_PACKET_PACK
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: preparing
on-wire format of the packet to be sent
2018-12-11 14:39:02.146 DEBUG [kea-dhcp4.packets/1810] DHCP4_PACKET_SEND
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: trying to send
packet DHCPNAK (type 6) from 185.78.252.53:67 to 207.89.93.10:68 on
interface ens18
2018-12-11 14:39:02.146 DEBUG [kea-dhcp4.packets/1810] DHCP4_RESPONSE_DATA
[hwtype=1 b8:27:eb:c0:98:78], cid=[no info], tid=0xc1596b2a: responding with
packet DHCPNAK (type 6), packet details: local_address=185.78.252.53:67,
remote_address=207.89.93.10:68, msg_type=DHCPNAK (6), transid=0xc1596b2a,
options:


{
                                                "client-class": "CLASS-CPE",
                                                "match-client-id": true,
                                                "next-server":
"185.78.252.53",
                                                "relay": {
                                                        "ip-addresses": [
 
"207.89.93.1",
 
"10.139.88.1",
                                                                "10.39.88.1"
                                                        ]
                                                },
                                                "option-data": [{
 
"always-send": false,
                                                                "code": 3,
 
"csv-format": true,
                                                                "data":
"207.89.93.1",
                                                                "name":
"routers",
                                                                "space":
"dhcp4"
                                                        }, {
 
"always-send": false,
                                                                "code": 6,
 
"csv-format": true,
                                                                "data":
"5.61.190.118,5.61.190.6",
                                                                "name":
"domain-name-servers",
                                                                "space":
"dhcp4"
                                                        }

                                                ],
                                                "pools": [{
                                                                "pool":
"207.89.93.10-207.89.93.20",
 
"client-class": "PRIVILEGED"
                                                        }
                                                ],
                                                "subnet": "207.89.93.0/25",
                                                "valid-lifetime": 180 ,{
                                                "client-class": "CLASS-CPE",
                                                "match-client-id": true,
                                                "next-server":
"185.78.252.53",
                                                "relay": {
                                                        "ip-addresses": [
 
"172.16.16.129",
 
"10.38.88.1",
 
"10.139.88.1"
                                                        ]
                                                },
                                                "option-data": [{
 
"always-send": false,
                                                                "code": 3,
 
"csv-format": true,
                                                                "data":
"172.16.16.129",
                                                                "name":
"routers",
                                                                "space":
"dhcp4"
                                                        }, {
 
"always-send": false,
                                                                "code": 6,
 
"csv-format": true,
                                                                "data":
"5.61.190.118,5.61.190.6",
                                                                "name":
"domain-name-servers",
                                                                "space":
"dhcp4"
                                                        }

                                                ],
                                                "pools": [{
                                                                "pool":
"172.16.16.130-172.16.16.140",
 
"client-class": "UNPRIVILEGED"
                                                        }
                                                ],


Best regards,

Sven

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