[Kea-users] DHCPv6 "sorry no subnet available" - how to configure?

Marcin Romanowski marcin at nicram.net
Thu Aug 27 15:14:58 UTC 2020


Hello
I'm trying to configure DHCPv6 with reservations based on mac and
interface-id.
In the debug I see that the relay agent sends this value but kea doesn't
set correct/any subnet.

kea-dhcp6.conf

{
"Dhcp6": {
    // Add names of your network interfaces to listen on.
    "interfaces-config": {
        "interfaces": ["ens4"]
    },
    "control-socket": {
        "socket-type": "unix",
        "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
    },
    "lease-database": {
        "type": "memfile",
        "lfc-interval": 3600
    },
    "expired-leases-processing": {
        "reclaim-timer-wait-time": 10,
        "flush-reclaimed-timer-wait-time": 25,
        "hold-reclaimed-time": 3600,
        "max-reclaim-leases": 100,
        "max-reclaim-time": 250,
        "unwarned-reclaim-cycles": 5
    },
    "renew-timer": 1000,
    "rebind-timer": 2000,
    "preferred-lifetime": 3000,
    "valid-lifetime": 4000,
    "option-data": [
        {
            "name": "dns-servers",
            "data": "2001:db8:2::45, 2001:db8:2::100"
        },
        {
            "name": "new-posix-timezone",
            "data": "EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00"
        }
    ],
    "subnet6": [
        {
            "subnet": "2001:db8:1200::/48",
            "id": 45678,
            "interface-id":"Gi8",
            "relay": {
                "ip-addresses": ["FE80::1"]
            },
            "pools": [ ],
            "pd-pools": [
                {
                    "prefix": "2001:db8:1200::",
                    "prefix-len": 48,
                    "delegated-len": 56
                }
            ],
            "reservations":[
                {
                    "hw-address":"0c:44:e7:8c:c7:00",
   //"duid":"00:03:00:01:00:1e:bd:c7:c2:00",
                    "prefixes": ["2001:db8:1200:900::/56"]
                },
                {
                    "duid":"00:03:00:01:0c:44:e7:56:ac:00",
                    "prefixes":["2001:db8:1200::/56"]
                }
            ]
        },
        {
            "subnet": "2001:db8:1::/48",
            "interface-id":"Gi7",
            "relay": {
                "ip-addresses": ["FE80:A1:E8::1"]
            },
            "id": 7655443,
            "pools": [ ],
            "pd-pools": [
                {
                    "prefix": "2001:db8:1::",
                    "prefix-len": 48,
                    "delegated-len": 56
                }
            ],
            "reservations":[
            ]
        }
    ],

    "loggers": [
    {
        "name": "kea-dhcp6",
        "output_options": [
            {
                "output": "/opt/kea/var/log/kea-dhcp6.log"
            }
        ],
        "severity": "DEBUG",
        "debuglevel": 99
    }
  ]
}
}

I'm try host  "hw-address":"0c:44:e7:8c:c7:00"

and debug:

2020-08-27 06:41:11.410 DEBUG [kea-dhcp6.packets/2463]
DHCP6_BUFFER_RECEIVED received buffer from fe80::1:547 to fe80::11:0 over
interface ens4
2020-08-27 06:41:11.410 DEBUG [kea-dhcp6.options/2463] DHCP6_BUFFER_UNPACK
parsing buffer received from fe80::1 to fe80::11 over interface ens4
2020-08-27 06:41:11.410 DEBUG [kea-dhcp6.packets/2463]
DHCP6_PACKET_RECEIVED duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980:
SOLICIT (type 1) received from fe80::1 to fe80::11 on interface ens4
2020-08-27 06:41:11.410 DEBUG [kea-dhcp6.packets/2463] DHCP6_QUERY_DATA
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980, packet details:
localAddr=[fe80::11]:0 remoteAddr=[fe80::1]:547
msgtype=1(SOLICIT), transid=0xbfa980
type=00001, len=00010: 00:03:00:01:00:1e:bd:c7:c2:00
type=00006, len=00008: 25(uint16) 23(uint16) 24(uint16) 59(uint16)
type=00008, len=00002: 0 (uint16)
type=00014, len=00000:
type=00015, len=00010: 00:08:63:69:73:63:6f:70:6e:70
type=16, len=14,  enterprise id=0x9, data-len0=8,
vendor-class-data0='CSR1000V'
type=00025(IA_PD), len=00012: iaid=458753, t1=0, t2=0
1 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=::, peer-address=fe80::e44:e7ff:fe8c:c700, 3 option(s)
type=00018, len=00005: 01:03:47:69:38
type=00037, len=00022: 9 (uint32) 020000000000000A00030001001EE59F0F00
(binary)
type=00079, len=00008: 00:01:0c:44:e7:8c:c7:00

