Feature request: "DHCP Renew" script event

I notice that a lot of the problems in the scripting forum revolve around dynamic DNS providers and creating scripts for their use.

While I can understand MikroTik’s reluctance to implement “off the shelf” support for such services (sure, different providers use different proprietary update mechanisms => implementing all of them is not feasable), the fact remains this is a painful feature to have.

There is one thing that RouterOS can do to support such services though. One which doesn’t require the implementation of all update mechanisms, while still allowing scripts to implement dynamic DNS easily:

Create an option in the DHCP client for a script to be executed after every renew, or better yet, only when the IP is changed as a result of a renew. Ideally, have both, with a “switch” that specifies whether the script executes only on changes.

That way, creation of dynamic DNS updates becomes pretty much trivial, as the only thing needed (typically) is an appropriate fetch call. No need to check if the call is necesarry, worry about excessive calls vs. down time, etc. Plus, it might be useful in other scenarios (though I can’t think of such).

better yet would be a way to create a logging action that could run a script. the data of the log entry would be available in a variable the script could access. this would extend it way past just a dhcp renewal event.

+1 to logging events :slight_smile: