[Kea-users] Kea 1.4 flex-id option37 & release6

Alain Cocconi cocconi at canl.net
Fri Jul 6 18:07:10 UTC 2018


Hi

I've an issue with ipv6 release and flex-id.

During the SOLICIT, the flex-id retrieve the good option[37] value, but 
it never return the right one during the RELEASE, so the release never 
happens (timeout only is working)

Please help if possible

Thanks

See the logs :

msgtype=1(SOLICIT), transid=0xcd90b
type=00001, len=00010: 00:03:00:01:bc:16:65:99:9c:c0
type=00006, len=00006: 25(uint16) 23(uint16) 24(uint16)
type=00008, len=00002: 65535 (uint16)
type=00025(IA_PD), len=00012: iaid=196609, t1=0, t2=0
2 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=1,
link-address=::, peer-address=fe80::be16:65ff:fe99:9cc0, 2 option(s)
type=00018, len=00008: 04:06:00:0f:02:13:07:e1
type=00037, len=00012: 9 (uint32) 00068478AC3F2105 (binary)
relay[1]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=::, peer-address=fe80::be16:65ff:fe99:9cc0, 2 option(s)
type=00018, len=00029: 
46:58:31:36:44:55:43:5f:31:20:65:74:68:20:31:2f:31:2f:30:35:2f:31:31:2f:31:2f:31:2f:32
type=00037, len=00018: 3561 (uint32) 3234383334392F5448312F4E4F43 (binary)

2018-07-07 04:15:24.004 DEBUG [kea-dhcp6.callouts/26563] 
HOOKS_CALLOUTS_BEGIN begin all callouts for hook pkt6_receive
2018-07-07 04:15:24.005 DEBUG [kea-dhcp6.eval/26563] EVAL_DEBUG_OPTION 
Pushing option 37 with value 0x00000DE93234383334392F5448312F4E4F43
2018-07-07 04:15:24.005 DEBUG [kea-dhcp6.eval/26563] EVAL_DEBUG_STRING 
Pushing text string '4'
2018-07-07 04:15:24.005 DEBUG [kea-dhcp6.eval/26563] EVAL_DEBUG_STRING 
Pushing text string '6'
2018-07-07 04:15:24.005 DEBUG [kea-dhcp6.eval/26563] 
EVAL_DEBUG_SUBSTRING Popping length 6, start 4, string 
0x00000DE93234383334392F5448312F4E4F43 pushing result 0x323438333439
2018-07-07 04:15:24.005 INFO  [kea-dhcp6.flex-id-hooks/26563] 
FLEX_ID_EXPRESSION_EVALUATED Expression evaluated for packet to "248349" 
(size: 6)
2018-07-07 04:15:24.005 DEBUG [kea-dhcp6.flex-id-hooks/26563] 
FLEX_ID_EXPRESSION_HEX evaluated expression in hexadecimal form 
"32:34:38:33:34:39"
2018-07-07 04:15:24.005 DEBUG [kea-dhcp6.flex-id-hooks/26563] 
FLEX_ID_USED_AS_DUID using flexible identifier "00:00:32:34:38:33:34:39" 
as DUID
...

msgtype=8(RELEASE), transid=0xb3
type=00001, len=00010: 00:03:00:01:bc:16:65:99:9c:c0
type=00002, len=00014: 00:01:00:01:22:be:f0:ba:02:38:ab:04:7c:2e
type=00025(IA_PD), len=00041: iaid=196609, t1=0, t2=0,
options:
   type=00026(IAPREFIX), len=00025: prefix=xxxxxxxx/48, preferred-lft=0, 
valid-lft=0
2 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=1,
link-address=::, peer-address=fe80::be16:65ff:fe99:9cc0, 2 option(s)
type=00018, len=00008: 04:06:00:0f:02:13:07:e1
type=00037, len=00012: 9 (uint32) 00068478AC3F2105 (binary)
relay[1]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=::, peer-address=fe80::be16:65ff:fe99:9cc0, 2 option(s)
type=00018, len=00029: 
46:58:31:36:44:55:43:5f:31:20:65:74:68:20:31:2f:31:2f:30:35:2f:31:31:2f:31:2f:31:2f:32
type=00037, len=00022: 9 (uint32) 00000DE93234383334392F5448312F4E4F43 
(binary)

2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.callouts/26563] 
HOOKS_CALLOUTS_BEGIN begin all callouts for hook pkt6_receive
2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.eval/26563] EVAL_DEBUG_OPTION 
Pushing option 37 with value 0x0000000900000DE93234383334392F5448312F4E4F43
2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.eval/26563] EVAL_DEBUG_STRING 
Pushing text string '4'
2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.eval/26563] EVAL_DEBUG_STRING 
Pushing text string '6'
2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.eval/26563] 
EVAL_DEBUG_SUBSTRING Popping length 6, start 4, string 
0x0000000900000DE93234383334392F5448312F4E4F43 pushing result 0x00000DE932
34
2018-07-07 04:16:23.451 INFO  [kea-dhcp6.flex-id-hooks/26563] 
FLEX_ID_EXPRESSION_EVALUATED Expression evaluated for packet to "..
é24" (size: 6)
2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.flex-id-hooks/26563] 
FLEX_ID_EXPRESSION_HEX evaluated expression in hexadecimal form 
"00:00:0d:e9:32:34"
2018-07-07 04:16:23.451 DEBUG [kea-dhcp6.flex-id-hooks/26563] 
FLEX_ID_USED_AS_DUID using flexible identifier "00:00:00:00:0d:e9:32:34" 
as DUID

my config :

"Dhcp6": {
     "mac-sources": [ "remote-id" ],
     "relay-supplied-options": [ "18", "37" ],
     "host-reservation-identifiers": ["duid", "flex-id"], // add 
"flex-id" to reservation identifiers
     "hooks-libraries": [
         {
             "library": "/usr/local/lib/hooks/libdhcp_flex_id.so",
             "parameters": {
"identifier-expression":"substring(relay6[1].option[37].hex,4,6)",
                 "replace-client-id": true
             }
         },
         {
             "library": "/usr/local/lib/hooks/libdhcp_legal_log.so",
             "parameters": {
                 "path": "/usr/local/var/kea/",
                 "base-name":"forensic6"
             }
         }
     ],
     "interfaces-config": {
         "interfaces": [ "eth2/xxxxxxxx" ]
     },
     "control-socket": {
         "socket-type": "unix",
         "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
     },
     "hosts-database": {
          "type": "mysql",
          "name": "dhcp",
          "user": "dhcp",
          "password": "dhcp",
          "host": "x.x.x.x",
          "port": 3306
     },
     "lease-database": {
         "type": "mysql",
         "name": "dhcp",
         "user": "dhcp",
         "password": "dhcp",
         "host": "x.x.x.x",
         "port": 3306,
         "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": "xxxxxxx, yyyyyyy"
         }
     ],
     "subnet6": [
         {
             "subnet": "xxxxx/32",

             "pd-pools": [
                 {
                     "prefix": "xxxxxxx",
                     "prefix-len": 33,
                     "delegated-len": 48
                 }
             ]
         }
     ]
},
"Logging":
{
   "loggers": [
     {
         "name": "kea-dhcp6",
         "output_options": [
             {
                 "output": "/usr/local/var/log/kea-dhcp6.log"
             }
         ],
         "severity": "DEBUG",
         "debuglevel": 99
     }
   ]
}
}




More information about the Kea-users mailing list