Community discussions

MikroTik App
 
wuffzack
just joined
Topic Author
Posts: 22
Joined: Sat Sep 01, 2018 7:40 pm

DHCP server lease-script is not called on renew

Mon May 31, 2021 4:33 pm

Hello, I am running RouterOS 6.48.3 on CCR1009
I have a DHCP server running with a lease script.

From a Windows client cmd prompt, if I execute
ipconfig /release
ipconfig /renew
the script is executed twice. First with $leaseBound set to 0, then with $leaseBound set to 1, as expected. All is well.

However, if I execute only the renew on the Windows client
ipconfig /renew
the script is not called at all. I can see in the DHCP leases, that the lease expiration time of the Windows client was reset, so it did talk to the DHCP server and said "hello...".
Same thing happens, if I reboot the Windows client. Expiration date is reset, lease script is not called.

So here is the question: Is this expected behavior, or is this a bug in RouterOS, which I should report?
Or is there some option, where I can ask RouterOS to execute the script on a renew?

This would be a simple lease-script used for testing:
:log info message="$leaseBound $leaseServerName: $leaseActMAC -> $leaseActIP"
Thank you.

EDIT:
I forgot to mention, the Windows client has a static lease. Not sure, if this makes any difference.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP server lease-script is not called on renew

Mon May 31, 2021 4:44 pm

static, or not, not mind

renew = the same confirmed, the lease is not created or deleted, as expected nothing change, except "lifetime"
release = end-of-use, the lease will be dropped and this trig the event

all exactly what is expected.
 
wuffzack
just joined
Topic Author
Posts: 22
Joined: Sat Sep 01, 2018 7:40 pm

Re: DHCP server lease-script is not called on renew

Mon May 31, 2021 5:14 pm

renew = the same confirmed, the lease is not created or deleted, as expected nothing change, except "lifetime"
all exactly what is expected.
Good to know, thank you!

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], ccrsxx, nickhoulton and 72 guests