• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Using a dedicated Kea DHCP server

    Scheduled Pinned Locked Moved General
    kea dhcp tftp
    2 Posts 2 Posters 17 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Alun
      last edited by

      For those who use a dedicated Kea DHCP server(s) in addition to their FOG servers. Here is a kea-dhcp4.conf example file you can use on your dedicated Kea DHCP server.

      {
        # Converted to kea-dhcp4.conf.
        # From FOG server's DHCP configuration: dhcpd.conf
        #
        # DHCP Server Configuration file\n#see /usr/share/doc/dhcp*/dhcpd.conf.sample
        #
        "Dhcp4": {
          "interfaces-config": {
              "interfaces": [ "ens18" ]
          },
          "control-socket": {
              "socket-type": "unix",
              "socket-name": "kea4-ctrl-socket"
          },
          "lease-database": {
              // Memfile is the simplest and easiest backend to use. It's an in-memory
              // C++ database that stores its state in CSV file.
              "type": "memfile",
              "lfc-interval": 3600
          },
          "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": 900,
          "rebind-timer": 1800,
          "valid-lifetime": 3600,
          #
          # Definition of PXE-specific options
          # Code 1: Multicast IP Address of bootfile
          # Code 2: UDP Port that client should monitor for MTFTP Responses
          # Code 3: UDP Port that MTFTP servers are using to listen for MTFTP requests
          # Code 4: Number of seconds a client must listen for activity before trying
          #         to start a new MTFTP transfer
          # Code 5: Number of seconds a client must listen before trying to restart
          #         a MTFTP transfer
          "option-def": [
            {
              "space": "PXE",
              "name": "mtftp-ip",
              "code": 1,
              "type": "ipv4-address"
            },
            {
              "space": "PXE",
              "name": "mtftp-cport",
              "code": 2,
              "type": "uint16"
            },
            {
              "space": "PXE",
              "name": "mtftp-sport",
              "code": 3,
              "type": "uint16"
            },
            {
              "space": "PXE",
              "name": "mtftp-tmout",
              "code": 4,
              "type": "uint8"
            },
            {
              "space": "PXE",
              "name": "mtftp-delay",
              "code": 5,
              "type": "uint8"
            }
          ],
          "option-data": [
            {
              "name": "domain-name-servers",
              "code": 6,
              "data": "10.1.1.2"
            },
            {
              "name": "domain-name",
              "code": 15,
              "data": "xyz.internal"
            },
            {
              "name": "domain-search",
              "data": "xyz.internal"
            },
            {
              "name": "default-ip-ttl",
              "data": "0xf0"
            },
            {
              "name": "subnet-mask",
              "code": 1,
              "data": "255.0.0.0"
            },
            {
              "name": "routers",
              "code": 3,
              "data": "10.1.1.1"
            }
          ],
          "subnet4": [
            {
              "id": 1,
              "subnet": "10.0.0.0/8",
              "pools": [
                {
                  "pool": "10.2.0.1 - 10.2.255.254"
                }
              ],
              "valid-lifetime": 21600,
              "max-valid-lifetime": 43200,
              "next-server": "10.1.1.3"
            }
          ],
          "client-classes": [
            {
              "name": "Legacy",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'",
              "boot-file-name": "undionly.kkpxe"
            },
            {
              "name": "UEFI-32-2",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00002'",
              "boot-file-name": "i386-efi/snponly.efi"
            },
            {
              "name": "UEFI-32-1",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00006'",
              "boot-file-name": "i386-efi/snponly.efi"
            },
            {
              "name": "UEFI-64-1",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00007'",
              "boot-file-name": "snponly.efi"
            },
            {
              "name": "UEFI-64-2",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00008'",
              "boot-file-name": "snponly.efi"
            },
            {
              "name": "UEFI-64-3",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00009'",
              "boot-file-name": "snponly.efi"
            },
            {
              "name": "UEFI-ARM64",
              "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00011'",
              "boot-file-name": "arm64-efi/snponly.efi"
            },
            {
              "name": "SURFACE-PRO-4",
              "test": "substring(option[60].hex,0,32) == 'PXEClient:Arch:00007:UNDI:003016'",
              "boot-file-name": "snponly.efi"
            },
          ],
          "loggers": [
            {
              "name": "kea-dhcp4",
              "output-options": [
                {
                  "output": "/var/log/kea/kea-dhcp4.log"
                }
              ],
              "severity": "INFO",
              "debuglevel": 0
            }
          ]
        }
      }
      
      Tom ElliottT 1 Reply Last reply Reply Quote 1
      • Tom ElliottT
        Tom Elliott @Alun
        last edited by

        @Alun Thank you and added to documentation and within the installer to try to more cleanly account for this.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        106

        Online

        12.7k

        Users

        17.6k

        Topics

        156.7k

        Posts
        Copyright © 2012-2026 FOG Project