2020-08-27 06:41:11.410 DEBUG [kea-dhcp6.packets/2463]
DHCP6_SUBNET_SELECTION_FAILED duid=[00:03:00:01:00:1e:bd:c7:c2:00],
tid=0xbfa980: failed to select subnet for the client
2020-08-27 06:41:11.410 DEBUG [kea-dhcp6.dhcp6/2463] DHCP6_CLASS_ASSIGNED
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980: client packet has been
assigned to the following class(es): UNKNOWN
2020-08-27 06:41:11.411 DEBUG [kea-dhcp6.leases/2463]
DHCP6_PROCESS_IA_PD_REQUEST duid=[00:03:00:01:00:1e:bd:c7:c2:00],
tid=0xbfa980: server is processing IA_PD option with iaid=458753 and
hint=(no hint)
2020-08-27 06:41:11.411 DEBUG [kea-dhcp6.options/2463]
DHCP6_ADD_STATUS_CODE_FOR_IA duid=[00:03:00:01:00:1e:bd:c7:c2:00],
tid=0xbfa980: adding Status Code to IA with iaid=458753: NoPrefixAvail(6)
"Sorry, no subnet available."
2020-08-27 06:41:11.411 DEBUG [kea-dhcp6.dhcp6/2463] DHCP6_CLASS_ASSIGNED
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980: client packet has been
assigned to the following class(es): ALL, VENDOR_CLASS_CSR1000V, UNKNOWN
2020-08-27 06:41:11.411 DEBUG [kea-dhcp6.packets/2463] DHCP6_PACKET_SEND
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980: trying to send packet
ADVERTISE (type 2) from [fe80::11]:547 to [fe80::1]:547 on interface ens4
2020-08-27 06:41:11.411 DEBUG [kea-dhcp6.packets/2463] DHCP6_RESPONSE_DATA
responding with packet type 2 data is localAddr=[fe80::11]:547
remoteAddr=[fe80::1]:547
msgtype=2(ADVERTISE), transid=0xbfa980
type=00001, len=00010: 00:03:00:01:00:1e:bd:c7:c2:00
type=00002, len=00014: 00:01:00:01:26:73:42:18:0c:44:e7:40:1e:00
type=00023, len=00032: 2001:db8:2::45 2001:db8:2::100
type=00025(IA_PD), len=00045: iaid=458753, t1=0, t2=0,
options:
  type=00013, len=00029: NoPrefixAvail(6) "Sorry, no subnet available."
1 relay(s):
relay[0]: msg-type=13(RELAY_REPLY), hop-count=0,
link-address=::, peer-address=fe80::e44:e7ff:fe8c:c700, 1 option(s)
type=00018, len=00005: 01:03:47:69:38

