Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Kea
Kea
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 357
    • Issues 357
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 49
    • Merge Requests 49
  • Packages
    • Packages
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #181

Closed
Open
Opened Oct 23, 2018 by Georg W.@wojtkowi
  • Report abuse
  • New issue
Report abuse New issue

reallocate IPv6-Addr with one Host and different DUIDs not working

name: Bug report
about: Reallocate IPv6-Address not working properly with PXE (or multiple OS)

I've tried to get some help using the kea-users mailing list months ago but I didn't get a solution to this problem. For now, I compiled myself a workaround into the code to get the IPv6 leases by hw-addr and not by duid. Details following:

Description

The Kea dhcp6 daemon doesn't reallocate (active) IPv6-leases for an OS after a successful PXE IPv6 address allocation.

Configuration

(configuration file is attached)

  • lease-database: postgresql
  • hosts-database: postgresql
  • mac-sources: client-link-addr-option only
  • host-reservation-identifiers: hw-address only

To Reproduce

Steps to reproduce the behavior:

  1. Run Kea dhcpv6-daemon with: "mac-sources": ["client-link-addr-option"] and "host-reservation-identifiers": ["hw-address"] and an IPv6 host reservation with hw-address as the specific reservation-id-type
  2. boot the PXE-System (or the first OS) first, everything works fine
  3. boot another OS (e.g. Debian) with this host, daemon answers with "Sorry, no address could be allocated."

Expected behavior

In the configuration file exists a parameter called "host-reservation-identifiers". Kea uses only these specific identifier types to get host reservations from the host database. To get all active Leases of a hostsystem, Kea should use the same Method like in the reservation procedure.

If the host boots up the first time with PXE, kea gets a request, gets the host-reservation and allocate this IPv6 with its hw-address. Now the host boots up with its real OS (e.g. Debian) and kea should search for a lease like it was searching for a host-reservation.

In our case:

Kea gets the mac-address from the clients client-link-addr-option and so Kea should search for active leases by the mac-address, because of the host-reservation-identifiers option.

Environment

  • Kea version: 1.4.0 (from gitlab)
  • OS: debian stretch
  • used database back-end: postgresql
  • no hooks were used Atachements

kea-dhcp6.conf

{
"Dhcp6": {
  "interfaces-config": {
    "interfaces": [ "eth0/2001:db8::8d:37:c0:f6" ]
  },
  "control-socket": {
    "socket-type": "unix",
    "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
  },
  "lease-database": {
    "type": "postgresql",
    "name": "kea",
    "user": "keauser",
    "password": "xxxxxx",
    "host": "localhost",
    "port": 5432
  },
  "hosts-database": {
    "readonly": true,
    "type": "postgresql",
    "name": "kea",
    "user": "keauser",
    "password": "xxxxxx",
    "host": "localhost",
    "port": 5432
  },
  "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": 1800,
        "rebind-timer": 2880,
        "valid-lifetime": 3600,
  "mac-sources": ["client-link-addr-option"],
  "host-reservation-identifiers": [ "hw-address" ],
  "subnet6": [
    {
      "subnet": "2001:db8:0:24::/64",
      "id": 24,
      "reservations": [
      ]
    }
  ]
},

// Logging configuration starts here. Kea uses different loggers to log various
// activities. For details (e.g. names of loggers), see Chapter 18.
"Logging":
{
  "loggers": [
    {
      "name": "kea-dhcp6",
      "output_options": [
        {
          "output": "/var/log/kea/kea-dhcp6.log",
                                  "maxsize": 26214400,
                                  "maxver": 8
        }
      ],
      "severity": "DEBUG",
      "debuglevel": 99
    }
  ]
}
}

hosts-table

host_id dhcp_identifier dhcp_identifier_type ...
01 0x00163e01c01f 0 ...
02 0x... ... ...

ipv6_reservations

reservation_id address prefix_len type dhcp_iaid host_id
01 2001:db8:0:24::ff 128 0 (null) 01
02 ... ... ... ... ...

Remarks

I can push my short workaround, if you want o have a look at.

Edited Oct 24, 2018 by Georg W.
Assignee
Assign to
Kea1.7-backlog
Milestone
Kea1.7-backlog
Assign milestone
Time tracking
None
Due date
None
2
Labels
hosts-backend libdhcpsrv
Assign labels
  • View project labels
Reference: isc-projects/kea#181