[Kea-users] About Stateless DHCPv6 settings.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] About Stateless DHCPv6 settings.

Yoshihito Horigome
Hello,

I am trying to configure stateless DHCPv6 with reference to the documentation[1].

When set, "Sorry, no prefixes could be allocated." Is output, and a message indicating that allocation is not possible is output.

Logs: >>>
2019-08-26 20:40:39.270 DEBUG [kea-dhcp6.packets/35] DHCP6_SUBNET_SELECTED duid=[00:03:00:01:6c:3b:6b:cf:9b:94], tid=0xcab890: the subnet with ID 1024 was selected for client assignments
2019-08-26 20:40:39.270 DEBUG [kea-dhcp6.packets/35] DHCP6_SUBNET_DATA duid=[00:03:00:01:6c:3b:6b:cf:9b:94], tid=0xcab890: the selected subnet details: 240b:11:8500:5710::/64
2019-08-26 20:40:39.271 DEBUG [kea-dhcp6.packets/35] DHCP6_PACKET_SEND duid=[00:03:00:01:6c:3b:6b:cf:9b:94], tid=0xcab890: trying to send packet ADVERTISE (type 2) from [ff02::1:2]:547 to [fe80::8e3b:6bff:fecf:9b94]:546 on interface eth0
2019-08-26 20:40:39.272 DEBUG [kea-dhcp6.packets/35] DHCP6_RESPONSE_DATA responding with packet type 2 data is localAddr=[ff02::1:2]:547 remoteAddr=[fe80::8e3b:6bff:fecf:9b94]:546
msgtype=2(ADVERTISE), transid=0xcab890
type=00001, len=00010: 00:03:00:01:6c:3b:6b:cf:9b:94
type=00002, len=00014: 00:01:00:01:24:f6:67:37:1a:c0:c9:ca:a9:5e
type=00023, len=00080: <DNS server IP address>
type=00025(IA_PD), len=00056: iaid=6, t1=0, t2=0,
options:
  type=00013, len=00040: NoPrefixAvail(6) "Sorry, no prefixes could be allocated."
No relays traversed.

2019-08-26 20:40:39.271 WARN  [kea-dhcp6.alloc-engine/35] ALLOC_ENGINE_V6_ALLOC_FAIL duid=[00:03:00:01:6c:3b:6b:cf:9b:94], tid=0xcab890: failed to allocate an IPv6 address after 0 attempt(s)

<<<

config: >>>
{
"Dhcp6": {
    "valid-lifetime": 86400,
    "renew-timer": 3600,
    "rebind-timer": 7200,
    "preferred-lifetime": 54000,
    "decline-probation-period": 3600,
"mac-sources": [ "client-link-addr-option" ],
    "interfaces-config": {
        "interfaces": ["eth0"]    
    },                                                                                                                             
    "control-socket": {
        "socket-type": "unix",
        "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
    },                 
    "lease-database": {
        "type": "memfile",
        "persist": true,
        "name": "/var/lib/kea/dhcp6.leases"
    },  
    "option-data": [
        {
            "name": "dns-servers",
            "data": "<DNS SERVERS IP ADDRESS>"     
        },
        {
            "name": "domain-search",
            "data": "example.com"
        },
        {
            "name": "sntp-servers",
            "data": "<NTP SERVERS>"
        },
        {
            "name": "new-tzdb-timezone",
            "data": "JP"
        }
    ],
    "subnet6": [
        {
            "subnet": "<IPv6 network address assigned by ISP>/64",
            "interface": "eth0",
        }
    ]
}
}

With statefull DHCPv6, it was possible to assign addresses to client PCs.
Is there something wrong with the settings?

Best regards.


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] About Stateless DHCPv6 settings.

Tomek Mrugalski
On 27.08.2019 14:16, Yoshihito Horigome wrote:
> I am trying to configure stateless DHCPv6 with reference to the
> documentation[1].
>
> When set, "Sorry, no prefixes could be allocated." Is output, and a
> message indicating that allocation is not possible is output.

> 2019-08-26 20:40:39.271 DEBUG [kea-dhcp6.packets/35] DHCP6_PACKET_SEND
> duid=[00:03:00:01:6c:3b:6b:cf:9b:94], tid=0xcab890: trying to send
> packet ADVERTISE (type 2) from [ff02::1:2]:547 to
> [fe80::8e3b:6bff:fecf:9b94]:546 on interface eth0
> 2019-08-26 20:40:39.272 DEBUG [kea-dhcp6.packets/35] DHCP6_RESPONSE_DATA
> responding with packet type 2 data is localAddr=[ff02::1:2]:547
> remoteAddr=[fe80::8e3b:6bff:fecf:9b94]:546
> msgtype=2(ADVERTISE), transid=0xcab890

