BGP.guru

BGP.guru

A Nerd blog.

22 Jan 2026

RouterOS DHCP Scripts and RADIUS Start/Stop Surprises

I ran into a small but important detail while working with Mikrotik DHCP server lease logging: scripts only fire on new lease, or lease expiry/termination. Similarly, RADIUS accounting events will only fire then. Any configuration for this type of setup needs to exist in advance of leases being handed out, or existing leases will not be seen at all.

If long term stable leases are likely in your network and you need to keep track of them, then scripting using the Mikrotik binary API, or REST API to capture any leases not seen would cover any gaps.


Theodore Baschak - Theo is a network engineer with experience operating core internet technologies like HTTP, HTTPS and DNS. He has extensive experience running service provider networks with OSPF, MPLS, and BGP.