Community discussions

MikroTik App
 
ToniBizjak
just joined
Topic Author
Posts: 1
Joined: Wed Nov 28, 2018 3:07 pm

dhcp-server matcher filter

Thu Dec 22, 2022 12:34 pm

Is it possible to use wildcard (*,!, %, ...) or some operator like "starts with" in /ip dhcp-server value= matcher command?
If I want to separate IP addresses to different pools, I use script like this:
/ip dhcp-server matcher
add address-pool=pool54PhoneA code=60 name=android-09 server=D54 value=android-dhcp-9
add address-pool=pool54PhoneA code=60 name=android-12 server=D54 value=android-dhcp-12
add address-pool=pool54PhoneA code=60 name=android-08 server=D54 value=android-dhcp-8.0.0
add address-pool=pool54PhoneA code=60 name=androidHCLT server=D54 value=HUAWEI:android:CLT
add address-pool=pool54PhoneA code=60 name=androidHYAL server=D54 value=HUAWEI:android:YAL
add address-pool=pool54PhoneA code=60 name=androidHVOG server=D54 value=HUAWEI:android:VOG
add address-pool=pool54PC code=60 name=PC server=D54 value="MSFT 5.0"

Every HUAWEI type of phones and every generation of Android uses different value, so I want to group them, like:
add address-pool=pool54PhoneA code=60 name=android server=D54 value=android-dhcp*
add address-pool=pool54PhoneA code=60 name=androidH server=D54 value=HUAWEI:android*
 
2bn2t
just joined
Posts: 17
Joined: Fri Jul 09, 2021 11:17 am

Re: dhcp-server matcher filter

Tue Nov 28, 2023 4:21 pm

I’m in need of this too.


Sonos Devices :roll: answer for Class-Id = "udhcp 0.9.8" :?
(Hostname is usually "SonosZP" but somehow I did change it on some Devices.)


Matching by a RegEx for all the MAC Adresses the Manufacturer uses would be helpful.
Obviously there are a Bunch of Vendors that can’t even set a sensible Class-Id…

Who is online

Users browsing this forum: No registered users and 18 guests