DHCP server question

I found that if I set the static IP for example:

/ip dhcp-server/lease/add address=192.168.1.13 mac-address=xx:yy:zz:D8:01:DB comment=x

after device obtained random IP assigned from DHCPd server, then it will stick to its random IP regardless forever. Why is that?
Also how can I change the IP range for dynamic hosts in my network and reserve a pool for static ones without loosing current configuration?

/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay interface=bridge1 lease-time=1w name=dhcp1
/ip dhcp-server config
set store-leases-disk=1h
/ip dhcp-server lease
add address=192.168.1.99 mac-address=x server=dhcp1
add address=192.168.1.4 comment=x mac-address=y
add address=192.168.1.2 comment=x mac-address=y
add address=192.168.1.5 comment=x mac-address=y
add address=192.168.1.3 comment=x mac-address=y
add address=192.168.1.6 comment=x mac-address=y
add address=192.168.1.7 comment=x mac-address=y
add address=192.168.1.8 comment=x mac-address=y
add address=192.168.1.9 comment=x mac-address=y
add address=192.168.1.10 comment=x mac-address=y
add address=192.168.1.11 comment=x mac-address=y
add address=192.168.1.12 comment=x mac-address=y
add address=192.168.1.13 comment=x mac-address=y
/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf dns-server=192.168.1.4 gateway=192.168.1.1 netmask=24

Disconnect the device and then re-connect the device and it should get the static reservation address.

Hi,

Would like to make life easier for you i think.

start of by using DHCP and select Make static when right clicking the mac address or ip adress you like to assign and secondly edit the static ip of the mac address you selected and discpmnect cmputer and connect again and you are all ser …}

if you like to make the network safer change HDCP pool to static only seems to work for me but i have not hade enough time to play with it though but seems to work so far.

Sorry but doesn’t make any sense to me. In ISC DHCPd in Linux device will acquire a new static IP once previous lease expire. What is different in Mikrotik DHCPd implementation that it is not acting like this and requires device to be physically disconnected from network? That looks to me either like a bug or misconfiguration.

This is not what I’ve asked for.

I think that static lease entries actually need client-id set, not mac address. Or perhaps both, hence suggestion by @Matthiastik … if one starts off by using dynamic lease (which is syntactically correct in all aspects) and making it static plus changing address to desired one (can actually be outside dynamic address range), then success is almost guaranteed (but see next paragraph).

Regarding address change: client will only get changed address when client requests lease renewal … and that only happens after half of lease time (in your case that’s after 3.5 days as lease time is set to 1 week). DHCP server can not push address change.
Next: static lease has to actually work (see my previous paragraph). If it doesn’t and dynamic lease address range doesn’t change, then client will successfully renew its current address.

That makes even less sense. If i set static IP without client-id before I plug device to network then it is fine but not after. Also I can’t find anything about this in MikroTik Wiki.