Goal
I'm building a DHCP fingerprinting system. When a client gets a lease, the router calls an HTTP endpoint with client DHCP options (opt12, opt55, opt60, opt61) for device identification.
What I found
The documentation states lease-options in the lease-script is "an array of received options" but does not clarify whether this means client-sent or server-sent options.
After testing, lease-options only contains server-sent options from the ACK packet:
DHCP-OPT kLen=1 vLen=4 v=\FF\FF\FF\00 ← opt1 subnet mask
DHCP-OPT kLen=2 vLen=5 v=local ← opt15 domain
DHCP-OPT kLen=1 vLen=4 v=\C0\A8\A8\FA ← opt3 router
DHCP-OPT kLen=2 vLen=8 v=\C0\A8\A8\FA ← opt42 NTP (2 servers)
DHCP-OPT kLen=2 vLen=4 v=\00\01Q\80 ← opt51 lease time
DHCP-OPT kLen=2 vLen=1 v=\05 ← opt53 msg type
DHCP-OPT kLen=2 vLen=4 v=\C0\A8\A8\FA ← opt54 server ID
DHCP-OPT kLen=1 vLen=8 v=\C0\A8... ← opt6 DNS
Client-sent options (opt55, opt60, opt61) are not present. opt60 and opt61 are retrievable from the lease record via:
[/ip dhcp-server lease get [find where active-address=$leaseIP] class-id]
[/ip dhcp-server lease get [find where active-address=$leaseIP] client-id]
But opt55 (Parameter Request List) is nowhere accessible.
tcpdump confirms the client is sending opt55:
Parameter-Request (55), length 11:
Subnet-Mask (1), Default-Gateway (3), Domain-Name-Server (6), Hostname (12)
Domain-Name (15), MTU (26), Static-Route (33), NTP (42)
URL (114), Unknown (120), Classless-Static-Route (121)
Question
Is there any way to access client-sent DHCP options — specifically option 55 — from within the DHCP server lease-script? If not, is this a known limitation or is there a feature request tracking it?
The script used for testing:
:foreach k,v in=$"lease-options" do={
:local key [:tostr $k];
:local val [:tostr $v];
:local keyLen [:len $key];
:local valLen [:len $val];
:log info ("DHCP-OPT kLen=" . $keyLen . " vLen=" . $valLen . " v=" . $val);
}