Community discussions

MikroTik App
 
rchovan
just joined
Topic Author
Posts: 16
Joined: Sun Dec 09, 2018 10:20 am

DHCP option by rule

Tue Jul 09, 2019 9:16 am

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.
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: DHCP option by rule  [SOLVED]

Tue Jul 09, 2019 1:31 pm

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
 
rchovan
just joined
Topic Author
Posts: 16
Joined: Sun Dec 09, 2018 10:20 am

Re: DHCP option by rule

Tue Jul 09, 2019 2:39 pm

This is way too.
Thank You
 
User avatar
nickshore
Long time Member
Long time Member
Posts: 521
Joined: Thu Mar 03, 2005 4:14 pm
Location: Suffolk, UK.
Contact:

Re: DHCP option by rule

Tue Jul 09, 2019 3:13 pm

 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7054
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: DHCP option by rule

Tue Jul 09, 2019 3:43 pm

Or use vendor class id to give specific option sets based on ID client is sending.

Who is online

Users browsing this forum: complexxL9, Wintxi and 47 guests