Hi Nathan,

Interesting.  I reviewed RFC 8357 and you seem to be correct, as far
as I can tell. Kea ARM says this is supported:
https://kea.readthedocs.io/en/kea-3.0.0/arm/dhcp4-srv.html#supported-dhcp-standards
but it does not appear to be working (in DHCPv4 anyway):

Used perfdhcp as you did: sudo perfdhcp -4 -r 1 -R 1 -p 2 -L 12345 -o
82,1300 10.1.2.2

2025-07-20 13:11:37.462 DEBUG [kea-dhcp4.packets/974.281473765296000]
DHCP4_BUFFER_RECEIVED received buffer from 10.1.2.4:12345 to
10.1.2.2:67 over interface enp0s9
2025-07-20 13:11:37.462 DEBUG [kea-dhcp4.options/974.281473697640224]
DHCP4_BUFFER_UNPACK parsing buffer received from 10.1.2.4 to 10.1.2.2
over interface enp0s9
2025-07-20 13:11:37.462 DEBUG
[kea-dhcp4.bad-packets/974.281473697640224] DHCP4_PACKET_DROP_0001
failed to parse packet from 10.1.2.4 to 10.1.2.2, received over
interface enp0s9, reason: OptionInt 19 truncated,
hwaddr=00:0c:01:02:03:04

I did a packet capture (attached) and it seems to show a correctly
specified option 82 sub-option 19 (Source Port) (at least Wireshark
thinks it does).

It appears to be supported in DHCPv6, but that may be because it isn't
a 0 length option (the desired port is included in the option):  sudo
perfdhcp -6 -r 1 -R 1 -p 2 -L 12345 -A 1 --or 135,3039 2001:db8::2

msg_type=SOLICIT (1), trans_id=0x0,
options:
  type=00001, len=00014: 00:01:00:01:30:0f:a9:85:00:0c:01:02:03:04
  type=00003(IA_NA), len=00012: iaid=1, t1=3600, t2=5400
  type=00006, len=00004: 23(uint16) 24(uint16)
  type=00008, len=00002: 0 (uint16)
1 relay(s):
relay[0]: msg-type=12(RELAY_FORWARD), hop-count=0,
link-address=2001:db8::4, peer-address=2001:db8::4, 1 option(s)
type=00135, len=00002: 12345 (uint16)

2025-07-20 13:20:05.316 DEBUG [kea-dhcp6.packets/1040.281473129902432]
DHCP6_RESPONSE_DATA duid=[00:01:00:01:30:0f:a9:85:00:0c:01:02:03:04],
[no hwaddr info], tid=0x0: responding with packet ADVERTISE (type 2),
packet details: local_address=[2001:db8::2]:547,
remote_address=[2001:db8::4]:12345,


Long story short, I've created this issue to report this problem:
https://gitlab.isc.org/isc-projects/kea/-/issues/4017

Thank you,
Darren Ankney

