Hi all,
I’ve setup KEA (1.1.0, also tested 1.2.0) with DDNS but I’m experiencing a
weird behavior when the Linux boxes (CentOS 7.3) try to renew the lease.
When I start a new Linux box everything works well: IP is assigned, DNS entries
are populated, etc..
However, when the server tries to renew the lease the DNS entries are removed
even though the lease was successfully renewed.
Can anyone explain this behavior? What am I doing wrong? Thanks for your help!
Here is the kea log of a sample renewal:
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.packets/21] DHCP4_BUFFER_RECEIVED
received buffer from 10.93.208.4:68 to 10.93.211.251:67 over interface eth0
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.options/21] DHCP4_BUFFER_UNPACK
parsing buffer received from 10.93.208.4 to 10.93.211.251 over interface eth0
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.packets/21] DHCP4_PACKET_RECEIVED
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: DHCPREQUEST (type
3) received from 10.93.208.4 to 10.93.211.251 on interface eth0
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.packets/21] DHCP4_QUERY_DATA [hwtype=1
00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629, packet details:
local_address=10.93.211.251:67, remote_adress=10.93.208.4:68,
msg_type=DHCPREQUEST (3), transid=0x6dfc1629,
options:
type=012, len=015: "pre-10-93-208-4" (string)
type=053, len=001: 3 (uint8)
type=055, len=018: 1(uint8) 28(uint8) 2(uint8) 121(uint8) 15(uint8) 6(uint8)
12(uint8) 40(uint8) 41(uint8) 42(uint8) 26(uint8) 119(uint8) 3(uint8)
121(uint8) 249(uint8) 33(uint8) 252(uint8) 42(uint8)
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.dhcpsrv/21]
DHCPSRV_CFGMGR_SUBNET4_ADDR selected subnet 10.93.208.0/22 for packet received
by matching address 10.93.208.4
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.packets/21] DHCP4_SUBNET_SELECTED
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: the subnet with ID
1 was selected for client assignments
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.packets/21] DHCP4_SUBNET_DATA
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: the selected
subnet details: 10.93.208.0/22
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.hosts/21]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for
subnet id 1, identified by hwaddr=005056A814F8
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.hosts/21] HOSTS_CFG_GET_ALL_IDENTIFIER
get all hosts with reservations using identifier: hwaddr=005056A814F8
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.hosts/21]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=005056A814F8, found
0 host(s)
2017-09-26 15:49:59.326 DEBUG [kea-dhcp4.hosts/21]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1
and identifier hwaddr=005056A814F8
2017-09-26 15:49:59.328 DEBUG [kea-dhcp4.ddns/21] DHCP4_CLIENT_HOSTNAME_PROCESS
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: processing
client's Hostname option
2017-09-26 15:49:59.328 DEBUG [kea-dhcp4.ddns/21] DHCP4_CLIENT_HOSTNAME_DATA
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: client sent
Hostname option: pre-10-93-208-4
2017-09-26 15:49:59.328 DEBUG [kea-dhcp4.ddns/21] DHCP4_CLIENT_HOSTNAME_DATA
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: client sent
Hostname option: pre-10-93-208-4
2017-09-26 15:49:59.328 DEBUG [kea-dhcp4.ddns/21] DHCP4_RESPONSE_HOSTNAME_DATA
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: including Hostname
option in the server's response: .
2017-09-26 15:49:59.328 DEBUG [kea-dhcp4.dhcpsrv/21]
DHCPSRV_MYSQL_GET_SUBID_HWADDR obtaining IPv4 lease for subnet ID 1 and
hardware address hwtype=1 00:50:56:a8:14:f8
2017-09-26 15:49:59.329 DEBUG [kea-dhcp4.hosts/21]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet
id 1 and IPv4 address 10.93.208.4
2017-09-26 15:49:59.329 DEBUG [kea-dhcp4.hosts/21] HOSTS_CFG_GET_ALL_ADDRESS4
get all hosts with reservations for IPv4 address 10.93.208.4
2017-09-26 15:49:59.329 DEBUG [kea-dhcp4.hosts/21]
HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 10.93.208.4, found 0 host(s)
2017-09-26 15:49:59.329 DEBUG [kea-dhcp4.hosts/21]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 1 and
address 10.93.208.4
2017-09-26 15:49:59.329 DEBUG [kea-dhcp4.hosts/21]
HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_ADDRESS4 trying alternate source for host
using subnet id 1 and address 10.93.208.4
2017-09-26 15:49:59.330 DEBUG [kea-dhcp4.dhcpsrv/21] DHCPSRV_MYSQL_GET_ADDR4
obtaining IPv4 lease for address 10.93.208.4
2017-09-26 15:49:59.331 DEBUG [kea-dhcp4.alloc-engine/21]
ALLOC_ENGINE_V4_REQUEST_EXTEND_LEASE [hwtype=1 00:50:56:a8:14:f8], cid=[no
info], tid=0x6dfc1629: extending lifetime of the lease for address 10.93.208.4
2017-09-26 15:49:59.331 DEBUG [kea-dhcp4.dhcpsrv/21] DHCPSRV_QUEUE_NCR
[hwtype=1 00:50:56:a8:14:f8], cid=[no info]: name change request to remove DNS
entry queued: Type: 1 (CHG_REMOVE)
Forward Change: yes
Reverse Change: yes
FQDN: [pre-10-93-208-4.stagingdhcp.example.com.]
IP Address: [10.93.208.4]
DHCID: [000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51]
Lease Expires On: 20170926155234
Lease Length: 300
2017-09-26 15:49:59.331 DEBUG [kea-dhcp4.dhcpsrv/21] DHCPSRV_MYSQL_UPDATE_ADDR4
updating IPv4 lease for address 10.93.208.4
2017-09-26 15:49:59.332 DEBUG [kea-dhcp-ddns.dhcp-to-d2/19]
DHCP_DDNS_QUEUE_MGR_QUEUE_RECEIVE Request ID
000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51:
received and queued a request.
2017-09-26 15:49:59.332 DEBUG [kea-dhcp-ddns.d2-to-dns/19]
DHCP_DDNS_STARTING_TRANSACTION Request ID
000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51:
2017-09-26 15:49:59.332 DEBUG [kea-dhcp-ddns.d2-to-dns/19]
DHCP_DDNS_UPDATE_REQUEST_SENT Request ID
000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51: Forward
A/AAAA Remove to server: 10.93.211.12 port:53
2017-09-26 15:49:59.343 DEBUG [kea-dhcp-ddns.asiodns/19]
ASIODNS_FETCH_COMPLETED upstream fetch to 10.93.211.12(53) has now completed
2017-09-26 15:49:59.343 DEBUG [kea-dhcp-ddns.d2-to-dns/19]
DHCP_DDNS_UPDATE_RESPONSE_RECEIVED Request ID
000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51: to
server: 10.93.211.12 port:53 status: SUCCESS, rcode: NXRRSET
2017-09-26 15:49:59.343 DEBUG [kea-dhcp-ddns.d2-to-dns/19]
DHCP_DDNS_UPDATE_REQUEST_SENT Request ID
000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51: Forward
RR Remove to server: 10.93.211.12 port:53
2017-09-26 15:49:59.345 INFO [kea-dhcp4.leases/21] DHCP4_LEASE_ALLOC [hwtype=1
00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: lease 10.93.208.4 has been
allocated
2017-09-26 15:49:59.345 DEBUG [kea-dhcp4.ddns/21]
DHCP4_RESPONSE_HOSTNAME_GENERATE [hwtype=1 00:50:56:a8:14:f8], cid=[no info],
tid=0x6dfc1629: server has generated hostname
pre-10-93-208-4.stagingdhcp.example.com for the client
2017-09-26 15:49:59.345 DEBUG [kea-dhcp4.dhcpsrv/21] DHCPSRV_MYSQL_UPDATE_ADDR4
updating IPv4 lease for address 10.93.208.4
2017-09-26 15:49:59.354 DEBUG [kea-dhcp4.ddns/21] DHCP4_NCR_CREATE [hwtype=1
00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: DDNS updates enabled,
therefore sending name change requests
2017-09-26 15:49:59.355 DEBUG [kea-dhcp4.options/21] DHCP4_PACKET_PACK
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: preparing on-wire
format of the packet to be sent
2017-09-26 15:49:59.355 DEBUG [kea-dhcp4.packets/21] DHCP4_PACKET_SEND
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: trying to send
packet DHCPACK (type 5) from 10.93.211.251:67 to 10.93.208.4:68 on interface
eth0
2017-09-26 15:49:59.355 DEBUG [kea-dhcp4.packets/21] DHCP4_RESPONSE_DATA
[hwtype=1 00:50:56:a8:14:f8], cid=[no info], tid=0x6dfc1629: responding with
packet DHCPACK (type 5), packet details: local_address=10.93.211.251:67,
remote_adress=10.93.208.4:68, msg_type=DHCPACK (5), transid=0x6dfc1629,
options:
type=001, len=004: 4294966272 (uint32)
type=003, len=004: 10.93.211.254
type=006, len=008: 10.93.211.10 10.93.211.11
type=012, len=037: "pre-10-93-208-4.stagingdhcp.example.com" (string)
type=015, len=021: "stagingdhcp.example.com" (string)
type=042, len=016: 10.254.254.254 10.254.191.254 10.254.60.250 10.254.191.250
type=051, len=004: 300 (uint32)
type=053, len=001: 5 (uint8)
type=054, len=004: 10.93.211.251
2017-09-26 15:49:59.355 DEBUG [kea-dhcp4.packets/21] DHCP4_BUFFER_WAIT waiting
for next DHCPv4 packet with timeout 1000 ms
2017-09-26 15:49:59.355 DEBUG [kea-dhcp4.dhcpsrv/21] DHCPSRV_DHCP_DDNS_NCR_SENT
NameChangeRequest sent to kea-dhcp-ddns: Type: 1 (CHG_REMOVE)
Forward Change: yes
Reverse Change: yes
FQDN: [pre-10-93-208-4.stagingdhcp.example.com.]
IP Address: [10.93.208.4]
DHCID: [000001E57B9CB131CB185F0B841ECBBF97B23ED3915D2BA7E4FE5A8DC15A757E636A51]
Lease Expires On: 20170926155234
Lease Length: 300
Here is my config (the low lease time is for testing, and I also tested without
the MySQL backend):
{
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"eth0"
]
},
"lease-database": {
"type": "mysql",
"user": "kea",
"password": "password",
"host": "0.0.0.0",
"name": "keadb"
},
"hosts-database": {
"type": "mysql",
"user": "kea",
"password": "password",
"host": "0.0.0.0",
"name": "keadb"
},
"expired-leases-processing": {
"reclaim-timer-wait-time": 10,
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 360,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"unwarned-reclaim-cycles": 5
},
"dhcp-ddns": {
"enable-updates": true,
"qualifying-suffix": "stagingdhcp.example.com",
"replace-client-name": "when-not-present",
"generated-prefix": "pre"
},
"valid-lifetime": 300,
"subnet4": [
{
"subnet": "10.93.208.0/22",
"id": 351,
"pools": [
{
"pool": "10.93.208.1-10.93.208.253"
}
]
}
],
"option-data": [
{
"name": "domain-name",
"code": 15,
"space": "dhcp4",
"csv-format": true,
"data": "stagingdhcp.example.com"
},
{
"name": "domain-name-servers",
"code": 6,
"space": "dhcp4",
"csv-format": true,
"data": "10.93.211.10,10.93.211.11"
},
{
"name": "ntp-servers",
"code": 42,
"space": "dhcp4",
"csv-format": true,
"data":
"10.254.254.254,10.254.191.254,10.254.60.250,10.254.191.250"
},
{
"name": "routers",
"code": 3,
"space": "dhcp4",
"csv-format": true,
"data": "10.93.211.254"
}
]
},
"DhcpDdns": {
"ip-address": "127.0.0.1",
"port": 53001,
"dns-server-timeout": 500,
"tsig-keys": [
{
"name": "tsig-dhcpupdate",
"algorithm": "HMAC-SHA256",
"secret": "secret"
}
],
"forward-ddns": {
"ddns-domains": [
{
"name": "stagingdhcp.example.com.",
"key-name": "tsig-dhcpupdate",
"dns-servers": [
{
"ip-address": "10.93.211.12"
}
]
}
]
},
"reverse-ddns": {
"ddns-domains": [
{
"name": "93.10.in-addr.arpa.",
"key-name": "tsig-dhcpupdate",
"dns-servers": [
{
"ip-address": "10.93.211.12"
}
]
}
]
}
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "stdout"
}
],
"severity": "DEBUG",
"debuglevel": 9
},
{
"name": "kea-dhcp-ddns",
"output_options": [
{
"output": "stdout"
}
],
"severity": "DEBUG",
"debuglevel": 9
}
]
}
}
Thank you!
Kind regards,
Marcos David
Information in this email including any attachments may be privileged,
confidential and is intended exclusively for the addressee. The views expressed
may not be official policy, but the personal views of the originator. If you
have received it in error, please notify the sender by return e-mail and delete
it from your system. You should not reproduce, distribute, store, retransmit,
use or disclose its contents to anyone. Please note we reserve the right to
monitor all e-mail communication through our internal and external networks.
SKY and the SKY marks are trademarks of Sky plc and Sky International AG and
are used under licence.
Sky UK Limited (Registration No. 2906991), Sky-In-Home Service Limited
(Registration No. 2067075) and Sky Subscribers Services Limited (Registration
No. 2340150) are direct or indirect subsidiaries of Sky plc (Registration No.
2247735). All of the companies mentioned in this paragraph are incorporated in
England and Wales and share the same registered office at Grant Way, Isleworth,
Middlesex TW7 5QD.
_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users