I have recently set up a DHCP server in my MikroTik routerboard. Said server is configured so that it sends a certain value in the DHCP option 43 to the clients. At the same time, I can see through WireShark that the option is actually being sent, but the client seems to be discarding this value -as it does nothing with it-. Therefore, I wanted to ask whether there is a way in which I could check the value of option 43 in the client. If it’s not possible, is there a way I could send certain data -the ACS server, in this case- through DHCP and that the client can see this information, maybe in a certain variable? I need this information to be accessible in the client device.
If you don’t write us what this “client” will be, how should we answer you? Press the blue button under the client chassis and the read value appears in the display on the right.
On DHCP Client / Advanced / Script and you see the result on log
:if ($bound=1) do={
:local LOVendorSpecific ($"lease-options"->"43")
:log info "Lease Option 43 (Vendor-Specific) is $LOVendorSpecific"
}
Both the DHCP server and client have been configured by means of the Mikrotik RouterOS implementation. The client is a Mikrotik mAP.
If I set up the script you specified, it logs a message in the system, but the variable $LoVendorSpecific appears to be null -it prints a blank space-: "Lease Option 43 (Vendor Specific) is ".
I was therefore wondering if there could be an issue with the way I computed the option 43, although WireShark does see the String I’m trying to send in a DHCPOFFER message.
try to remove both
forced=yes on dhcp server
and remove option 55 “receive_opt_43” and “clientid_duid” on dhcp client.
I receive \01\19http://10.100.100.26:7457 instead of only http://10.100.100.26:7457 is wanted the hex 0x01 and 0x19 at the start???
RouterOS can not print 0x01 and 0x19
If not wanted must be 0x687474703a2f2f31302e3130302e3130302e32363a37343537 but is equal to ‘http://10.100.100.26:7547’ (quoted with ’ )
(offtopic: client and clientid_duid use same 61 code, one are the alternative of the other, must not be used at the same time)
(offtopic: the default options-request (the client option 55) is 0x01798A03212A2B33353606 and are the options 1, 121, 138, 3, 33, 42, 43, 51, 53, 54, 6)
Thanks again for your answer, rextended:
I originally thought that the prefix “0119” had to be added for Mikrotik to understand that the option 43 (19 bytes of length) was being sent.
I tried removing the “force” option on the server, and ralso emoved client_duid and req_opt_43. The code is now the following:
Unfortunately, the log still registers a blank space in the variable “$LOVendorSpecific”. I tried sending both acs_noforce and acs_plain -and I also tried removing req_opts on the client-.
Do you happen to see anything when you print the variable on your side?
Good morning,
After rebooting both the client and the server everything works as expected now: the variable shows the right value instead of just blank.
Thank you so much again for all your help, rextended. Have a great day.