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

    DHCPv6 server additional options data format

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 3 Posters 1.2k 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.
    • cmcqueenC
      cmcqueen
      last edited by

      How do you add extra options to the DHCPv6 server?

      Eg I would like to add hex data for option 17, which is OPTION_VENDOR_OPTS.

      I've already done the equivalent for DHCP option 121. But for DHCP, there is a Type field, and I chose option String for that, in order to enter colon-separated hex values. For DHCPv6, there is no Type field, just a Number and Value, with no documentation about what to enter.

      keyserK cmcqueenC 2 Replies Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Hmm, interesting.

        It creates it as type 'text'. In /var/dhcpd/etc/dhcpdv6.conf:

        option custom-opt1-0 code 69 = text;
        ...
        	option custom-opt1-0 "test";
        

        That seems like an oversight. I would imagine the code from the dhcp page would work the same way here.

        Steve

        cmcqueenC 1 Reply Last reply Reply Quote 1
        • keyserK
          keyser Rebel Alliance @cmcqueen
          last edited by keyser

          @cmcqueen said in DHCPv6 server additional options data format:

          How do you add extra options to the DHCPv6 server?

          Eg I would like to add hex data for option 17, which is OPTION_VENDOR_OPTS.

          I've already done the equivalent for DHCP option 121. But for DHCP, there is a Type field, and I chose option String for that, in order to enter colon-separated hex values. For DHCPv6, there is no Type field, just a Number and Value, with no documentation about what to enter.

          Unfortunately you can’t do that. PfSense does not use the wide-dhcp6c client that has been available for years for BSD and accepts RAW format DHCP Options.
          PfSense still uses the unmodified dhcp6c client with no support for RAW or unlisted vendor options.
          There has been a change request for this on redmine for years without notice: https://redmine.pfsense.org/issues/8173

          But you are in luck. OPNsense uses this client and has for years. So you can simply take the dhcp6c binary from a OPNsense distribution and replace the one in your pfSense - then it works.
          I use it right now on a SG-2100 in France (requires the Aarch64 compiled edition of the dhcp6c binary).

          PS: You need to replace the binary every time you upgrade your pfsense (The upgrade reverts pfsense to its default binary)

          Love the no fuss of using the official appliances :-)

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            That doesn't apply to the DHCPv6 server though?

            keyserK 1 Reply Last reply Reply Quote 0
            • keyserK
              keyser Rebel Alliance @stephenw10
              last edited by

              @stephenw10 said in DHCPv6 server additional options data format:

              That doesn't apply to the DHCPv6 server though?

              Ahh, my bad - in my eager to gather attention to the flawed dhcp6c client, I lost the mention of this being about the DHCPv6 -server 😂

              Love the no fuss of using the official appliances :-)

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Well, you succeeded! Having never hit that myself I wasn't aware it was an issue.

                1 Reply Last reply Reply Quote 0
                • cmcqueenC
                  cmcqueen @cmcqueen
                  last edited by

                  @cmcqueen said in DHCPv6 server additional options data format:

                  I've already done the equivalent for DHCP option 121.

                  Sorry, I meant DHCP option 125, "V-I Vendor-Specific Information".

                  1 Reply Last reply Reply Quote 0
                  • cmcqueenC
                    cmcqueen @stephenw10
                    last edited by cmcqueen

                    @stephenw10 As a test, I tried editing that file manually (Diagnostics → Edit File in the web interface). I changed the type to string and removed the double-quotes around the hex data. But then whenever I restart the dhcpd service, it rewrites the file.

                    option custom-opt2-0 code 17 = string;
                    ...
                    	option custom-opt2-0 00:00:7E:D9:00:05:00:0D:07:65:78:61:6D:70:6C:65:03:63:6F:6D:00:00:0A:00:01:00;
                    
                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      I created a feature request to track this: https://redmine.pfsense.org/issues/13422

                      Steve

                      cmcqueenC 1 Reply Last reply Reply Quote 1
                      • cmcqueenC
                        cmcqueen @stephenw10
                        last edited by

                        @stephenw10 Great! Good to know.

                        In the GUI, should it just be called "DHCPv6 Options" rather than "DHCP/BOOTP Options"?

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Either would probably be fine but it has always been called 'DHCP/BOOTP Options' in the v4 server and changing it now may cause confusion.

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