DHCP Option 82.2

I wondering if its possible to to use DHCP Option 82.1 or 82.2 in the option matcher or am I missing something.
Goes red when I try 82.1 or 82.2 or either in hex.

82.1 or 82.2 and similar are invalid DHCP Option codes

https://www.rfc-editor.org/rfc/rfc3046.html

Then how are you suppose to specify sub options then ?

I need to match against Agent Circuit ID and Agent Remote ID.

https://wiki.mikrotik.com/wiki/Manual:Interface/Bridge#DHCP_Snooping_and_DHCP_Option_82

I have DHCP Snooping setup with a bridge leases have the Agent Circuit ID populated with the vlan name the request came in on.

But under DHCP Server / Option Matcher how are you supposed to specify a sub option to match against?

Let me understand better, you want have your DHCP Server to reply only when some specific value is inside option 82 suboption 1 (Agent Circuit ID)?

Yes, You can already match Vendor Class ID and hand out a specific IP or range of IP’s using the matcher.
Seems like you should be able to match on Agent Circuit ID and hand out a specific IP based on that.

Sorry, but actually on both v6 and v7 you can not match other options than vendor class id :frowning: :frowning: :frowning:

This can be done (hypotetically) with a script inside dhcp server on-lease event.

On first request, assign one IP with dedicated pools that do not nothing and have lease time 10 seconds,

A) if the script check successfully suboptions “decoded” on lease, create a static lease with correct parameters for that device
(when the lease expire, remove by script the static lease)

B) if the script fail the ckeck, assign a permanent 127.0.0.1 to that device. After 10 seconds renew the lease and lock itself on 127.0.0.1