[Kea-users] subnet full - reselect

fviktor viktor at ferenczi.eu
Mon Sep 17 16:53:47 UTC 2018


I have the same problem.

Simple setup with two subnets, one address available in each:

{
  "Dhcp4": {
    "expired-leases-processing": {
      "flush-reclaimed-timer-wait-time": 25,
      "hold-reclaimed-time": 3600,
      "max-reclaim-leases": 100,
      "max-reclaim-time": 250,
      "reclaim-timer-wait-time": 10,
      "unwarned-reclaim-cycles": 5
    },
    "lease-database": {
      "type": "memfile"
    },
    "interfaces-config": {
        "interfaces": [
            "br0/10.10.128.1",
            "br0/10.10.128.5"
        ],
        "dhcp-socket-type": "raw"
    },
    "option-data": [
      {
        "data": "10.10.128.1",
        "name": "domain-name-servers"
      },
      {
        "csv-format": false,
        "data": "056e6574656d096d6963726f736f667403636f6d00",
        "name": "domain-search"
      }
    ],
    "subnet4": [
      {
        "id": 1,
        "option-data": [
          {
            "data": "10.10.128.1",
            "name": "routers"
          }
        ],
        "relay": {
            "ip-address": "10.10.128.1"
        },
        "pools": [
          {
            "pool": "10.10.128.2/32"
          }
        ],
        "subnet": "10.10.128.0/30"
      },
      {
        "id": 2,
        "option-data": [
          {
            "data": "10.10.128.5",
            "name": "routers"
          }
        ],
        "relay": {
            "ip-address": "10.10.128.5"
        },
        "pools": [
          {
            "pool": "10.10.128.6/32"
          }
        ],
        "subnet": "10.10.128.4/30"
      }
    ],
    "valid-lifetime": 120
  },
  "Logging": {
    "loggers": [
      {
        "debuglevel": 99,
        "name": "kea-dhcp4",
        "output_options": [
          {
            "output": "/var/log/kea-dhcp4.log"
          }
        ],
        "severity": "DEBUG"
      }
    ]
  }
}

First client gets the IP from the first subnet assigned as expected:

address,hwaddr,client_id,valid_lifetime,expire,subnet_id,fqdn_fwd,fqdn_rev,hostname,state
10.10.128.2,f2:00:00:00:b1:00,,120,1537202052,1,0,0,virtual-test-blk1.,0

Second client does not get an IP, but instead an error is logged by Kea:

2018-09-17 16:33:22.062 DEBUG [kea-dhcp4.dhcpsrv/13520]
DHCPSRV_MEMFILE_GET_SUBID_HWADDR
obtaining IPv4 lease for subnet ID 1 and hardware address hwtype=1
f2:00:00:00:b1:01
2018-09-17 16:33:22.062 DEBUG [kea-dhcp4.alloc-engine/13520]
ALLOC_ENGINE_V4_OFFER_NEW_LE
ASE allocation engine will try to offer new lease to the client [hwtype=1
f2:00:00:00:b1:
01], cid=[no info], tid=0xa1f8655b
2018-09-17 16:33:22.062 DEBUG [kea-dhcp4.hosts/13520]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS
4 get one host with reservation for subnet id 1 and IPv4 address 10.10.128.2
2018-09-17 16:33:22.063 DEBUG [kea-dhcp4.hosts/13520]
HOSTS_CFG_GET_ALL_ADDRESS4 get all
hosts with reservations for IPv4 address 10.10.128.2
2018-09-17 16:33:22.063 DEBUG [kea-dhcp4.hosts/13520]
HOSTS_CFG_GET_ALL_ADDRESS4_COUNT us
ing address 10.10.128.2, found 0 host(s)
2018-09-17 16:33:22.063 DEBUG [kea-dhcp4.hosts/13520]
HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS
4_NULL host not found using subnet id 1 and address 10.10.128.2
2018-09-17 16:33:22.063 DEBUG [kea-dhcp4.dhcpsrv/13520]
DHCPSRV_MEMFILE_GET_ADDR4 obtaini
ng IPv4 lease for address 10.10.128.2
2018-09-17 16:33:22.063 WARN  [kea-dhcp4.alloc-engine/13520]
ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1 f2:00:00:00:b1:01], cid=[no info],
tid=0xa1f8655b: *failed to allocate an IPv4 address after 1 attempt(s)*
2018-09-17 16:33:22.063 DEBUG [kea-dhcp4.bad-packets/13520]
DHCP4_PACKET_NAK_0003 [hwtype=1 f2:00:00:00:b1:01], cid=[no info],
tid=0xa1f8655b: failed to advertise a lease, client sent ciaddr 0.0.0.0,
requested-ip-address (no address)

Tried to use the 10.10.128.2 - 10.10.128.2 syntax for the pool definition,
no change.
Tried to vary the relay and options, no change.
Tried to add/remove subnet IDs, same problem.
Tried to add interface definition to each subnet, that broke address
allocation completely.
Tried to define just br0 in interfaces-config, that resulted in multiple
responses being sent.

*Could you please give us the simplest working configuration for this case
of multiple subnets with a small (single address) pool each, so we can use
it as an example?
*

Thank you.



--
Sent from: http://kea-users.7364.n8.nabble.com/



More information about the Kea-users mailing list