[Kea-users] Kea server - ipv6 allocations based on interface-id & remote-id

nathiya dayalan nathidayal86 at gmail.com
Wed Jul 22 16:59:36 UTC 2020


Hi,

Need help in configuring kea dhcp6 server to allocate ip address based on
Interface-id (option 18) and Remote-id (option 37) sent by the relay agent

We tried configuring the server with the below configs,



"Dhcp6": {

    "subnet6": [

        {

            "subnet": "99::0/64",

            "pools": [

                 {

                     "pool": "99::1-99::20"

                 }

             ],

            "interface-id": "BLUEE"

        }

    ],

}




   1. *Kea dhcp6 server gives ipv6 address with or without  interface id
   string match. Need help to understand, if we are missing something for
   interface-id configuration.*
   2. *Also a sample server configuration for remote-id based ip allocation
   will help.*


*kea-dhcp6 logs are pasted below for the above interface-id case:*

204 16:51:05.837 kea-dhcp6.packets DHCP6_BUFFER_RECEIVED received buffer
from 88::2:546 to 88::1:0 over interface e101-002-0
204 16:51:05.837 kea-dhcp6.options DHCP6_BUFFER_UNPACK parsing buffer
received from 88::2 to 88::1 over interface e101-002-0
204 16:51:05.838 kea-dhcp6.packets DHCP6_PACKET_RECEIVED
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: REQUEST
(type 3) received from 88::2 to 88::1 on interface e101-002-0
204 16:51:05.838 kea-dhcp6.packets DHCP6_QUERY_DATA
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0, packet
details: localAddr=[88::1]:0 remoteAddr=[88::2]:546
msgtype=3(REQUEST), transid=0xecbed0
type=00001, len=00014: 00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1
type=00002, len=00014: 00:01:00:01:26:aa:e3:ee:3e:90:9e:cd:cf:66
type=00003(IA_NA), len=00040: iaid=2177023393, t1=3600, t2=5400,
options:
  type=00005(IAADDR), len=00024: *address=99::6*, preferred-lft=7200,
valid-lft=7500
type=00008, len=00002: 0 (uint16)
1 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=99::2, peer-address=fe80::4407:81ff:fec2:bda1, 2 option(s)
*type=00018, len=00004: 42:4c:55:45*
type=00037, len=00021: 808859444 (uint32)
61613A61613A61613A61613A61613A6161 (binary)

204 16:51:05.838 kea-dhcp6.dhcpsrv DHCPSRV_CFGMGR_SUBNET6 retrieved subnet
99::/64 for address hint 99::2
204 16:51:05.838 kea-dhcp6.packets DHCP6_SUBNET_SELECTED
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], t

