Page 1 of 1

DHCP option by rule

Posted: Tue Jul 09, 2019 9:16 am
by rchovan
Hi,
is there a way how to add different dhcp options to different clients ? For example, I'll have list of host, by MAC address or hostname, and I want to assign for hosts in this list different DNS server and different boot file. All hosts, filtered and not filtered will use same vlan. I'm not sure, if something like that is implemented in RouterOS.

I know, that there is dhcp lease script, but I'm not sure if this script is called before or after dhcp options are sent to host, and If I'm able to modify this options.

Example:
host android-2e21a18ae7a87f84 will have DNS server 192.168.2.1
host Kitchen will have DNS server 192.168.2.5

Thank You.

Re: DHCP option by rule  [SOLVED]

Posted: Tue Jul 09, 2019 1:31 pm
by cdiedrich
The lease script is fired after the lease is bound.
Either way you approach it - you would need static leases to assign the right options to the right clients.
Once your lease is static, you can adjust all options or select predefined option sets.
-Chris

Re: DHCP option by rule

Posted: Tue Jul 09, 2019 2:39 pm
by rchovan
This is way too.
Thank You

Re: DHCP option by rule

Posted: Tue Jul 09, 2019 3:13 pm
by nickshore

Re: DHCP option by rule

Posted: Tue Jul 09, 2019 3:43 pm
by mrz
Or use vendor class id to give specific option sets based on ID client is sending.