T1 Renewal of lease in Shared subnet to class restricted pool is not working.
We have two pools for a serviceprovider network. Customers by default get a CGNAT ip, but we whitelist users who needs a public ip using class public globally. The result seems to be that users in public class works when lease is first done via GI but for T1 release the Kea does not put them in the correct class and therefore blocks them from updating the lease.
The config is quite simple - pasting in relevant sections. The GIs for inital request are on 100.96.0.5-100.96.3.254.
"client-classes":[
{
"name":"public"
},
{
"name":"nat",
"test":"not member('public')"
}
],
"reservations": [
// Public to pool
{
"hw-address": "fc:34:97:5c:cb:58",
"client-classes": [ "public" ]
},
{
"valid-lifetime":3600,
// "renew-timer":600,
// "rebind-timer":1000,
"name":"Open Network",
"subnet4":[
{
"id":555,
"pools":[
{
"pool":"181.23.35.130-185.23.35.158"
}
],
"subnet":"181.23.35.128/27",
"client-class":"public"
}
],
"option-data":[
{
"name":"routers",
"data":"181.23.35.129"
}
]
},
{
"id": 222,
"pools":[
{
"pool":"100.96.4.1 - 100.96.127.254"
}
],
"subnet":"100.96.0.0/16",
"client-class":"nat",
"option-data":[
{
"name":"routers",
"data":"100.96.0.60"
}
]
}
]
},
This is the T1 renew that fails. We suspect the subnet selection fails since the class is not set for some odd reason.
112 14:23:45.644 kea-dhcp4.packets DHCP4_BUFFER_RECEIVED received buffer from 181.23.35.140:68 to 1.1.1.8:67 over interface eth0
112 14:23:45.644 kea-dhcp4.callouts HOOKS_CALLOUTS_BEGIN begin all callouts for hook buffer4_receive
112 14:23:45.644 kea-dhcp4.callouts HOOKS_CALLOUT_CALLED hooks library with index 3 has called a callout on hook buffer4_receive that has address 0x7f1a70d0fa70 (callout duration: 0.146 ms)
112 14:23:45.644 kea-dhcp4.callouts HOOKS_CALLOUTS_COMPLETE completed callouts for hook buffer4_receive (total callouts duration: 0.146 ms)
112 14:23:45.644 kea-dhcp4.hooks DHCP4_HOOK_BUFFER_RCVD_SKIP received buffer from 181.23.35.140 to 1.1.1.8 over interface eth0 is not parsed because a callout set the next step to SKIP.
112 14:23:45.644 kea-dhcp4.eval EVAL_DEBUG_MEMBER Checking membership of 'public', pushing result 'false'
112 14:23:45.644 kea-dhcp4.eval EVAL_DEBUG_NOT Popping 'false' pushing 'true'
112 14:23:45.644 kea-dhcp4.options EVAL_RESULT Expression nat evaluated to 1
112 14:23:45.645 kea-dhcp4.packets DHCP4_PACKET_RECEIVED [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: DHCPREQUEST (type 3) received from 181.23.35.140 to 1.1.1.8 on interface eth0
112 14:23:45.645 kea-dhcp4.packets DHCP4_QUERY_DATA [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348, packet details: local_address=1.1.1.8:67, remote_address=181.23.35.140:68, msg_typ>
options:
type=053, len=001: 3 (uint8)
type=055, len=009: 1(uint8) 3(uint8) 6(uint8) 12(uint8) 15(uint8) 28(uint8) 33(uint8) 42(uint8) 249(uint8)
type=057, len=002: 1492 (uint16)
type=060, len=012: "udhcp 1.17.4" (string)
type=061, len=007: 01:fc:34:97:5c:cb:58
type=082, len=062:,
options:
type=001, len=014: 73:69:67:32:31:2d:62:66:31:7c:31:30:30:35
type=002, len=021: 4d:4d:2d:42:4e:47:2d:53:45:2d:53:7c:66:72:65:2d:73:65:63:32:31
type=006, len=021: 53:45:52:2d:48:53:49:2d:4f:31:30:30:30:30:31:37:32:30:38:38:35
112 14:23:45.645 kea-dhcp4.dhcpsrv DHCPSRV_SUBNET4_SELECT_NO_RAI_OPTIONS No RAI options found to use for subnet selection.
112 14:23:45.645 kea-dhcp4.dhcpsrv DHCPSRV_SUBNET4_SELECT_NO_RELAY_ADDRESS Relay address (giaddr) in client packet is empty.
112 14:23:45.645 kea-dhcp4.dhcpsrv DHCPSRV_SUBNET4_SELECT_BY_ADDRESS_NO_MATCH No subnet matches address: 181.23.35.140
112 14:23:45.645 kea-dhcp4.packets DHCP4_SUBNET_SELECTION_FAILED [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: failed to select subnet for the client
112 14:23:45.645 kea-dhcp4.dhcp4 DHCP4_CLASS_ASSIGNED [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: client packet has been assigned to the following class(es): UNKNOWN
112 14:23:45.645 kea-dhcp4.dhcp4 DHCP4_CLASS_ASSIGNED [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: client packet has been assigned to the following class(es): ALL, HA_kea1, VENDOR_CLASS_u>
112 14:23:45.645 kea-dhcp4.callouts HOOKS_CALLOUTS_BEGIN begin all callouts for hook leases4_committed
112 14:23:45.645 kea-dhcp4.ha-hooks HA_LEASES4_COMMITTED_NOTHING_TO_UPDATE [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: leases4_committed callout was invoked without any leases
112 14:23:45.645 kea-dhcp4.callouts HOOKS_CALLOUT_CALLED hooks library with index 3 has called a callout on hook leases4_committed that has address 0x7f1a70d0faf0 (callout duration: 0.123 ms)
112 14:23:45.645 kea-dhcp4.callouts HOOKS_CALLOUTS_COMPLETE completed callouts for hook leases4_committed (total callouts duration: 0.123 ms)
112 14:23:45.645 kea-dhcp4.options DHCP4_PACKET_PACK [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: preparing on-wire format of the packet to be sent
112 14:23:45.646 kea-dhcp4.packets DHCP4_PACKET_SEND [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: trying to send packet DHCPNAK (type 6) from 1.1.1.8:67 to 181.23.35.140:68 on int>
112 14:23:45.646 kea-dhcp4.packets DHCP4_RESPONSE_DATA [hwtype=1 fc:34:97:5c:cb:58], cid=[01:fc:34:97:5c:cb:58], tid=0x19fe2348: responding with packet DHCPNAK (type 6), packet details: local_address=181.23.35.254:6>
options:
type=053, len=001: 6 (uint8)
type=054, len=004: 1.1.1.8
type=061, len=007: 01:fc:34:97:5c:cb:58
type=082, len=062:,
options:
type=001, len=014: 73:69:67:32:31:2d:62:66:31:7c:31:30:30:35
type=002, len=021: 4d:4d:2d:42:4e:47:2d:53:45:2d:53:7c:66:72:65:2d:73:65:63:32:31
type=006, len=021: 53:45:52:2d:48:53:49:2d:4f:31:30:30:30:30:31:37:32:30:38:38:35