Dhcp schedule release and renew script

Hello, I need help, I don’t know anything about scripting and I don’t even know where to look. I don’t know if any script will work in Mikrotik 3.x or if it is all the same.

I need to release and renew a dhcp client in the Public interface every day at 3am, so I don’t have to reboot the routerboard. How can I do this?

The problem is that my wisp gives me DHCP but people in my network sometimes need to register a few hotmail accounts and they can’t because I have the same IP address.

Thanks in advance for any help given.

/ip dhcp-client release [/ip dhcp-client find interface="name_of_outside_interface"]

Put that into a script and run it via the scheduler.

If your provider caches leases and assigns the same IP every time (possibly even over reboots), you can manually set a different MAC address on the interface, but that’s a fairly ugly hack.

Thank you very much, I’ll try it this afternoon.

You were right, the ISP always give me the same Public IP Address. Althogh I am allow to work with 3 Public IPs that they gave me.

I see if it is possible to create a DHCP who works only for the public MAC address interface and give IP address from a Public DHCP-pool. The problem would be getting the same IP from my server for having the same MAC when I renew it.

I share these useful examples

/ ip dhcp-client release 0
/ ip dhcp-client release [find interface =ether1]

It is valid for (release) or (renew)

God bless you