204 16:51:05.838 kea-dhcp6.dhcpsrv DHCPSRV_CFGMGR_SUBNET6 retrieved subnet
99::/64 for address hint 99::2
204 16:51:05.838 kea-dhcp6.packets DHCP6_SUBNET_SELECTED
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: the subnet
with ID 1 was selected for client assignments
204 16:51:05.838 kea-dhcp6.packets DHCP6_SUBNET_DATA
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: the
selected subnet details: 99::/64
204 16:51:05.838 kea-dhcp6.hosts HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get
one host with IPv6 reservation for subnet id 1, identified by
hwaddr=61613A61613A61613A61613A61613A6161
204 16:51:05.838 kea-dhcp6.hosts HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts
with reservations using identifier:
hwaddr=61613A61613A61613A61613A61613A6161
204 16:51:05.838 kea-dhcp6.hosts HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using
identifier hwaddr=61613A61613A61613A61613A61613A6161, found 0 host(s)
204 16:51:05.838 kea-dhcp6.hosts
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id
1 and identifier hwaddr=61613A61613A61613A61613A61613A6161
204 16:51:05.838 kea-dhcp6.hosts HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get
one host with IPv6 reservation for subnet id 1, identified by
duid=0001000126AB2AF7460781C2BDA1
204 16:51:05.838 kea-dhcp6.hosts HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts
with reservations using identifier: duid=0001000126AB2AF7460781C2BDA1
204 16:51:05.838 kea-dhcp6.hosts HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using
identifier duid=0001000126AB2AF7460781C2BDA1, found 0 host(s)
204 16:51:05.838 kea-dhcp6.hosts
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id
1 and identifier duid=0001000126AB2AF7460781C2BDA1
204 16:51:05.838 kea-dhcp6.dhcp6 DHCP6_CLASS_ASSIGNED
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: client
packet has been assigned to the following class(es): UNKNOWN
204 16:51:05.839 kea-dhcp6.leases DHCP6_PROCESS_IA_NA_REQUEST
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: server is
processing IA_NA option with iaid=2177023393 and hint=99::6
204 16:51:05.839 kea-dhcp6.dhcpsrv DHCPSRV_MEMFILE_GET_IAID_DUID obtaining
IPv6 leases for IAID 2177023393 and DUID
00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1 and lease type IA_NA
204 16:51:05.839 kea-dhcp6.alloc-engine ALLOC_ENGINE_V6_ALLOC_UNRESERVED no
static reservations available - trying to dynamically allocate leases for
client duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0
204 16:51:05.839 kea-dhcp6.dhcpsrv DHCPSRV_MEMFILE_GET_ADDR6 obtaining IPv6
lease for address 99::6 and lease type IA_NA
204 16:51:05.839 kea-dhcp6.hosts HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get
one host with reservation for subnet id 1 and including IPv6 address 99::6
204 16:51:05.839 kea-dhcp6.hosts HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get
all hosts with reservations for subnet id 1 and IPv6 address 99::6
204 16:51:05.839 kea-dhcp6.hosts HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6_COUNT
using subnet id 1 and address 99::6, found 0 host(s)
204 16:51:05.839 kea-dhcp6.hosts HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL
host not found using subnet id 1 and address 99::6
204 16:51:05.839 kea-dhcp6.dhcpsrv DHCPSRV_MEMFILE_ADD_ADDR6 adding IPv6
lease with address 99::6
204 16:51:05.839 kea-dhcp6.leases DHCP6_LEASE_ALLOC
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: lease for
address 99::6 and iaid=2177023393 has been allocated for 3600 seconds
204 16:51:05.839 kea-dhcp6.leases DHCP6_LEASE_DATA
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: detailed
lease information for iaid=2177023393: Type:          IA_NA(0)
Address:       99::6
Prefix length: 128
IAID:          2177023393
Pref life:     3600
Valid life:    3600
Cltt:          1595436665
DUID:          00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1
Hardware addr: 61:61:3a:61:61:3a:61:61:3a:61:61:3a:61:61:3a:61:61
Subnet ID:     1
State:         default

204 16:51:05.839 kea-dhcp6.packets DHCP6_PACKET_SEND
duid=[00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1], tid=0xecbed0: trying to
send packet REPLY (type 7) from [88::1]:547 to [88::2]:547 on interface
e101-002-0
204 16:51:05.839 kea-dhcp6.packets DHCP6_RESPONSE_DATA responding with
packet type 7 data is localAddr=[88::1]:547 remoteAddr=[88::2]:547
msgtype=7(REPLY), transid=0xecbed0
type=00001, len=00014: 00:01:00:01:26:ab:2a:f7:46:07:81:c2:bd:a1
type=00002, len=00014: 00:01:00:01:26:aa:e3:ee:3e:90:9e:cd:cf:66
type=00003(IA_NA), len=00040: iaid=2177023393, t1=1800, t2=2700,
options:
  type=00005(IAADDR), len=00024: address=99::6, preferred-lft=3600,
valid-lft=3600
1 relay(s):
relay[0]: msg-type=13(RELAY_REPLY), hop-count=0,
link-address=99::2, peer-address=fe80::4407:81ff:fec2:bda1, 1 option(s)
type=00018, len=00004: 42:4c:55:45



Regards,

Nathiya.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20200722/abd537fc/attachment-0001.htm>


More information about the Kea-users mailing list