[Kea-users] KEA IPv6 Configuration Help?

Garett garett at kea.nebo.zy.ca
Wed Apr 29 21:52:55 UTC 2015


So I've upgraded to the latest git version (e5c443b840d4da943476e413a415e9763c7eb383) to just confirm the no IPv6 subnets thing went away (it would be my luck that I'm actually getting an error that is also caused by a bug).  It did:

2015-04-29 12:03:48.383 INFO  [kea-dhcp6.dhcp6/2806] DHCP6_CONFIG_COMPLETE DHCPv6 server has completed configuration: added IPv6 subnets: 1; DDNS: disabled

And it starts up ... and that's that.

I've attached a full log and the full configuration file 

I'm running this on CentOS 7 so some of version of things might be different.  Here is the summary result on the configure:

       Kea source configure results:
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Package:
  Name:            kea 
  Version:         0.9.1-git
  Extended version:0.9.1-git (git e5c443b840d4da943476e413a415e9763c7eb383)
  OS Family:       Linux
  Using GNU sed:   yes 

C++ Compiler:
  CXX:             g++ 
  CXX_VERSION:     g++ (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
  DEFS:            -DHAVE_CONFIG_H
  CPPFLAGS:         -DOS_LINUX  -I$(top_srcdir)/ext/asio -I$(top_srcdir)/ext/coroutine -DASIO_DISABLE_THREADS=1
  CXXFLAGS:        -g -O2
  LDFLAGS:
  KEA_CXXFLAGS:     -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -Werror -fPIC

Python3:
  not installed

Boost:
  BOOST_VERSION:   1.53
  BOOST_INCLUDES:

OpenSSL:
  CRYPTO_VERSION:  OpenSSL 1.0.1e 11 Feb 2013
  CRYPTO_CFLAGS:   
  CRYPTO_INCLUDES: 
  CRYPTO_LDFLAGS:  
  CRYPTO_LIBS:     -lcrypto

Botan: no

Log4cplus:
  LOG4CPLUS_VERSION: 1.2.0
  LOG4CPLUS_INCLUDES: -I/opt/log4cplus/include
  LOG4CPLUS_LIBS:  -L/opt/log4cplus/lib -llog4cplus -pthread

Kea config backend:
  CONFIG_BACKEND:  JSON

MySQL:
  no

PostgreSQL:
  no

Features:
  

Developer:
  Enable Debugging: yes
  Google Tests: no
  Valgrind: found
  C++ Code Coverage: no
  Python Code Coverage: 
  Logger checks: no
  Generate Documentation: no


So I modified the main loop a bit to figure out if it was receiving it and rejecting it ...

2015-04-29 14:49:11.177 DEBUG [kea-dhcp6.dhcp6/30091] MAIN LOOP STARTED! 
2015-04-29 14:49:11.177 DEBUG [kea-dhcp6.dhcp6/30091] BEFORE try 
2015-04-29 14:49:11.177 DEBUG [kea-dhcp6.dhcp6/30091] BEFORE getIOServiceExecInterval 
2015-04-29 14:49:11.177 DEBUG [kea-dhcp6.dhcp6/30091] AFTER getIOServiceExecInterval 
2015-04-29 14:49:11.177 DEBUG [kea-dhcp6.dhcp6/30091] BEFORE receivePacket
2015-04-29 15:05:51.216 DEBUG [kea-dhcp6.dhcp6/30091] AFTER receivePacket
2015-04-29 15:05:51.216 DEBUG [kea-dhcp6.dhcp6/30091] AFTER try
2015-04-29 15:05:51.216 DEBUG [kea-dhcp6.dhcp6/30091] Timeout reached, returning to loop start!

So it never received the multicast ... looking through the code, I now find myself in the function receive6 in iface_mgr.cc in lib/dhcp ... not sure what to do from here, is there a way to test the ipv6 sockets?  I see a lot of test directories in here so I assume I could run some automated tests to see what is off ... 

It isn't a configuration issue ... even if the subnet was wrong, it would at least _hear_ the multicast packet ... 

--
Garett


----- Original Message -----
From: "Garett" <garett at kea.nebo.zy.ca>
To: "Marcin Siodelski" <marcin at isc.org>
Cc: kea-users at lists.isc.org
Sent: Wednesday, April 29, 2015 1:30:12 AM
Subject: Re: [Kea-users] KEA IPv6 Configuration Help?

I haven't seen anything useful in those logs.   Here is the logging bit of the configuration file:

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


This is the extent of the information in the logs from that:

2015-04-29 00:53:15.227 INFO  [kea-dhcp6.dhcp6/3386] DHCP6_STARTED Kea DHCPv6 server version 0.9.1 started
2015-04-29 00:54:02.668 DEBUG [kea-dhcp6.dhcp6/3386] DHCP6_COMMAND_RECEIVED received command shutdown, arguments: {  }
2015-04-29 00:54:02.669 DEBUG [kea-dhcp6.dhcp6/3386] DHCP6_SHUTDOWN_REQUEST shutdown of server requested
2015-04-29 00:54:02.669 INFO  [kea-dhcp6.dhcp6/3386] DHCP6_SHUTDOWN server shutdown
2015-04-29 00:54:02.669 DEBUG [kea-dhcp6.dhcpsrv/3386] DHCPSRV_CLOSE_DB closing currently open memfile database

The kea server isn't seeing the DHCP Solicit multicasts (or it's not noting them).   I know the machine can see them thanks to tcpdump ... I just don't know why kea can't see them.

