Community discussions

MikroTik App
 
wavespan
newbie
Topic Author
Posts: 37
Joined: Sat Mar 21, 2009 9:05 am
Location: Springfield, MA - USA

DHCP Option 82.2

Wed Sep 07, 2022 11:36 pm

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 82.2

Wed Sep 07, 2022 11:51 pm

82.1 or 82.2 and similar are invalid DHCP Option codes

https://www.rfc-editor.org/rfc/rfc3046.html
 
wavespan
newbie
Topic Author
Posts: 37
Joined: Sat Mar 21, 2009 9:05 am
Location: Springfield, MA - USA

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:13 am

Then how are you suppose to specify sub options then ?

I need to match against Agent Circuit ID and Agent Remote ID.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:17 am

 
wavespan
newbie
Topic Author
Posts: 37
Joined: Sat Mar 21, 2009 9:05 am
Location: Springfield, MA - USA

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:29 am

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?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:37 am

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)?
 
wavespan
newbie
Topic Author
Posts: 37
Joined: Sat Mar 21, 2009 9:05 am
Location: Springfield, MA - USA

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:42 am

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:49 am

Sorry, but actually on both v6 and v7 you can not match other options than vendor class id :( :( :(
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP Option 82.2

Thu Sep 08, 2022 12:54 am

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

Who is online

Users browsing this forum: Huy0880 and 135 guests