DHCP Lease script not being launched

Hello.

There's an option to run a script when a dhcp lease is assigned. I tried to use it, but as I see, it seems it is launched only in several cases:

-when requesting device is powered on or rebooted

-when lease timer on Mikrotik router reaches 0:00:00

-when a device explicitly release dhcp lease an renew it.

In all cases mentioned above, a log message is printed that dhcp server assigned an address to a device.

But if some device renews it's IP address without releasing it and before lease timer reaches 0, that script is not being launched. There is also no message in Mikrotik's log that a lease was renewed. Only lease timer resets.

Is there any way to make Mikrotik launch that script in that case? I want it to add that given IP to an Addresslist (with timeout equal to lease time).

I believe there's an address-lists option in the DHCP server settings that does exactly that

Wow, I was looking for that option and I didn't see it. It does exactly what I wanted, expired leases are removed from the list

Thanks!

btw: I've had some entries created "manually" by my testing script. I didn't remove them before testing this option, so error message appeared in log. After disabling my script and removing address list items created by it, they aren't recreated now. What should I do to fix it?

A simple reboot should fix the issue

Ok, thanks again :slight_smile: