[Kea-users] KEA shared-network using dhcrelay not recognizing host reservation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] KEA shared-network using dhcrelay not recognizing host reservation

Conor Mullen
Hey KEA-Crew,

I've been banging my head against the wall trying to figure out how to make this work. 

I've got a KEA server that needs to field requests from a few dhcrelays:

"relay": {
"ip-addresses": [ "10.0.23.3", "10.0.23.2" ]
},

And right now I've been testing things with a single subnet:

"subnet": "172.104.222.0/24",
"pools": [ { "pool":  "172.104.222.1 - 172.104.222.255" } ],

and a single host reservation:

"hw-address": "d0:50:99:d4:f6:e8",
"ip-address": "172.104.222.224",
"client-classes": [ "cmullenstest" ],
"hostname": "cmullentest"

But I can't seem to get KEA to match my requests with this reservation and I keep getting:

DEBUG DHCP4_SUBNET_SELECTION_FAILED [hwtype=1 d0:50:99:d4:f6:e8], cid=[no info], tid=0xc0a7c432: failed to select subnet for the client

I can see the request come in:

DEBUG DHCP4_PACKET_RECEIVED [hwtype=1 d0:50:99:d4:f6:e8], cid=[no info], tid=0xc0a7c432: DHCPDISCOVER (type 1) received from 10.0.23.3 to 45.79.162.15 on interface eth0
DEBUG DHCP4_QUERY_DATA [hwtype=1 d0:50:99:d4:f6:e8], cid=[no info], tid=0xc0a7c432, packet details: local_address=45.79.162.15:67, remote_address=10.0.23.3:67, msg_type=DHCPDISCOVER (1), transid=0xc0a7c432,
options:
  type=012, len=009: "localhost" (string)
  type=053, len=001: 1 (uint8)
  type=055, len=013: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8) 6(uint8) 119(uint8) 12(uint8) 44(uint8) 47(uint8) 26(uint8) 121(uint8) 42(uint8)
  type=082, len=033:,
options:
    type=001, len=005: 76:6c:61:6e:33
    type=002, len=018: 31:63:3a:33:34:3a:64:61:3a:31:62:3a:31:36:3a:30:30:0a
    type=005, len=004: 17:5c:10:02


And I can see that upon starting KEA my reservation is seen (I think):

INFO  DHCPSRV_CFGMGR_SOCKET_TYPE_SELECT using socket type udp
INFO  DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth0
INFO  DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 172.104.222.0/24 with params: t1=900, t2=1800, valid-lifetime=3600
DEBUG HOSTS_CFG_ADD_HOST add the host for reservations: hwaddr=D05099D4F6E8 ipv4_subnet_id=1 hostname=cmullenmanGOGOGOGOGO ipv4_reservation=172.104.222.224 siaddr=(no) sname=(empty) file=(empty) key=(empty) ipv6_reservations=(none) dhcp4_class0=cmullenstest
DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 1, identified by hwaddr=D05099D4F6E8
DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=D05099D4F6E8
DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=D05099D4F6E8, found 0 host(s)
DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=D05099D4F6E8
DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id 1 and IPv4 address 172.104.222.224
DEBUG HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address 172.104.222.224
DEBUG HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 172.104.222.224, found 0 host(s)
DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 1 and address 172.104.222.224
DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 1, identified by hwaddr=D05099D4F6E8
DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=D05099D4F6E8
DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=D05099D4F6E8, found 0 host(s)
DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=D05099D4F6E8
DEBUG DHCPSRV_CFGMGR_ADD_SUBNET4 adding subnet 172.104.222.0/24

But for the life of me I can't get KEA to actually hand out an IP and even without the reservation I'd think it would try to send out something. At this point it feels like the fact that the request is coming in over a dhcrelay isn't being respected. 

Here's my current config:

{

"Dhcp4": {
"client-classes": [
{
"name": "cmullenstest"
}
],
"interfaces-config": {
"interfaces": [ "eth0" ],
"dhcp-socket-type": "udp"
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea4-ctrl-socket"
},

"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": 900,
"rebind-timer": 1800,
"valid-lifetime": 3600,
"option-data": [
{
"name": "domain-name-servers",
"data": "96.126.106.5, 50.116.58.5, 50.116.62.5"
},
{
"name": "domain-name",
"data": "members.linode.com"
},
{
"name": "default-ip-ttl",
"data": "0xf0"
}
],
"shared-networks": [
{
"name": "poc_subnets",
"relay": {
"ip-addresses": [ "10.0.23.3", "10.0.23.2" ]
},
"subnet4": [
{
"subnet": "172.104.222.0/24",
"pools": [ { "pool":  "172.104.222.1 - 172.104.222.255" } ],
"reservations": [
{
"hw-address": "d0:50:99:d4:f6:e8",
"ip-address": "172.104.222.224",
"client-classes": [ "cmullenstest" ],
"hostname": "cmullentest"
}
],
"option-data": [
{
"name": "routers",
"data": "172.104.222.1"
}
]
}
]
}
],
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "stdout",
"pattern": "%-5p %m\n"
}
],
"severity": "DEBUG",
"debuglevel": 99
}
 ]
}
}

Any insight or advice here would be a huge respite for my battered brain. 

Much thanks and all the best,
Conor Mullen

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users