[Kea-users] DHCPv6: Advertised and Assigned addresses are different

laaubert laurent_aubert at yahoo.fr
Wed Jul 15 10:01:08 UTC 2020


Hi Kea community,

I’m currently using Kea 1.6.2  with an application acting as a DHCPv6 relay
on behalf of the DHCPv6 clients.

I noticed that during each assignment cycle, the advertised address is not
the same one as the actual assigned address. I don’t see any specific error
in Kea debugs you can find below but Kea will assign a new address once it
received the DHCP REQUEST packet. So my guess is there is something in the
REQUEST that triggers it but I can’t figure out what exactly:


2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.packets/1] DHCP6_QUERY_DATA
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609, packet details: localAddr=[fd10::7f15]:0
remoteAddr=[fd10::7f0a]:547
msgtype=1(SOLICIT), transid=0x868609
type=00001, len=00039:
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
type=00003(IA_NA), len=00040: iaid=0, t1=4294967295, t2=4294967295,
options:
  type=00005(IAADDR), len=00024: address=::, preferred-lft=4294967295,
valid-lft=4294967295
type=00008, len=00002: 0 (uint16)
type=00015, len=00008: 00:06:43:47:2d:4e:4d:53
1 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=fd10:2::1, peer-address=fd10::7f0a, 0 option(s)
 
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.dhcpsrv/1] DHCPSRV_CFGMGR_SUBNET6
retrieved subnet fd10:2::/112 for address hint fd10:2::1
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.packets/1] DHCP6_SUBNET_SELECTED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: the subnet with ID 2 was selected for client assignments
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.packets/1] DHCP6_SUBNET_DATA
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: the selected subnet details: fd10:2::/112
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation
for subnet id 2, identified by
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier:
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047,
found 0 host(s)
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 2
and identifier
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.dhcp6/1] DHCP6_CLASS_ASSIGNED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: client packet has been assigned to the following class(es):
UNKNOWN
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.leases/1]
DHCP6_PROCESS_IA_NA_REQUEST
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: server is processing IA_NA option with iaid=0 and hint=::
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_IAID_DUID obtaining IPv6 leases for IAID 0 and DUID
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
and lease type IA_NA
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.alloc-engine/1]
ALLOC_ENGINE_V6_ALLOC_UNRESERVED no static reservations available - trying
to dynamically allocate leases for client
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for
subnet id 2 and including IPv6 address fd10:2::1
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get all hosts with reservations for
subnet id 2 and IPv6 address fd10:2::1
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6_COUNT using subnet id 2 and address
fd10:2::1, found 0 host(s)
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL host not found using subnet id 2
and address fd10:2::1
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_ADDR6 obtaining IPv6 lease for address fd10:2::1 and
lease type IA_NA
2020-07-15 08:32:45.784 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_ADDR6 obtaining IPv6 lease for address fd10:2::1 and
lease type IA_NA
2020-07-15 08:32:45.785 INFO  [kea-dhcp6.leases/1] DHCP6_LEASE_ADVERT
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: lease for address fd10:2::1 and iaid=0 will be advertised
2020-07-15 08:32:45.785 DEBUG [kea-dhcp6.leases/1] DHCP6_LEASE_DATA
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: detailed lease information for iaid=0: Type:          IA_NA(0)
Address:       fd10:2::1
Prefix length: 128
IAID:          0
Pref life:     4294967295
Valid life:    4294967295
Cltt:          1594801965
DUID:         
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
Hardware addr: (none)
Subnet ID:     2
State:         default
 
2020-07-15 08:32:45.785 DEBUG [kea-dhcp6.dhcp6/1] DHCP6_CLASS_ASSIGNED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: client packet has been assigned to the following class(es):
ALL, UNKNOWN
2020-07-15 08:32:45.785 DEBUG [kea-dhcp6.packets/1] DHCP6_PACKET_SEND
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0x868609: trying to send packet ADVERTISE (type 2) from [fd10::7f15]:547
to [fd10::7f0a]:547 on interface eth0
2020-07-15 08:32:45.785 DEBUG [kea-dhcp6.packets/1] DHCP6_RESPONSE_DATA
responding with packet type 2 data is localAddr=[fd10::7f15]:547
remoteAddr=[fd10::7f0a]:547
msgtype=2(ADVERTISE), transid=0x868609
type=00001, len=00039:
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
type=00002, len=00014: 00:01:00:01:26:a0:41:68:02:00:00:00:00:01
type=00003(IA_NA), len=00040: iaid=0, t1=2147483648, t2=3435973836,
options:
  type=00005(IAADDR), len=00024: address=fd10:2::1,
preferred-lft=4294967295, valid-lft=4294967295
1 relay(s):
relay[0]: msg-type=13(RELAY_REPLY), hop-count=0,
link-address=fd10:2::1, peer-address=fd10::7f0a, 0 option(s)
 
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.packets/1] DHCP6_BUFFER_RECEIVED
received buffer from fd10::7f0a:547 to fd10::7f15:0 over interface eth0
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.options/1] DHCP6_BUFFER_UNPACK
parsing buffer received from fd10::7f0a to fd10::7f15 over interface eth0
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.packets/1] DHCP6_PACKET_RECEIVED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: REQUEST (type 3) received from fd10::7f0a to fd10::7f15 on
interface eth0
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.packets/1] DHCP6_QUERY_DATA
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199, packet details: localAddr=[fd10::7f15]:0
remoteAddr=[fd10::7f0a]:547
msgtype=3(REQUEST), transid=0xccd199
type=00001, len=00039:
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
type=00002, len=00014: 00:01:00:01:26:a0:41:68:02:00:00:00:00:01
type=00003(IA_NA), len=00040: iaid=0, t1=4294967295, t2=4294967295,
options:
  type=00005(IAADDR), len=00024: address=::, preferred-lft=4294967295,