I'm sort of floundering around lost.  My reading this evening tells me that 2001:db8::/32 is reserved for examples and testing ... so I figure I might as well use that one.

  "subnet6": [{
     "subnet": "2001:db8::/64",
     "pools": [ { "pool": "2001:db8::10-2001:db8::100" } ],
     "interface": "enp0s8"
  }]

ip is now 2001:db8::1/64

Still not doing anything differently.

--
Garett


----- Original Message -----
From: "Marcin Siodelski" <marcin at isc.org>
To: "Garett" <garett at kea.nebo.zy.ca>
Cc: kea-users at lists.isc.org
Sent: Tuesday, April 28, 2015 7:48:41 PM
Subject: Re: [Kea-users] KEA IPv6 Configuration Help?

If you're logging on the debug level there should be the record of the
Solicit packets coming in and what the server does with them. After
first configuration is complete the further log should go to the file
specified in  your configuration (which you don't show in your email)
but presumably <kea-build-dir>/var/log/kea-dhcp6.log. Can you share it?

Marcin

On 28.04.2015 18:04, Garett wrote:
> Alas, that didn't work either ... so I also went on to try some more changes to simplify things:
> 
>   "subnet6": [{
>      "subnet": "2004:db8::1/64",
>      "pools": [ { "pool": "2004:db8::10-2004:db8::100" } ],
>      "interface": "enp0s8"
>   }]
> 
> and change the IP on enp0s8 to 2004:db8::1/64   So this puts everything into the same network ... if it worked; alas it doesn't.
> 
> More log info ... if it helps.
> 
> Log:
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_CONFIG_START DHCPv6 server is processing the following configuration: { "interfaces-config": { "interfaces": [ "enp0s8" ] }, "lease-database": { "type": "memfile" }, "preferred-lifetime": 3000, "rebind-timer": 2000, "renew-timer": 1000, "subnet6": [ { "interface": "enp0s8", "pools": [ { "pool": "2004:db8::10-2004:db8::100" } ], "subnet": "2004:db8::1/64" } ], "valid-lifetime": 4000 }
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element interfaces-config
> 2015-04-28 18:56:59.737 INFO  [kea-dhcp6.dhcpsrv/2823] DHCPSRV_CFGMGR_ADD_IFACE listening on interface enp0s8
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element lease-database
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element preferred-lifetime
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element rebind-timer
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element renew-timer
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element subnet6
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcp6/2823] DHCP6_PARSER_CREATED created parser for configuration element valid-lifetime
> 2015-04-28 18:56:59.737 INFO  [kea-dhcp6.dhcp6/2823] DHCP6_CONFIG_NEW_SUBNET a new subnet has been added to configuration: 2004:db8::1/64 with params t1=1000, t2=2000, pref=3000, valid=4000
> 2015-04-28 18:56:59.737 DEBUG [kea-dhcp6.dhcpsrv/2823] DHCPSRV_CFGMGR_ADD_SUBNET6 adding subnet 2004:db8::1/64
> 2015-04-28 18:56:59.737 INFO  [kea-dhcp6.dhcpsrv/2823] DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=6
> 2015-04-28 18:56:59.737 INFO  [kea-dhcp6.dhcpsrv/2823] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /opt/kea/var/kea/kea-leases6.csv
> 2015-04-28 18:56:59.737 INFO  [kea-dhcp6.dhcp6/2823] DHCP6_CONFIG_COMPLETE DHCPv6 server has completed configuration: no IPv6 subnets!; DDNS: disabled
> 
> tcpdump:
> [root at server ~]# tcpdump -i enp0s8 -vv
> tcpdump: WARNING: enp0s8: no IPv4 address assigned
> tcpdump: listening on enp0s8, link-type EN10MB (Ethernet), capture size 65535 bytes
> 18:59:28.793090 IP6 (hlim 1, next-header UDP (17) payload length: 60) fe80::a00:27ff:febe:e078.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=8723d0 (client-ID hwaddr/time type 1 time 483563512 080027bee078) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_NA IAID:666820728 T1:3600 T2:5400))
> 18:59:29.874668 IP6 (hlim 1, next-header UDP (17) payload length: 60) fe80::a00:27ff:febe:e078.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=8723d0 (client-ID hwaddr/time type 1 time 483563512 080027bee078) (option-request DNS-server DNS-search-list) (elapsed-time 108) (IA_NA IAID:666820728 T1:3600 T2:5400))
> 18:59:32.138484 IP6 (hlim 1, next-header UDP (17) payload length: 60) fe80::a00:27ff:febe:e078.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=8723d0 (client-ID hwaddr/time type 1 time 483563512 080027bee078) (option-request DNS-server DNS-search-list) (elapsed-time 334) (IA_NA IAID:666820728 T1:3600 T2:5400))
> 18:59:36.805766 IP6 (hlim 1, next-header UDP (17) payload length: 60) fe80::a00:27ff:febe:e078.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=8723d0 (client-ID hwaddr/time type 1 time 483563512 080027bee078) (option-request DNS-server DNS-search-list) (elapsed-time 800) (IA_NA IAID:666820728 T1:3600 T2:5400))
> ...
> 
> 
> And the client:
> 
> [root at client ~]# dhclient -6 -v enp0s3 
> 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/enp0s3
> Sending on   Socket/enp0s3
> PRC: Soliciting for leases (INIT).
> XMT: Forming Solicit, 0 ms elapsed.
> XMT:  X-- IA_NA 27:be:e0:78
> XMT:  | X-- Request renew in  +3600
> XMT:  | X-- Request rebind in +5400
> XMT: Solicit on enp0s3, interval 1050ms.
> XMT: Forming Solicit, 1050 ms elapsed.
> XMT:  X-- IA_NA 27:be:e0:78
> XMT:  | X-- Request renew in  +3600
> XMT:  | X-- Request rebind in +5400
> XMT: Solicit on enp0s3, interval 2040ms.
> XMT: Forming Solicit, 3090 ms elapsed.
> XMT:  X-- IA_NA 27:be:e0:78
> XMT:  | X-- Request renew in  +3600
> XMT:  | X-- Request rebind in +5400
> XMT: Solicit on enp0s3, interval 4220ms.
> XMT: Forming Solicit, 7310 ms elapsed.
> XMT:  X-- IA_NA 27:be:e0:78
> XMT:  | X-- Request renew in  +3600
> XMT:  | X-- Request rebind in +5400
> XMT: Solicit on enp0s3, interval 8530ms.
> XMT: Forming Solicit, 15850 ms elapsed.
> XMT:  X-- IA_NA 27:be:e0:78
> XMT:  | X-- Request renew in  +3600
> XMT:  | X-- Request rebind in +5400
> XMT: Solicit on enp0s3, interval 16270ms.
> XMT: Forming Solicit, 32130 ms elapsed.
> XMT:  X-- IA_NA 27:be:e0:78
> XMT:  | X-- Request renew in  +3600
> XMT:  | X-- Request rebind in +5400
> XMT: Solicit on enp0s3, interval 31720ms.
> 
> 
> --
> Garett
> 
> ----- Original Message -----
> From: "Marcin Siodelski" <marcin at isc.org>
> To: "Garett" <garett at kea.nebo.zy.ca>
> Cc: kea-users at lists.isc.org
> Sent: Tuesday, April 28, 2015 6:47:36 PM
> Subject: Re: [Kea-users] KEA IPv6 Configuration Help?
> 
> 
> On 28.04.2015 16:58, Garett wrote:
>> That definitely makes sense; I had assumed that if I didn't limit it
>> to an interface, it would be valid for all (and since I only had one,
>> that that one would be the one).
>>
>> As it is, defining the interface doesn't appear to fixed the problem. 
>> I am still seeing dhcp6 solicits and no response from kea.
>>
> 
> Can you replace the  "pool": "2004:db8:1::/64" with something like
> "pool": "2004:db8:1::10-2004:db8:1::100" ?
> 
> Marcin
> 
_______________________________________________
Kea-users mailing list
Kea-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kea.conf
Type: application/octet-stream
Size: 589 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20150429/19fa46a5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kea-stdout.log
Type: text/x-log
Size: 4081 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20150429/19fa46a5/attachment.bin>


More information about the Kea-users mailing list