Dear all,
Can you tell me if option 160 is working on Mikrotik? I’m not able to make it working.
Thank you in advance,
Dear all,
Can you tell me if option 160 is working on Mikrotik? I’m not able to make it working.
Thank you in advance,
Ran into this problem recently too.
For anyone that comes across this, here’s the solution, as it’s not well-documented.
I’m using RouterOS v6.46.4.
To setup Option 160, do this:
/ip dhcp-server option add code=160 name="Captive Portal" value="'https://my.server.com/some/page'"
Note that the single quotes MUST be there. It’s how Mikrotik knows it’s a string.
This creates a DHCP Option, but it won’t be used until you assign it to a DHCP server. To do that, you have a few options:
All 3 should work in theory, but I only tested the last option.
At this point, it’s setup, but there’s a catch. If you have a device, like a Windows device, running Wireshark, and you do an “ipconfig /release” and “ipconfig /renew”, your Wireshark will see some Options sent to you by the Mikrotik but you will NOT see Option 160. This is because:
According to the DHCP protocol, a parameter is returned to the DHCP client only if it requests this parameter, specifying the respective code in DHCP request Parameter-List (code 55) attribute. If the code is not included in Parameter-List attribute, the DHCP server will not send it to the DHCP client. – > https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server#DHCP_Options
This is what tripped me up. Windows isn’t requesting Option 160, so the Mikrotik won’t send it. You need a device that explicitly requests Option 160 for the Mikrotik to send it.
If you want to test if the option is working, and you don’t have a device that will request Option 160 handy, one thing you can do is this:
This will request Option 160 from your DHCP server, and the Mikrotik will respond with that option. You should see it in Wireshark, and see the result printed by the tool.
Hi talz,
thank you for your outstanding(!) description regarding RFC7710 and Mikrotik! ![]()
Just one note, Option 160 was changed to Option 114!
Please see: https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml
Or in detail, the new draft: https://datatracker.ietf.org/doc/draft-ietf-capport-rfc7710bis/10/
This document replaces [RFC7710]. [RFC7710] used DHCP code point
160. Due to a conflict, this document specifies 114. Consequently,
this document also updates [RFC3679].
It seems there was a conflict with Option 160, but no further details are given, regarding which conflict.
Option 114 will be implemented by Apple (and hopefully by more and more manufacturer):
https://developer.apple.com/news/?id=q78sq5rv
Quick googling reveals that option 160 is being used by polycom VoIP system.