Hold on. That doesn't look like stateless at all. You didn't provide
full logs, but I guess your device must have sent SOLICIT, so Kea
reponds with ADVERTISE.

Stateless DHCPv6 is a simplified mode that does not involve assigning
anything (addresses or prefixes) that requires state tracking. Hence the
name stateless. It is used to provide additional configuration options,
such as DNS addresses or domain names. That kind of information is
requested by client sending INFORMATION-REQUEST message and the server
is supposed to reply with REPLY message.

The protocol spec says that if you need any addresses or prefixes, you
are doing stateful and therefore must send SOLICIT rather than INF-REQUEST.

So, if you want an address or prefix assigned, stateless is not for you.
Alternatively, if you want to use stateless, your device should not
request addresses or prefixes and send INF-REQUEST without any IA_NA or
IA_PD options (both are forbidden in INF-REQUEST).

> With statefull DHCPv6, it was possible to assign addresses to client PCs.
> Is there something wrong with the settings?
This looks like misunderstanding what stateless really is.

You may also take a look at
https://tools.ietf.org/html/rfc8415#section-6.1 or now obsoleted RFC3736.

Tomek
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] About Stateless DHCPv6 settings.

Yoshihito Horigome
Hello Tomek,

Sorry for the late reply.

Hold on. That doesn't look like stateless at all. You didn't provide
full logs, but I guess your device must have sent SOLICIT, so Kea
reponds with ADVERTISE.

This looks like misunderstanding what stateless really is.

You may also take a look at
https://tools.ietf.org/html/rfc8415#section-6.1 or now obsoleted RFC3736.

Thank you for the information.
My understanding of DHCPv6 seems to be lacking.

I would like to set kea after studying again.
Best regards.

On 8月 28 2019, at 7:14 午前, Tomek Mrugalski <[hidden email]> wrote:
On 27.08.2019 14:16, Yoshihito Horigome wrote:
I am trying to configure stateless DHCPv6 with reference to the
documentation[1].

When set, "Sorry, no prefixes could be allocated." Is output, and a
message indicating that allocation is not possible is output.

2019-08-26 20:40:39.271 DEBUG [kea-dhcp6.packets/35] DHCP6_PACKET_SEND
duid=[00:03:00:01:6c:3b:6b:cf:9b:94], tid=0xcab890: trying to send
packet ADVERTISE (type 2) from [ff02::1:2]:547 to
[fe80::8e3b:6bff:fecf:9b94]:546 on interface eth0
2019-08-26 20:40:39.272 DEBUG [kea-dhcp6.packets/35] DHCP6_RESPONSE_DATA
responding with packet type 2 data is localAddr=[ff02::1:2]:547
remoteAddr=[fe80::8e3b:6bff:fecf:9b94]:546
msgtype=2(ADVERTISE), transid=0xcab890

Hold on. That doesn't look like stateless at all. You didn't provide
full logs, but I guess your device must have sent SOLICIT, so Kea
reponds with ADVERTISE.

Stateless DHCPv6 is a simplified mode that does not involve assigning
anything (addresses or prefixes) that requires state tracking. Hence the
name stateless. It is used to provide additional configuration options,
such as DNS addresses or domain names. That kind of information is
requested by client sending INFORMATION-REQUEST message and the server
is supposed to reply with REPLY message.

The protocol spec says that if you need any addresses or prefixes, you
are doing stateful and therefore must send SOLICIT rather than INF-REQUEST.

So, if you want an address or prefix assigned, stateless is not for you.
Alternatively, if you want to use stateless, your device should not
request addresses or prefixes and send INF-REQUEST without any IA_NA or
IA_PD options (both are forbidden in INF-REQUEST).

With statefull DHCPv6, it was possible to assign addresses to client PCs.
Is there something wrong with the settings?
This looks like misunderstanding what stateless really is.

You may also take a look at
https://tools.ietf.org/html/rfc8415#section-6.1 or now obsoleted RFC3736.

Tomek
_______________________________________________
Kea-users mailing list
https://lists.isc.org/mailman/listinfo/kea-users

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