[Kea-users] DHCP4_SUBNET_SELECTION_FAILED -> DHCP4_PACKET_NAK_0001

Hreiðar Jóelsson hreidar.joelsson at gagnaveita.is
Fri Oct 4 13:12:50 UTC 2019


Hi, I'm struggling with getting KEA to allocate addresses when on the same local LAN as the clients. I'm using perfdhcp to test my setup with out any luck. The setup is working when the dhcp packages are coming through a relay. The config is slightly different though.

Here below is my config and the log generated when perfdhcp sends one package. I've commented out my hook code to simplify the setup.

## perfdhcp
perfdhcp -4 -l eth0 -e address-only -R 1 -r 1 -n 1 -x aeist

## kea-dhcp4 config
{
  "Dhcp4": {
    "match-client-id": false,
    "control-socket": {
      "socket-name": "/tmp/kea-dhcp4-ctrl.sock",
      "socket-type": "unix"
    },
    "decline-probation-period": 3600,
    "dhcp4o6-port": 0,
    "echo-client-id": true,
    "valid-lifetime": 600,
    "rebind-timer": 300,
    "renew-timer": 150,
    "host-reservation-identifiers": [ "hw-address"],
    "option-def": [ ],
    "expired-leases-processing": {
      "flush-reclaimed-timer-wait-time": 0,
      "hold-reclaimed-time": 0,
      "max-reclaim-leases": 0,
      "max-reclaim-time": 0,
      "reclaim-timer-wait-time": 30,
      "unwarned-reclaim-cycles": 5
    },
    "interfaces-config": {
      "interfaces": [ "ens33/83.173.0.80" ],
      "dhcp-socket-type": "raw"
    },
    "lease-database": {
      "type": "postgresql",
      "name": "kea_ag06",
      "user": "kea_admin",
      "password": "JkFdfd04.g55e8yH4f",
      "host": "postgres-cluster1",
      "port": 5432
    },
    "option-data": [
      {
        "always-send": false,
        "code": 6,
        "csv-format": true,
        "data": "83.173.0.1, 83.173.0.33",
        "name": "domain-name-servers",
        "space": "dhcp4"
      },
      {
        "always-send": false,
        "code": 15,
        "csv-format": true,
        "data": "gagnaveita.is",
        "name": "domain-name",
        "space": "dhcp4"
      },
      {
        "always-send": false,
        "code": 119,
        "csv-format": true,
        "data": "gagnaveita.is",
        "name": "domain-search",
        "space": "dhcp4"
      }
    ],
    "client-classes": [
      {
        "name": "restricted"
      },
      {
        "name": "unrestricted"
      }
    ],
    "subnet4": [ ],
    "shared-networks": [
      {
        "name": "GR-Internet-AG06",
        "option-data": [ ],
        "reservation-mode": "all",
        "interface": "ens33",
        "subnet4": [
          {
            "user-context": { "subnet-name": "GR-INTERNET-AG06-R1" },
            "4o6-interface": "",
            "4o6-interface-id": "",
            "4o6-subnet": "",
            "boot-file-name": "",
            "next-server": "0.0.0.0",
            "option-data": [
              {
                "always-send": false,
                "code": 3,
                "csv-format": true,
                "data": "10.206.0.1",
                "name": "routers",
                "space": "dhcp4"
              }
            ],
            "pools": [
              {
                "option-data": [ ],
                "pool": "10.206.0.2-10.206.255.254"
              }
            ],
            "rebind-timer": 300,
            "renew-timer": 150,
            "reservation-mode": "out-of-pool",
            "server-hostname": "",
            "subnet": "10.206.0.0/16",
            "valid-lifetime": 600
          },
          {
            "user-context": { "subnet-name": "GR-INTERNET-AG06-U1" },
            "4o6-interface": "",
            "4o6-interface-id": "",
            "4o6-subnet": "",
            "boot-file-name": "",
            "next-server": "0.0.0.0",
            "option-data": [
              {
                "always-send": false,
                "code": 3,
                "csv-format": true,
                "data": "172.16.0.1",
                "name": "routers",
                "space": "dhcp4"
              }
            ],
            "pools": [
              {
                "option-data": [ ],
                "pool": "172.16.0.2-172.16.255.254"
              }
            ],
            "rebind-timer": 300,
            "renew-timer": 150,
            "reservation-mode": "all",
            "reservations": [ ],
            "server-hostname": "",
            "subnet": "172.16.0.0/16",
            "valid-lifetime": 600
          }
        ]
      }
    ]
  },
  "Logging": {
    "loggers": [
      {
        "debuglevel": 99,
        "name": "kea-dhcp4",
        "output_options": [
          {
            "flush": true,
            "maxsize": 10485760,
            "maxver": 6,
            "output": "/usr/local/var/log/kea-dhcp4.log"
          }
        ],
        "severity": "DEBUG"
      }
    ]
  }
}