On Sat, Jul 19, 2025 at 4:02 PM Nathan Faulkner
<nathanfaulkne...@gmail.com> wrote:
>
> Unless I'm misreading the spec, the length for sub-option 19 (hex 13) should 
> be 0.
>
> On Sat, Jul 19, 2025, 3:54 PM Darren Ankney <darren.ank...@gmail.com> wrote:
>>
>> Hi Nathan,
>>
>> I think, In this case,  "-o 82,1300"  will look like sub-option 19
>> with 0 length and no data at all.  This would make sense with 0
>> length, but Kea is expecting you to send some data, I think, which is
>> probably why it complained.  If you already have network activity with
>> this option 82 content, you can shortcut this process by capturing
>> packets as I said previously.  I will give a hypothetical as an
>> example, however.  Let us say you want to send the circuit id: VLAN12
>> as option 82 sub option 1 (circuit-id).  You would specify like so:
>>
>> -o 82,0106564C414E3132
>>
>> where:
>>
>> 01 = sub option 1
>> 06 = 6 bytes length
>> 564C414E3132 = VLAN12
>>
>> This is exactly what would appear on the wire.
>>
>> Thank you,
>> Darren Ankney
>>
>> On Sat, Jul 19, 2025 at 12:59 PM Nathan Faulkner
>> <nathanfaulkne...@gmail.com> wrote:
>> >
>> > The registration page mentioned that some domains were blocked and this 
>> > list could be emailed to get one unblocked, though I don't know if that 
>> > included individual addresses on a domain. If not, I'm not sure how 
>> > someone would contribute without paying for an email address.
>> >
>> > For "-o 82,1300" the spec 
>> > (https://www.rfc-editor.org/rfc/rfc8357.html#section-4.1) says the length 
>> > is 0. When I tested some other values in place of 13 (don't remember 
>> > which, I think some random higher value and 01) they didn't seem to have 
>> > an issue with 0 length data.
>> >
>> > On Sat, Jul 19, 2025, 8:14 AM Darren Ankney <darren.ank...@gmail.com> 
>> > wrote:
>> >>
>> >> Hi Nathan,
>> >>
>> >> I think the reason you had trouble setting up an account in Gitlab was
>> >> that you have an @gmail.com address.  There has been some lock-down
>> >> needed due to a large amount of spam.  If you have a business email,
>> >> you could probably use that.
>> >>
>> >> As far as: "-o 82,1300" not working, when sending option 82 data, you
>> >> have to actually specify the entire suboption (id+length+data) as
>> >> shown here: https://www.rfc-editor.org/rfc/rfc3046#section-2.0 It also
>> >> must be converted to hex as would appear in a DHCP packet.  perfdhcp
>> >> won't do any of this for you.  It will merely take what you provide,
>> >> compute a length , and send: 0x52<length><your data> (at least I think
>> >> that is correct).  The easiest thing to do would be to capture DHCP
>> >> traffic that already contains this option, open in wireshark, and copy
>> >> out the hex for the sub-option as a hex stream.  This should give you
>> >> exactly what you need to use on the command line.  For some tips
>> >> (though they are instructions for templates) see here:
>> >> https://kb.isc.org/docs/how-to-use-perfdhcp-benchmarking-tool
>> >>
>> >> Thank you,
>> >> Darren Ankney
>> >>
>> >> On Thu, Jul 17, 2025 at 9:33 PM Nathan Faulkner
>> >> <nathanfaulkne...@gmail.com> wrote:
>> >> >
>> >> > I was trying to create an account to report a couple of kea issues, but 
>> >> > I got an "Email is not allowed for sign-up." message.
>> >> >
>> >> > I'm running kea 2.6.2.
>> >> >
>> >> > Here are the issues I was planning to open:
>> >> >
>> >> > perfdhcp should specify the relay agent relay port sub option when a 
>> >> > local port is specified.  Not sure how it'd work otherwise. 
>> >> > https://gitlab.isc.org/isc-projects/kea/-/issues/663 looks to be a 
>> >> > related issue.
>> >> > When sending the relay agent relay port sub option (by passing "-o 
>> >> > 82,1300" to perfdhcp), the debug kea logs show the packet failing to 
>> >> > parse for reason "OptionInt 19 truncated". (as a workaround, you can 
>> >> > specify junk data "-o 82,13020000")
>> >> > It'd be nice if perfdhcp could specify multiple servers.  I was trying 
>> >> > to test HA, and normally I'd use a relay server, but perfdhcp itself 
>> >> > pretends to be a relay server, which causes conflicts.
>> >> >
>> >> > --
>> >> > 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
>> >> > Kea-users@lists.isc.org
>> >> > https://lists.isc.org/mailman/listinfo/kea-users
>> >> --
>> >> 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
>> >> Kea-users@lists.isc.org
>> >> https://lists.isc.org/mailman/listinfo/kea-users
>> >
>> > --
>> > 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
>> > Kea-users@lists.isc.org
>> > https://lists.isc.org/mailman/listinfo/kea-users
>> --
>> 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
>> Kea-users@lists.isc.org
>> https://lists.isc.org/mailman/listinfo/kea-users
>
> --
> 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
> Kea-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users

Attachment: kea-dhcp4-RFC8357.pcap
Description: Binary data

-- 
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
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to