valid-lft=4294967295
type=00008, len=00002: 0 (uint16)
type=00015, len=00008: 00:06:43:47:2d:4e:4d:53
1 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=fd10:2::1, peer-address=fd10::7f0a, 0 option(s)
 
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.dhcpsrv/1] DHCPSRV_CFGMGR_SUBNET6
retrieved subnet fd10:2::/112 for address hint fd10:2::1
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.packets/1] DHCP6_SUBNET_SELECTED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: the subnet with ID 2 was selected for client assignments
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.packets/1] DHCP6_SUBNET_DATA
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: the selected subnet details: fd10:2::/112
2020-07-15 08:32:46.782 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation
for subnet id 2, identified by
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier:
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047,
found 0 host(s)
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 2
and identifier
duid=0002000000090112495238323947572D4C54452D4E412D414B39020B465458323033395A303047
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.dhcp6/1] DHCP6_CLASS_ASSIGNED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: client packet has been assigned to the following class(es):
UNKNOWN
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.leases/1]
DHCP6_PROCESS_IA_NA_REQUEST
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: server is processing IA_NA option with iaid=0 and hint=::
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_IAID_DUID obtaining IPv6 leases for IAID 0 and DUID
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
and lease type IA_NA
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.alloc-engine/1]
ALLOC_ENGINE_V6_ALLOC_UNRESERVED no static reservations available - trying
to dynamically allocate leases for client
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for
subnet id 2 and including IPv6 address fd10:2::2
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get all hosts with reservations for
subnet id 2 and IPv6 address fd10:2::2
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6_COUNT using subnet id 2 and address
fd10:2::2, found 0 host(s)
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL host not found using subnet id 2
and address fd10:2::2
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_ADDR6 obtaining IPv6 lease for address fd10:2::2 and
lease type IA_NA
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for
subnet id 2 and including IPv6 address fd10:2::3
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get all hosts with reservations for
subnet id 2 and IPv6 address fd10:2::3
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6_COUNT using subnet id 2 and address
fd10:2::3, found 0 host(s)
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.hosts/1]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL host not found using subnet id 2
and address fd10:2::3
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_ADDR6 obtaining IPv6 lease for address fd10:2::3 and
lease type IA_NA
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_ADD_ADDR6 adding IPv6 lease with address fd10:2::3
2020-07-15 08:32:46.783 DEBUG [kea-dhcp6.dhcpsrv/1]
DHCPSRV_MEMFILE_GET_ADDR6 obtaining IPv6 lease for address fd10:2::3 and
lease type IA_NA
2020-07-15 08:32:46.783 INFO  [kea-dhcp6.leases/1] DHCP6_LEASE_ALLOC
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: lease for address fd10:2::3 and iaid=0 has been allocated for
4294967295 seconds
2020-07-15 08:32:46.784 DEBUG [kea-dhcp6.leases/1] DHCP6_LEASE_DATA
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: detailed lease information for iaid=0: Type:          IA_NA(0)
Address:       fd10:2::3
Prefix length: 128
IAID:          0
Pref life:     4294967295
Valid life:    4294967295
Cltt:          1594801966
DUID:         
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
Hardware addr: (none)
Subnet ID:     2
State:         default
 
2020-07-15 08:32:46.784 DEBUG [kea-dhcp6.dhcp6/1] DHCP6_CLASS_ASSIGNED
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: client packet has been assigned to the following class(es):
ALL, UNKNOWN
2020-07-15 08:32:46.784 DEBUG [kea-dhcp6.packets/1] DHCP6_PACKET_SEND
duid=[00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47],
tid=0xccd199: trying to send packet REPLY (type 7) from [fd10::7f15]:547 to
[fd10::7f0a]:547 on interface eth0
2020-07-15 08:32:46.784 DEBUG [kea-dhcp6.packets/1] DHCP6_RESPONSE_DATA
responding with packet type 7 data is localAddr=[fd10::7f15]:547
remoteAddr=[fd10::7f0a]:547
msgtype=7(REPLY), transid=0xccd199
type=00001, len=00039:
00:02:00:00:00:09:01:12:49:52:38:32:39:47:57:2d:4c:54:45:2d:4e:41:2d:41:4b:39:02:0b:46:54:58:32:30:33:39:5a:30:30:47
type=00002, len=00014: 00:01:00:01:26:a0:41:68:02:00:00:00:00:01
type=00003(IA_NA), len=00040: iaid=0, t1=2147483648, t2=3435973836,
options:
  type=00005(IAADDR), len=00024: address=fd10:2::3,
preferred-lft=4294967295, valid-lft=4294967295
1 relay(s):
relay[0]: msg-type=13(RELAY_REPLY), hop-count=0,
link-address=fd10:2::1, peer-address=fd10::7f0a, 0 option(s)
 


Thanks for your support,
Laurent.



--
Sent from: http://kea-users.7364.n8.nabble.com/


More information about the Kea-users mailing list