Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Adding Custom Configuration in Kea DHCP Server with pfSense+ 25.03

    Scheduled Pinned Locked Moved DHCP and DNS
    26 Posts 8 Posters 4.7k 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.
    • GertjanG
      Gertjan @FCS001FCS
      last edited by

      @FCS001FCS said in Adding Custom Configuration in Kea DHCP Server with pfSense+ 25.03:

      One showed up after some restarts of switches ....

      Note: Your mileage may vary :)

      That's what I saw a while back when was learning how ti work with Unifi stuff.

      New unifi devices - or unifi devices I've reset, can be hooked up to the networks and from then it is adoptable right way (reboot after a device 'button' reset take some time to get awake - or yo have to try again). Or, that's how I understood the procedure.
      Didn't understand what was happening as one in a while this just fails ... the reset wasn't done good enough ?
      I wanted to know, back then, if it was a hassle every time, or if I rally could add more 'unifi' stuff easily, create a situation where I can unbox the device, hook it, and wait for the "do you want to adopt the new device ?" controller message. I figured out that that would be the way to go : everything is set up in pfSense so I can add physically the new unifi device, set them up from the controller and call it a day. No need to get my phone, approach the device, have it point to a 'controller IP' etc.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • P
        pescew
        last edited by

        How can we define custom client-classes options? I tried this but seems to have no effect:

        {
            "client-classes": [
                {
                    "name": "UEFI-64-1-1",
                    "test": "((substring(option[vendor-class-identifier].hex,0,20) == 'PXEClient:Arch:00007') and ((option[user-class].exists) and (substring(option[user-class].text,0,7) == 'iVentoy'))",
                    "boot-file-name": "iventoy_loader_16000_uefi",
                    "next-server": "172.26.2.18"
                },
                {
                    "name": "UEFI-64-1-2",
                    "test": "(substring(option[vendor-class-identifier].hex,0,20) == 'PXEClient:Arch:00007')",
                    "boot-file-name": "efi64/syslinux.efi",
                    "next-server": "172.26.2.19"
                },
                {
                    "name": "Legacy",
                    "test": "(substring(option[vendor-class-identifier].hex,0,20) == 'PXEClient:Arch:00000')",
                    "boot-file-name": "pxelinux.0",
                    "next-server": "172.26.2.19"
                }
            ]
        }
        
        M 1 Reply Last reply Reply Quote 0
        • M
          marcosm Netgate @pescew
          last edited by marcosm

          @pescew The structure is correct. A quick test here shows there's an issue with the first item (seen in the DHCP logs). Removing it and keeping only "UEFI-64-1-2" and "Legacy" let's Kea start.

          P 1 Reply Last reply Reply Quote 0
          • P
            pescew @marcosm
            last edited by

            @marcosm Thanks for the quick reply, I didn't realize that info was in the log. After cleaning up the parenthesis on that line it's working perfectly and PXE booting. I still need to troubleshoot the user-class rule to get the chain-loading working but that should be easy from here.

            GertjanG 1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan @pescew
              last edited by

              @pescew said in Adding Custom Configuration in Kea DHCP Server with pfSense+ 25.03:

              After cleaning up the parenthesis

              Yeah, more '(' then ')', that's normally not a good sign 👍

              "((substring(option[vendor-class-identifier].hex,0,20) == 'PXEClient:Arch:00007') and ((option[user-class].exists) and (substring(option[user-class].text,0,7) == 'iVentoy'))"
              

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • G
                Garet Jax @Gertjan
                last edited by

                @Gertjan Thank you brother. All you suggestions worked great. I joined the forums just to tell you so.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.