Hi all,

I'm trying to setup kea for DHCP v4/v6 and having trouble with the v6 part
(v4 works fine).

With dhcpd I can get an IPv6 but not with kea.

Server is a physical server with CentOS 7.3, kea 1.1.0 installed from epel,
also tried compiling 1.2.0, which I'm currently using.

Client is CentOS 7.3, dhclient 4.2.5. Original client was an OpenStack VM but
now I'm testing with another physical server in the same switch to rule out
linux bridges.

I tried setting the reservations in the config file, using hw-address instead
of duid, omiting option-data, changing reservation-mode, adding rapid-commit
and commenting out other options.

So far no luck :(

Any hints as to what I'm doing wrong will be much appreciated.


Here's some more of my setup and logs:

[root@kea] # mysql kea --table < view_reservations.sql
+---------+------------------------------+----------------------+-----------------+-----------------+--------------+-------------------+
| host_id | dhcp_identifier              | dhcp_identifier_name | 
dhcp4_subnet_id | dhcp6_subnet_id | ipv4_address | hostname          |
+---------+------------------------------+----------------------+-----------------+-----------------+--------------+-------------------+
|      61 | 30B5C204AA95                 | hw-address           |               
2 |            NULL | NNN.NN.NN.NN | host02.domain.tld |
|      62 | 0001000120C0AEEE30B5C204AA95 | duid                 |            
NULL |               1 | NULL         | host02.domain.tld |
+---------+------------------------------+----------------------+-----------------+-----------------+--------------+-------------------+
+---------+------------------------+------------+------+
| host_id | address                | prefix_len | type |
+---------+------------------------+------------+------+
|      62 | 2800:NNNN::NNN:NN:NN:NN |        128 |    0 |
+---------+------------------------+------------+------+

[root@kea] # cat view_reservations.sql
SELECT
    h.host_id, HEX(h.dhcp_identifier) AS dhcp_identifier, i.name AS 
dhcp_identifier_name,
    h.dhcp4_subnet_id AS dhcp4_subnet_id, h.dhcp6_subnet_id AS dhcp6_subnet_id,
    INET_NTOA(h.ipv4_address) AS ipv4_address, h.hostname AS hostname
FROM
    hosts AS h INNER JOIN
    host_identifier_type AS i ON h.dhcp_identifier_type = i.type;

SELECT
    r.host_id, r.address, r.prefix_len, r.type
FROM
    ipv6_reservations AS r INNER JOIN hosts AS h ON r.host_id = h.host_id;



In /var/log/kea-dhcp6.log I get:

[root@kea] # tail -F /var/log/kea-dhcp6.log
2017-06-12 18:39:21.561 DEBUG [kea-dhcp6.packets/7412] DHCP6_BUFFER_RECEIVED 
received buffer from fe80::32b5:c2ff:fe04:aa95:546 to ff02::1:2:0 over 
interface wan0
2017-06-12 18:39:21.561 DEBUG [kea-dhcp6.options/7412] DHCP6_BUFFER_UNPACK 
parsing buffer received from fe80::32b5:c2ff:fe04:aa95 to ff02::1:2 over 
interface wan0
2017-06-12 18:39:21.561 DEBUG [kea-dhcp6.packets/7412] DHCP6_PACKET_RECEIVED 
duid=[00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95], tid=0x937673: SOLICIT (type 
1) 
received from fe80::32b5:c2ff:fe04:aa95 to ff02::1:2 on interface wan0
2017-06-12 18:39:21.561 DEBUG [kea-dhcp6.packets/7412] DHCP6_QUERY_DATA 
duid=[00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95], tid=0x937673, packet details: 
localAddr=[ff02::1:2]:0 remoteAddr=[fe80::32b5:c2ff:fe04:aa95]:546
msgtype=1(SOLICIT), transid=0x937673
type=00001, len=00014: 00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95
type=00003(IA_NA), len=00012: iaid=3255085717, t1=3600, t2=5400
type=00006, len=00004: 23(uint16) 24(uint16)
type=00008, len=00002: 0 (uint16)
No relays traversed.

2017-06-12 18:39:21.561 DEBUG [kea-dhcp6.packets/7412] 
DHCP6_SUBNET_SELECTION_FAILED duid=[00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95], 
tid=0x937673: failed to 
select subnet for the client
2017-06-12 18:39:21.561 DEBUG [kea-dhcp6.leases/7412] 
DHCP6_PROCESS_IA_NA_REQUEST duid=[00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95], 
tid=0x937673: server is 
processing IA_NA option with iaid=3255085717 and hint=(no hint)
2017-06-12 18:39:21.562 DEBUG [kea-dhcp6.options/7412] 
DHCP6_ADD_STATUS_CODE_FOR_IA duid=[00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95], 
tid=0x937673: adding Status 
Code to IA with iaid=3255085717: NoAddrsAvail(2) "Server could not select 
subnet for this client"
2017-06-12 18:39:21.562 DEBUG [kea-dhcp6.packets/7412] DHCP6_RESPONSE_DATA 
responding with packet type 2 data is localAddr=[ff02::1:2]:547 
remoteAddr=[fe80::32b5:c2ff:fe04:aa95]:546
msgtype=2(ADVERTISE), transid=0x937673
type=00001, len=00014: 00:01:00:01:20:c0:ae:ee:30:b5:c2:04:aa:95
type=00002, len=00014: 00:01:00:01:20:b2:20:32:30:b5:c2:04:c9:54
type=00003(IA_NA), len=00064: iaid=3255085717, t1=0, t2=0,
options:
  type=00013, len=00048: NoAddrsAvail(2) "Server could not select subnet for 
this client"
type=00023, len=00032: 2800:NNNN::NNN:NN:NN:NN 2800:NNNN::NNN:NN:NN:NN
type=00024, len=00026: "domain1.tld." (fqdn) "domain2.tld." (fqdn)
No relays traversed.

2017-06-12 18:39:21.562 DEBUG [kea-dhcp6.packets/7412] DHCP6_BUFFER_WAIT 
waiting for next DHCPv6 packet with timeout 1000 ms



And in the client:

[root@host02] # dhclient -v -6 -1 -lf /var/lib/dhclient/dhclient6--wan0.lease 
-pf /var/run/dhclient6-wan0.pid -H host02 wan0
Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on Socket/wan0
Sending on   Socket/wan0
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA c2:04:aa:95
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on wan0, interval 1040ms.
RCV: Advertise message on wan0 from fe80::32b5:c2ff:fe04:c954.
RCV:  X-- IA_NA c2:04:aa:95
RCV:  | X-- starts 1497303561
RCV:  | X-- t1 - renew  +0
RCV:  | X-- t2 - rebind +0
RCV:  | X-- [Options]
RCV:  X-- Server ID: 00:01:00:01:20:b2:20:32:30:b5:c2:04:c9:54
IA_NA status code NoAddrsAvail: "Server could not select subnet for this client"
PRC: Lease failed to satisfy.



My config:

[root@kea] # cat /etc/kea/kea.conf
{
  "Dhcp4": {
// Omited for brevity, can provide if needed
  },
  "Dhcp6": {
    "interfaces-config": {
        "interfaces": [ "wan0" ]
    },
    "control-socket": {
        "socket-type": "unix",
        "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
    },
    "lease-database": {
        "type": "mysql",
        "name": "kea",
        "user": "kea",
        "password": "REDACTED",
        "host": "localhost"
    },
    "hosts-database": {
        "type": "mysql",
        "name": "kea",
        "user": "kea",
        "password": "REDACTED",
        "host": "localhost"
    },
    "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": "2800:NNNN::NNN:NN:NN:NN, 
2800:NNNN::NNN:NN:NN:NN" },
        { "name": "domain-search",       "data": "domain1.tld, domain2.tld" }
    ],
    "subnet6": [
        {
            "subnet": "2800:NNNN::/64",
            "reservation-mode": "out-of-pool",
            "rapid-commit": true,
            "id": 1
        }
    ]
  },
  "DhcpDdns": {
    "ip-address": "127.0.0.1",
    "port": 53001,
    "tsig-keys": [],
    "forward-ddns" : {},
    "reverse-ddns" : {}
  },
  "Logging": {
    "loggers": [
      {
        "name": "kea-dhcp4",
        "output_options": [
            { "output": "/var/log/kea-dhcp4.log" }
        ],
        "severity": "INFO",
        "debuglevel": 0
      },
      {
        "name": "kea-dhcp6",
        "output_options": [
            { "output": "/var/log/kea-dhcp6.log" }
        ],
        "severity": "DEBUG",
        "debuglevel": 99
      },
      {
        "name": "kea-dhcp-ddns",
        "output_options": [
            { "output": "/var/log/kea-ddns.log" }
        ],
        "severity": "INFO",
        "debuglevel": 0
      }
    ]
  }
}

-- 
Ricardo J. Barberis
Usuario Linux Nº 250625: http://counter.li.org/
Usuario LFS Nº 5121: http://www.linuxfromscratch.org/
Senior SysAdmin / IT Architect - www.DonWeb.com
_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to