Hi,

Also you have to define if the reservations are in the pool or outside the pool.
I use a script to convert my reservations for each pool. My ISC-DHCP config is 
split into multiple files, so I search all files for Reservations in this 
subnet.

#!/bin/bash

# Usage: ./isc_to_kea.sh <ip-filter> <file1> [file2 ...]
# bash /usr/local/bin/isc_to_kea_ip.sh 10.102 $(find /etc/dhcpd/ -type f)

FILTER_IP="$1"
shift

echo "["

first=1
for file in "$@"; do
  # Nur reguläre Dateien verarbeiten
  [ -f "$file" ] || continue

  awk -v ip="$FILTER_IP" '
  BEGIN { block=""; inside=0 }
  {
    if ($0 ~ /^[[:space:]]*host[[:space:]]+[^{]+[[:space:]]*{[[:space:]]*$/) {
      block = $0 "\n"
      inside = 1
    } else if (inside) {
      block = block $0 "\n"
      if ($0 ~ /^[[:space:]]*}[[:space:]]*$/) {
        inside = 0
        if (block ~ "fixed-address[[:space:]]+" ip) {
          match(block, /host[[:space:]]+([^[:space:]]+)[[:space:]]*{/, m)
          hostname = m[1]
          match(block, /fixed-address[[:space:]]+([^;]+);/, m)
          ipaddr = m[1]
          match(block, /hardware ethernet[[:space:]]+([^;]+);/, m)
          hwaddr = m[1]
          match(block, /ddns-hostname[[:space:]]+"([^"]+)";/, m)
          ddns = m[1]

          if (!first) print ","
          first = 0

          print "  {"
          print "    \"hostname\": \"" hostname "\","
          print "    \"ip-address\": \"" ipaddr "\","
          print "    \"hw-address\": \"" hwaddr "\","
          print "    \"ddns-hostname\": \"" ddns "\","
          print "    \"boot-file-name\": \"\","
          print "    \"client-classes\": [],"
          print "    \"next-server\": \"0.0.0.0\","
          print "    \"option-data\": [],"
          print "    \"server-hostname\": \"\""
          print "  }"
        }
        block = ""
      }
    }
  }' "$file"
done

echo "]"


-----Ursprüngliche Nachricht-----
Von: Kea-users <[email protected]> Im Auftrag von Francis Dupont
Gesendet: Donnerstag, 17. Juli 2025 09:47
An: Kea user's list <[email protected]>; Mike Lieberman 
<[email protected]>
Betreff: Re: [Kea-users] Problems moving from ISC-DHCP to Kea


HINWEIS: Externer Absender


Mike Lieberman writes:
> I have been using ISC-DHCP for years. I am a complete novice with Kea.
>
> I installed Kea 3.0.0 in a Debian 12 server. I migrated my large
> dhcp.conf via the ISC migration tool (successfully) and install the
> kea-dhcp4.conf file in the /etc/kea folder.
>
> I did run kea-admin -n with kea-dhcp4.conf and it took it. Testing
> showed that the service was live via dhcpdump.=C2=A0
>
> But the kea server is not serving up the reservation IP addresses that
> were migrated.

=> reservations are very different between ISC DHCP and Kea:
 - ISC DHCP reservations are not attached to a particular subnet (the subnet
  is found using the address when it exists)
 - Kea reservations are per subnet
Two additional details:
 - Kea has "global" reservations but they should not have an address even
  recent Kea versions try to find the corresponding subnet
 - an address can belongs to more than one subnet in Kea The result is the 
translation tool can't handle corner cases with reservations...

Regards

Francis Dupont <[email protected]>
--
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
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users
_________________
Diese Nachricht wurde vom OeNB Mailserver TLS verschlüsselt empfangen

Diese E-Mail kann vertrauliche Informationen enthalten und irrtümlich an Sie 
gelangt sein. In diesem Fall informieren Sie bitte sofort die Absenderin bzw. 
den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die 
unbefugte Weitergabe dieser Mail oder von Teilen dieser Mail sind nicht 
gestattet.

Informationen gemäß DSGVO zur Verarbeitung personenbezogener Daten durch die 
OeNB finden Sie unter www.oenb.at/datenschutz<https://www.oenb.at/datenschutz>.
-- 
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
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to