2020-08-27 06:41:12.420 DEBUG [kea-dhcp6.packets/2463]
DHCP6_BUFFER_RECEIVED received buffer from fe80::1:547 to fe80::11:0 over
interface ens4
2020-08-27 06:41:12.420 DEBUG [kea-dhcp6.options/2463] DHCP6_BUFFER_UNPACK
parsing buffer received from fe80::1 to fe80::11 over interface ens4
2020-08-27 06:41:12.420 DEBUG [kea-dhcp6.packets/2463]
DHCP6_PACKET_RECEIVED duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980:
SOLICIT (type 1) received from fe80::1 to fe80::11 on interface ens4
2020-08-27 06:41:12.420 DEBUG [kea-dhcp6.packets/2463] DHCP6_QUERY_DATA
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980, packet details:
localAddr=[fe80::11]:0 remoteAddr=[fe80::1]:547
msgtype=1(SOLICIT), transid=0xbfa980
type=00001, len=00010: 00:03:00:01:00:1e:bd:c7:c2:00
type=00006, len=00008: 25(uint16) 23(uint16) 24(uint16) 59(uint16)
type=00008, len=00002: 100 (uint16)
type=00014, len=00000:
type=00015, len=00010: 00:08:63:69:73:63:6f:70:6e:70
type=16, len=14,  enterprise id=0x9, data-len0=8,
vendor-class-data0='CSR1000V'
type=00025(IA_PD), len=00012: iaid=458753, t1=0, t2=0
1 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=::, peer-address=fe80::e44:e7ff:fe8c:c700, 3 option(s)
type=00018, len=00005: 01:03:47:69:38
type=00037, len=00022: 9 (uint32) 020000000000000A00030001001EE59F0F00
(binary)
type=00079, len=00008: 00:01:0c:44:e7:8c:c7:00

2020-08-27 06:41:12.420 DEBUG [kea-dhcp6.packets/2463]
DHCP6_SUBNET_SELECTION_FAILED duid=[00:03:00:01:00:1e:bd:c7:c2:00],
tid=0xbfa980: failed to select subnet for the client
2020-08-27 06:41:12.421 DEBUG [kea-dhcp6.dhcp6/2463] DHCP6_CLASS_ASSIGNED
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980: client packet has been
assigned to the following class(es): UNKNOWN
2020-08-27 06:41:12.421 DEBUG [kea-dhcp6.leases/2463]
DHCP6_PROCESS_IA_PD_REQUEST duid=[00:03:00:01:00:1e:bd:c7:c2:00],
tid=0xbfa980: server is processing IA_PD option with iaid=458753 and
hint=(no hint)
2020-08-27 06:41:12.421 DEBUG [kea-dhcp6.options/2463]
DHCP6_ADD_STATUS_CODE_FOR_IA duid=[00:03:00:01:00:1e:bd:c7:c2:00],
tid=0xbfa980: adding Status Code to IA with iaid=458753: NoPrefixAvail(6)
"Sorry, no subnet available."
2020-08-27 06:41:12.421 DEBUG [kea-dhcp6.dhcp6/2463] DHCP6_CLASS_ASSIGNED
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980: client packet has been
assigned to the following class(es): ALL, VENDOR_CLASS_CSR1000V, UNKNOWN
2020-08-27 06:41:12.421 DEBUG [kea-dhcp6.packets/2463] DHCP6_PACKET_SEND
duid=[00:03:00:01:00:1e:bd:c7:c2:00], tid=0xbfa980: trying to send packet
ADVERTISE (type 2) from [fe80::11]:547 to [fe80::1]:547 on interface ens4
2020-08-27 06:41:12.421 DEBUG [kea-dhcp6.packets/2463] DHCP6_RESPONSE_DATA
responding with packet type 2 data is localAddr=[fe80::11]:547
remoteAddr=[fe80::1]:547
msgtype=2(ADVERTISE), transid=0xbfa980
type=00001, len=00010: 00:03:00:01:00:1e:bd:c7:c2:00
type=00002, len=00014: 00:01:00:01:26:73:42:18:0c:44:e7:40:1e:00
type=00023, len=00032: 2001:db8:2::45 2001:db8:2::100
type=00025(IA_PD), len=00045: iaid=458753, t1=0, t2=0,
options:
  type=00013, len=00029: NoPrefixAvail(6) "Sorry, no subnet available."
1 relay(s):
relay[0]: msg-type=13(RELAY_REPLY), hop-count=0,
link-address=::, peer-address=fe80::e44:e7ff:fe8c:c700, 1 option(s)
type=00018, len=00005: 01:03:47:69:38

In this scenario link-address doesn't match the subnet.

How to configure correctly?


Thanks for help in advance.

Best Regards


Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20200827/66513012/attachment.htm>


More information about the Kea-users mailing list