## kea-dhcp4.log
2019-10-04 13:03:14.266 DEBUG [kea-dhcp4.packets/1] DHCP4_BUFFER_RECEIVED received buffer from 83.173.0.81:67 to 255.255.255.255:67 over interface ens33
2019-10-04 13:03:14.267 DEBUG [kea-dhcp4.options/1] DHCP4_BUFFER_UNPACK parsing buffer received from 83.173.0.81 to 255.255.255.255 over interface ens33
2019-10-04 13:03:14.267 DEBUG [kea-dhcp4.packets/1] DHCP4_PACKET_RECEIVED [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0: DHCPDISCOVER (type 1) received from 83.173.0.81 to 255.255.255.255 on interface ens33
2019-10-04 13:03:14.267 DEBUG [kea-dhcp4.packets/1] DHCP4_QUERY_DATA [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0, packet details: local_address=255.255.255.255:67, remote_address=83.173.0.81:67, msg_type=DHCPDISCOVER (1), transid=0x0,
options:
  type=053, len=001: 1 (uint8)
  type=055, len=007: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8) 6(uint8) 12(uint8)
  type=061, len=007: 01:00:0c:01:02:03:04
2019-10-04 13:03:14.268 DEBUG [kea-dhcp4.packets/1] DHCP4_SUBNET_SELECTION_FAILED [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0: failed to select subnet for the client
2019-10-04 13:03:14.268 DEBUG [kea-dhcp4.dhcp4/1] DHCP4_CLASS_ASSIGNED [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0: client packet has been assigned to the following class(es): UNKNOWN
2019-10-04 13:03:14.268 DEBUG [kea-dhcp4.dhcp4/1] DHCP4_CLASS_ASSIGNED [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0: client packet has been assigned to the following class(es): ALL, UNKNOWN
2019-10-04 13:03:14.268 DEBUG [kea-dhcp4.ddns/1] DHCP4_CLIENT_HOSTNAME_PROCESS [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0: processing client's Hostname option
2019-10-04 13:03:14.268 ERROR [kea-dhcp4.bad-packets/1] DHCP4_PACKET_NAK_0001 [hwtype=1 00:0c:01:02:03:04], cid=[01:00:0c:01:02:03:04], tid=0x0: failed to select a subnet for incoming packet, src 83.173.0.81, type DHCPDISCOVER


Kær kveðja / Best Regards,
Hreiðar Jóelsson
Netsérfræðingur IP netkerfis / Network Engineer
Netfang / E-mail: hreidar.joelsson at gagnaveita.is

[cid:image001.png at 01D57AB5.6C0E6690]
Smáratorgi 3, 201 Kópavogur, Iceland
Sími / Tel: +354 516 7777 | Póstur / Email: ljosleidarinn at ljosleidarinn.is

Vinsamlegast athugið að þessi tölvupóstur og viðhengi hans eru eingöngu ætluð þeim sem sendingin er stíluð á og gæti innihaldið upplýsingar sem eru trúnaðarmál. Hafir þú fyrir tilviljun, mistök eða án sérstakrar heimildar tekið við tölvupósti þessum og viðhengjum hans ber þér skv. 5. mgr. 47. gr. laga um fjarskipti nr. 81/2003 að gæta fyllsta trúnaðar, hvorki skrá upplýsingar hjá þér né notfæra þér þær á nokkurn hátt og tilkynna okkur samstundis um að þær hafi ranglega borist til þín. Vinsamlegast eyðið þeim að því loknu.

This e-mail message and any attachments is for the exclusive use of the intended recipient(s) and may contain confidential information.
If you are not the intended recipient, please uphold strict confidentiality and neither read, copy or make use of the content in any way.
Furthermore, please notify the sender immediately by replying to this message and delete all copies of the message.

[cid:image002.jpg at 01D57AB5.6C0E6690]
www.ljosleidarinn.is<https://www.ljosleidarinn.is>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20191004/0fe34666/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3609 bytes
Desc: image001.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20191004/0fe34666/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 55660 bytes
Desc: image002.jpg
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20191004/0fe34666/attachment.jpg>


More information about the Kea-users mailing list