DHCP options by MAC-address pattern

It would be very nice if DHCP could set specific options depending on MAC-address. In our case we have some Snom-phones which expect the TFTP-server option to be in this weird format:
http://provision.example.com/somewhere/{mac}”, whereas the Linksys PAP2 expects the more conventional “provision.example.com”.

In dnsmasq.conf, this is configured as follows:

dhcp-mac=snom,00:04:13:::*
dhcp-option=66,“provision.example.com
dhcp-option=snom,66,“http://provision.example.com/somewhere/{mac}”

Hopefully RouterOS could do it with a more human-friendly syntax.

and it would be nice if we could use RADIUS to add some DHCP Options in DHCP response…

If you’re willing to depend on RADIUS, you could send the DHCP request off to a different DHCP-server – possibly even running on the RADIUS-server.

Our problem is that we want the local net to work even when the WAN is down, and in most of our locations the RB is the only “server”. The only solution is for the DHCP-server in RouterOS to acquire more features.

What is the point of sending dhcp request off the LAN when you have multi IP devices in that LAN and you want to serve this DHCP-request in LAN or without external DHCP?

What i do now is for example add an option 43, it’s ‘vendor extension’ to comunicate with specific kind of hardware:

i create separate vlans: DATA and VOICE, if any dhcp request is given, my mikrotik is responding with option 43.

This option has encoded some “magic”, if normal PC receives the #43 it just ingores that option, receives IP and everything is OK

If my Ip-Phone gets #43, it goes to Voice VLAN (number encoded in #43 option) and asks for another DHCP offer.
BUT:
-If anyone uses VOICE vlan he gets the IP for VOICE servers (for ip-phones etc…)
-IF i need to have 2 devices with #43 option, then i’m hitting the wall (for example from my office: access point and IP-telephone).

So, if there was an option for using the mac-pattern it would be superb.

has this been implemented by any chance? mac-patterns

This would be extremely useful to us as well.

Yeah it can be useful. And right now I need to be able to assing the same IP address to more than one MAC addreesses. Not all working at once! When I brigde my LAN interface on my laptop, MAC address changess, I want it to get the same IP when bridged and when not bridged! How hard can this be for the developers? Not hard I guess.

Any update to this? A Radius DHCP option would be awesome!

Hi

This is a verry old post but is there some new devloppement about this ?

Currently we can segregate some devices and give them differ pools.
First enable debug dhcp to found some entry like vendor id

my example


/ip dhcp-server vendor-class-id
add address-pool=bridge-lan__switch name=switch server=bridge-lan vid=SF200-48
add address-pool=bridge-lan__phone name=phone server=bridge-lan vid="Cisco SPA303"
add address-pool=bridge-wifi-guest name=android server=bridge-wifi-guest vid=android-dhcp-8.1.0

etc…
Proper devices will be group in differ IP range at the same DHCP SERVER.

Some devices not share that VendorID info and we still must use Make Static and set proper IP manual.