[SOLVED] Make ip from dynamic dhcp leases more static

Is there way to make ip given by router to PC from dynamic dhcp leases more static?

I want to achieve behaviour like this:

  1. remember all mac addresses (forever)
  2. if attached device has completely new (unknown yet) mac → allocate new ip and remember ip (associate this ip with given mac)
  3. if attached device has known mac then give this device associated ip

There is similar description on http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol

automatic allocation: The DHCP server permanently assigns a free IP address to a requesting client from the range defined by the administrator. This is like dynamic allocation, but the DHCP server keeps a table of past IP address assignments, so that it can preferentially assign to a client the same IP address that the client previously had.

PS I use 1100AHx2 router.

Set dhcp lease time for example 10days … schedule script to run every few days that for each dynamic lease entry in “/ip dhcp-server lease” make static entry with “/ip dhcp-server lease make-static” and set lease time to 0s(never expire) …

It seems that it is good idea, thanks.