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.
-
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
-
@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/8173But 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)
-
That doesn't apply to the DHCPv6 server though?
-
@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
-
Well, you succeeded! Having never hit that myself I wasn't aware it was an issue.
-
@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".
-
@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 thedhcpd
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;
-
I created a feature request to track this: https://redmine.pfsense.org/issues/13422
Steve
-
@stephenw10 Great! Good to know.
In the GUI, should it just be called "DHCPv6 Options" rather than "DHCP/BOOTP Options"?
-
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.