Community discussions

 
rchovan
just joined
Topic Author
Posts: 9
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: 926
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
Christopher Diedrich
MTCNA, MTCUME, MTCWE
Basel, Switzerland
Bremen, Germany

There are 10 types of people: Those who understand binary and those who don't.
There are two types of people: Those who can extrapolate from incomplete data
 
rchovan
just joined
Topic Author
Posts: 9
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
Member
Member
Posts: 473
Joined: Thu Mar 03, 2005 4:14 pm
Location: Suffolk, UK.
Contact:

Re: DHCP option by rule

Tue Jul 09, 2019 3:13 pm

Nick Shore MTCNA MTCWE MTCRE MTCINE MTCTCE
LinITX.com - MultiThread Consultants
Get your MikroTik RBs and Training: http://linitx.com/brand/mikrotik
Official UK MikroTik Distributor
IRC chan: #routerboard on irc.z.je (IPv4 and IPv6)
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5942
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: No registered users and 32 guests