<div dir="ltr"><div>Hey KEA-Crew,</div><div><br></div><div>I've been banging my head against the wall trying to figure out how to make this work. </div><div><br></div><div>I've got a KEA server that needs to field requests from a few dhcrelays:<br><br>"relay": {</div>                                     "ip-addresses": [ "10.0.23.3", "10.0.23.2" ]<br>                            },<div><br>And right now I've been testing things with a single subnet:</div><div><br></div><div>"subnet": "<a href="http://172.104.222.0/24">172.104.222.0/24</a>",<br>                                          "pools": [ { "pool":  "172.104.222.1 - 172.104.222.255" } ],<br></div><div><br></div><div>and a single host reservation:<br><br></div><div>"hw-address": "d0:50:99:d4:f6:e8",<br>                                                          "ip-address": "172.104.222.224",<br>                                                          "client-classes": [ "cmullenstest" ],<br>                                                             "hostname": "cmullentest"<br></div><div><br></div><div>But I can't seem to get KEA to match my requests with this reservation and I keep getting:<br><br>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<br></div><div><br></div><div>I can see the request come in:</div><div><br></div><div>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<br>DEBUG DHCP4_QUERY_DATA [hwtype=1 d0:50:99:d4:f6:e8], cid=[no info], tid=0xc0a7c432, packet details: local_address=<a href="http://45.79.162.15:67">45.79.162.15:67</a>, remote_address=<a href="http://10.0.23.3:67">10.0.23.3:67</a>, msg_type=DHCPDISCOVER (1), transid=0xc0a7c432,<br>options:<br>  type=012, len=009: "localhost" (string)<br>  type=053, len=001: 1 (uint8)<br>  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)<br>  type=082, len=033:,<br>options:<br>    type=001, len=005: 76:6c:61:6e:33<br>    type=002, len=018: 31:63:3a:33:34:3a:64:61:3a:31:62:3a:31:36:3a:30:30:0a<br>    type=005, len=004: 17:5c:10:02<br></div><div><br></div><div><br></div><div>And I can see that upon starting KEA my reservation is seen (I think):</div><div><br></div><div>INFO  DHCPSRV_CFGMGR_SOCKET_TYPE_SELECT using socket type udp<br>INFO  DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth0<br>INFO  DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: <a href="http://172.104.222.0/24">172.104.222.0/24</a> with params: t1=900, t2=1800, valid-lifetime=3600<br>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<br>DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 1, identified by hwaddr=D05099D4F6E8<br>DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=D05099D4F6E8<br>DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=D05099D4F6E8, found 0 host(s)<br>DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=D05099D4F6E8<br>DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id 1 and IPv4 address 172.104.222.224<br>DEBUG HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address 172.104.222.224<br>DEBUG HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 172.104.222.224, found 0 host(s)<br>DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 1 and address 172.104.222.224<br>DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 1, identified by hwaddr=D05099D4F6E8<br>DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=D05099D4F6E8<br>DEBUG HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=D05099D4F6E8, found 0 host(s)<br>DEBUG HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=D05099D4F6E8<br>DEBUG DHCPSRV_CFGMGR_ADD_SUBNET4 adding subnet <a href="http://172.104.222.0/24">172.104.222.0/24</a><br></div><div><br></div><div>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. <br><br>Here's my current config:</div><div><br></div><div>{<br><br>   "Dhcp4": {<br>          "client-classes": [<br>                 {<br>                             "name": "cmullenstest"<br>                    }<br>             ],<br>            "interfaces-config": {<br>                      "interfaces": [ "eth0" ],<br>                 "dhcp-socket-type": "udp"<br>         },<br>            "control-socket": {<br>                 "socket-type": "unix",<br>                    "socket-name": "/tmp/kea4-ctrl-socket"<br>            },<br>    <br>              "lease-database": {<br>                 "type": "memfile",<br>                        "lfc-interval": 3600<br>                },<br>            "expired-leases-processing": {<br>                      "reclaim-timer-wait-time": 10,<br>                      "flush-reclaimed-timer-wait-time": 25,<br>                      "hold-reclaimed-time": 3600,<br>                        "max-reclaim-leases": 100,<br>                  "max-reclaim-time": 250,<br>                    "unwarned-reclaim-cycles": 5<br>                },<br>            "renew-timer": 900,<br>         "rebind-timer": 1800,<br>               "valid-lifetime": 3600,<br>             "option-data": [<br>                    {<br>                             "name": "domain-name-servers",<br>                            "data": "96.126.106.5, 50.116.58.5, 50.116.62.5"<br>                  },<br>                    {<br>                             "name": "domain-name",<br>                            "data": "<a href="http://members.linode.com">members.linode.com</a>"<br>                        },<br>                    {<br>                             "name": "default-ip-ttl",<br>                         "data": "0xf0"<br>                    }<br>             ],<br>            "shared-networks": [<br>                        {<br>                             "name": "poc_subnets",<br>                            "relay": {<br>                                  "ip-addresses": [ "10.0.23.3", "10.0.23.2" ]<br>                            },<br>                            "subnet4": [<br>                                        {<br>                                             "subnet": "<a href="http://172.104.222.0/24">172.104.222.0/24</a>",<br>                                         "pools": [ { "pool":  "172.104.222.1 - 172.104.222.255" } ],<br>                                           "reservations": [<br>                                                   {<br>                                                             "hw-address": "d0:50:99:d4:f6:e8",<br>                                                                "ip-address": "172.104.222.224",<br>                                                          "client-classes": [ "cmullenstest" ],<br>                                                             "hostname": "cmullentest"<br>                                                 }<br>                                             ],<br>                                            "option-data": [<br>                                                    {<br>                                                             "name": "routers",<br>                                                                "data": "172.104.222.1"<br>                                                   }<br>                                             ]<br>                                     }<br>                             ]<br>                     } <br>            ],<br>            "loggers": [<br>                {<br>                     "name": "kea-dhcp4",<br>                      "output_options": [<br>                         {<br>                                     "output": "stdout",<br>                                       "pattern": "%-5p %m\n"<br>                            }<br>                     ],<br>                    "severity": "DEBUG",<br>                      "debuglevel": 99<br>            }<br>       ]<br>  }<br>}<br><br>Any insight or advice here would be a huge respite for my battered brain. <br><br>Much thanks and all the best,</div><div>Conor Mullen</div></div>