Community discussions

MikroTik App
 
predel
just joined
Topic Author
Posts: 17
Joined: Thu Jan 25, 2024 11:45 am

How to solve the problem with DHCP

Wed Oct 09, 2024 11:17 am

Hi,

I have set time control for the child. Everything works great. Unfortunately, the option to use random macaddress changes frequently in the phone.
How to solve the problem that if it is an unknown device, it should not be assigned an IP address.
I have devices in the network that I cannot enter a static IP for, so STATIC-only is out of the question.
Can I make some kind of mac-address list that DHCP will assign IP to?
model router RB760iGS

Thank you for your help
Piotrek
 
aesmith
Member
Member
Posts: 315
Joined: Wed Mar 27, 2019 6:43 pm

Re: How to solve the problem with DHCP

Wed Oct 09, 2024 2:45 pm

You could try ..
* for all your known devices, convert their leases to static using one part of your subnet, say from x.x.x.50 up
* Shrink the DHCP scope to only issue addresses from a small range, say from .16 to .30 Choose something that can easily be expressed as a prefix, in that example it would be x.x.x.16/27
* Block those IP addresses from accessing the Internet at all

Or if you have control of the device, switch off MAC privacy for your SSID
 
User avatar
TheCat12
Long time Member
Long time Member
Posts: 517
Joined: Fri Dec 31, 2021 9:13 pm

Re: How to solve the problem with DHCP

Wed Oct 09, 2024 8:00 pm

It should also be possible with a RADIUS server (or User Manager for that matter):
It is also possible to hand out leases for DHCP clients using the RADIUS server; the supported parameters for a RADIUS server are as follows:


Access-Request:
  • NAS-Identifier - router identity
  • NAS-IP-Address - IP address of the router itself
  • NAS-Port - unique session ID
  • NAS-Port-Type - Ethernet
  • Calling-Station-Id - client identifier (active-client-id)
  • Framed-IP-Address - IP address of the client (active-address)
  • Called-Station-Id - the name of DHCP server
  • User-Name - MAC address of the client (active-mac-address)
  • Password - " "