But with no success, when i try manually, the find command don’t return the mac lease with “00:00:00:00:00:00”. I can see in the webfig the “00..” mac addresses, but in the CLI, they are blanked.
The find command with no parameters should return all the leases but return nothing for now.
Ive recently upgraded my 750Gl firmware at 6.0rc1 trying to correct this issue, that changed nothing.
I have two DHCP servers enabled with pools that are not in conflict.
Also, ive enabled the “Add ARP For Leases” parameter, with same results.
Can you help me to built an effective script to remove the problematic dhcp leases ?
I don’t find out why the find command return nothing ?!
I see the same problem. They show up in winbox/webfig, but in the command line they return as blank, with a length of 0.
On your router, are the 00:00:00:00:00:00 entries the only ones that have a status of “busy”? If so, you this might work. It checks for all “busy” leases, and if the mac-address has a length of 0, remove it. (Make sure there aren’t any legitimate leases that meet this criteria!):
:foreach i in=[/ip dhcp-server lease find status=busy] do={
:if ([:len [/ip dhcp-server lease get $i mac-address]] = 0) do={
/ip dhcp-server lease remove $i;
}
}
I am only able to test “bound” and “waiting” leases. When I run the following script, all “bound” leases return a status of bound, but all “waiting” leases are blank, kind of like the mac addresses. I don’t have any “busy” leases, so I don’t know if they will return blank or not. If they do, then then script above won’t work
:foreach i in=[/ip dhcp-server lease find] do={
:put [/ip dhcp-server lease get $i status]
:put [/ip dhcp-server lease get $i address]
:put [/ip dhcp-server lease get $i mac-address];
}