Thanks for your reply, Darren.
I went through the configuration and made a similar configuration to give it a
try. My objective was to get a IA_NA address, with each client getting a single
address, bu from different /64 pool, but it fails with NoAddrsAvail(2) "Sorry,
no address could be allocated."
DHCP requests come to the server via a relay, and the server is listening on
localhost. I can see from the logs that subnet is getting correctly retrieved.
dhcpv6 config is:
{
"Dhcp6": {
"interfaces-config": {
"interfaces": [
"lo/::1"
]
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea6-ctrl-socket"
},
"lease-database": {
"type": "memfile",
"lfc-interval": 3600
},
"valid-lifetime": 300,
"option-data": [
{
"name": "dns-servers",
"data": "2001:db8:2::45, 2001:db8:2::100"
}
],
"subnet6": [
{
"id": 1,
"subnet": "2404:640:4003:2640::/56",
"pd-pools": [
{
"prefix": "2404:640:5878:2640::",
"prefix-len": 56,
"delegated-len": 64
}
],
"option-data": [
{
"name": "dns-servers",
"data": "2404:640:4003:2640::dead:beef,
2404:640:4003:2640::cafe:babe"
}
]
}
],
"loggers": [
{
"name": "kea-dhcp6",
"output_options": [
{
"output": "/var/log/kea-dhcp6.log"
}
],
"severity": "DEBUG",
"debuglevel": 1
}
]
}
}
The full logs are as follows:
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_BUFFER_RECEIVED received buffer from fd40:761b:1:1::2:546 to ::1:0 over
interface lo
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.options/1612065.139994049166976]
DHCP6_BUFFER_UNPACK parsing buffer received from fd40:761b:1:1::2 to ::1 over
interface lo
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_PACKET_RECEIVED duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: SOLICIT (type 1) received from fd40:761b:1:1::2 to ::1 on
interface lo
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_QUERY_DATA duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20, packet details: localAddr=[::1]:0
remoteAddr=[fd40:761b:1:1::2]:546
msgtype=1(SOLICIT), transid=0x69ea20
type=00001, len=00014: 00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f
type=00003(IA_NA), len=00040: iaid=202768387, t1=3600, t2=5400,
options:
type=00005(IAADDR), len=00024: address=2404:640:4003:2640::2,
preferred-lft=7200, valid-lft=10800
type=00006, len=00008: 23(uint16) 24(uint16) 39(uint16) 31(uint16)
type=00008, len=00002: 0 (uint16)
2 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=1,
link-address=fd40:761b:1:1::2, peer-address=fd40:761b:1:1::1, 0 option(s)
relay[1]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=2404:640:4003:2640::, peer-address=fe80::42:cff:fe16:3, 2 option(s)
type=00018, len=00004: 00:00:00:04
type=00079, len=00008: 00:01:02:42:0c:16:00:03
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.dhcpsrv/1612065.139994049166976]
DHCPSRV_CFGMGR_SUBNET6 retrieved subnet 2404:640:4003:2640::/56 for address
hint 2404:640:4003:2640::
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_SUBNET_SELECTED duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: the subnet with ID 1 was selected for client assignments
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_SUBNET_DATA duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: the selected subnet details: 2404:640:4003:2640::/56
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation for
subnet id 1, identified by hwaddr=02420C160003
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier:
hwaddr=02420C160003
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=02420C160003, found
0 host(s)
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1
and identifier hwaddr=02420C160003
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation for
subnet id 1, identified by duid=0001000129B18278E66FD966E67F
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier:
duid=0001000129B18278E66FD966E67F
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier
duid=0001000129B18278E66FD966E67F, found 0 host(s)
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.hosts/1612065.139994049166976]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1
and identifier duid=0001000129B18278E66FD966E67F
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.dhcp6/1612065.139994049166976]
DHCP6_CLASS_ASSIGNED duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: client packet has been assigned to the following class(es):
UNKNOWN
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.leases/1612065.139994049166976]
DHCP6_PROCESS_IA_NA_REQUEST duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: server is processing IA_NA option with iaid=202768387 and
hint=2404:640:4003:2640::2
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.dhcpsrv/1612065.139994049166976]
DHCPSRV_MEMFILE_GET_IAID_DUID obtaining IPv6 leases for IAID 202768387 and DUID
00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f and lease type IA_NA
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.alloc-engine/1612065.139994049166976]
ALLOC_ENGINE_V6_ALLOC_UNRESERVED no static reservations available - trying to
dynamically allocate leases for client
duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f], tid=0x69ea20
2022-11-29 14:30:11.228 WARN [kea-dhcp6.alloc-engine/1612065.139994049166976]
ALLOC_ENGINE_V6_ALLOC_FAIL_SUBNET
duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f], tid=0x69ea20: failed to
allocate an IPv6 lease in the subnet with id 1
2022-11-29 14:30:11.228 WARN [kea-dhcp6.alloc-engine/1612065.139994049166976]
ALLOC_ENGINE_V6_ALLOC_FAIL_NO_POOLS
duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f], tid=0x69ea20: no pools were
available for the lease allocation
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.leases/1612065.139994049166976]
DHCP6_LEASE_ADVERT_FAIL duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: failed to advertise an address lease for iaid=202768387
2022-11-29 14:30:11.228 DEBUG [kea-dhcp6.options/1612065.139994049166976]
DHCP6_ADD_STATUS_CODE_FOR_IA duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: adding Status Code to IA with iaid=202768387: NoAddrsAvail(2)
"Sorry, no address could be allocated."
2022-11-29 14:30:11.229 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_PACKET_SEND duid=[00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f],
tid=0x69ea20: trying to send packet ADVERTISE (type 2) from [::1]:547 to
[fd40:761b:1:1::2]:547 on interface lo
2022-11-29 14:30:11.229 DEBUG [kea-dhcp6.packets/1612065.139994049166976]
DHCP6_RESPONSE_DATA responding with packet type 2 data is localAddr=[::1]:547
remoteAddr=[fd40:761b:1:1::2]:547
msgtype=2(ADVERTISE), transid=0x69ea20
type=00001, len=00014: 00:01:00:01:29:b1:82:78:e6:6f:d9:66:e6:7f
type=00002, len=00014: 00:01:00:01:2a:f2:70:1e:5e:b2:d7:b4:94:54
type=00003(IA_NA), len=00055: iaid=202768387, t1=0, t2=0,
options:
type=00013, len=00039: NoAddrsAvail(2) "Sorry, no address could be allocated."
type=00023, len=00032: 2404:640:4003:2640::dead:beef
2404:640:4003:2640::cafe:babe
2 relay(s):
relay[0]: msg-type=13(RELAY_REPLY), hop-count=1,
link-address=fd40:761b:1:1::2, peer-address=fd40:761b:1:1::1, 0 option(s)
relay[1]: msg-type=13(RELAY_REPLY), hop-count=0,
link-address=2404:640:4003:2640::, peer-address=fe80::42:cff:fe16:3, 1 option(s)
type=00018, len=00004: 00:00:00:04
------- Original Message -------
On Monday, November 28th, 2022 at 6:13 PM, Darren Ankney
<[email protected]> wrote:
> The simplest answer is found in the documentation:
> https://kea.readthedocs.io/en/kea-2.2.0/arm/dhcp6-srv.html#subnet-and-prefix-delegation-pools
> though your exact implementation may require slightly different
> configurations (example: multiple prefix pools). Example from the
> documentation shown below with my comments relating it to the
> recommendations you quoted.
>
> "Dhcp6": {
> "subnet6": [
> {
> // this would be the subnet that the CPE will get on the WAN side
> "subnet": "2001:d8b:1::/64",
> "pd-pools": [
> {
> // this is the subnet you are going to delegate
> smaller portions of to the LAN side of the CPE
> "prefix": "3000:1::",
> // This is the length of the subnet that you are
> going to delegate (example /48)
> "prefix-len": 64,
> // this is the size of the delegation you want to
> give to the CPE (the recommendations you quoted said /64)
> "delegated-len": 96
> }
> ]
> }
> ],
> ...
> }
>
>
>
> On Mon, Nov 28, 2022 at 5:42 AM Xuo Guoto via Kea-users
> [email protected] wrote:
>
> > Hello Kea list,
> >
> > I am trying to configure kea-ipv6 in a BNG context where kea will be
> > responsible for providing IP address for WAN (IA_NA) and for IA_PD. There
> > is a requirement that when assigning IA_NA each Residential Gateway be
> > given an IP address from a separate /64 prefix.
> >
> > For example RIPE BCOP-690 section 4.1.1 says:
> >
> > <quote>
> > Using a /64 prefix from a dedicated pool of IPv6 prefixes is the most
> > common scenario and currently the best practice. A separate block of IPv6
> > space is allocated for the WAN links to the end customer CPEs, so that when
> > CPE connects to the network and performs router discovery, a /64 prefix is
> > used to number both ends of the connection.
> > </quote>
> >
> > How such a configuration be provided in kea? From what I have seen if a /48
> > prefix is used in pool, kea will try to allocate single /128 to each CPE,
> > and pd-pools are for IA_PD.
> >
> > Thanks for your help!
> >
> > X.
> >
> > --
> > 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
> > [email protected]
> > https://lists.isc.org/mailman/listinfo/kea-users
>
> --
> 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
> [email protected]
> https://lists.isc.org/mailman/listinfo/kea-users
--
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
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users