DHCP server grants new IP to device after "make static"

LAN contains two MikroTik routerboards, R1 gateway to internet and R2 linked to R1 via Ethernet cable which is configured as a third subnet 10.10.10.0/24. Port forwarding and dst-nat on R1 provide remote access to hosts on R2, where all IPs of hosts on the bridge were “made static”. It worked for a day, then hosts on R2 disconnected within a half hour (as leases expired?). Two of six hosts on R2 regained IPs, the other four are waiting. But the current IPs are not the static ones that are still shown in the IP/DHCP server/Leases tab. The new addresses are from the same pool
I deleted the DHCP server and created it again. Rebooted the router. Again, t]he static IPs are not assigned, only the two new ones (..55.237 and ..55.238.) which do not appear in the attached config file.
Suggestions most appreciated.
R2config20240708.txt (5.88 KB)

The lease client-id values for some of the entries look odd - have they been editied as they would usually be 1:xx:xx:xx:xx:xx:xx, where xx:xx:xx:xx:xx:xx is the client MAC address.

If a client includes a client ID in the DHCP request the Mikrotik will use this in preference to the MAC address.

client-id value is up to DHCP client to provide … indeed usually they resemble client’s NIC MAC address, but they don’t have to. And for static IP address assignment to work, client-id needs to be a constant value (again, it’s DHCP client’s responsibility to do it). It might be that those clients implement some kind of “anonymity” feature, similar to using random MAC address on wireless interface which is nowdays implemented by every smart phone vendor?

Thanks, tdw, for the info about client-id. I had changed some MAC addresses (in Winbox) to host name for readability–have now changed back. Deleted the previous static IP entries, accepted the new IPs from DHCP, and made them static (adjusted dst-nat rules to fit). One host “took” the change, another did not. The other host keeps getting a new IP and again showing its host name as the client ID in WinBox at IP/DHCP Server/Leases. Config export attached.
Thanks again
LabConfig20240709.txt (7.95 KB)

A test: to be entirely sure that manual interventions don’t break something, when making static leases only click “make static” and don’t change anything. Then, if a client “decides to ignore” the static lease, make the new (dynamically created) static again. Export leases (export terse=yes) and compare both static leases (intended for same client) to see where is the difference.

As mkx suggested, I made the new leases static. Then from a terminal window tried to print them out for comparison but got

[buser@MikroTik-demo] > export terse=yes       
expected end of command (line 1 column 13)

Should the command be issued from another point on the directory tree?

Command should be executed in /ip/dhcp-server/lease directory. And correct command option it simply terse (without the “=yes” part).

The client-ID is likely to blame. I actually wish that it DIDNT fill this field out when clicking make static
I use a script to periodically to and remove the entry in the client ID field. I can’t think of a single scenario where both the MAC ‘and’ client ID are needed. Maybe there is an edge case but you can’t have 2 devices with the same MAC address…
Yet the client ID does sometimes change +/- 1 and thus screws up the reservation and will assign a different IP

The client-id other than the MAC is working at the moment.

# jul/11/2024 10:38:19 by RouterOS 6.48.1
# software id = Q7UY-TG8N
#
# model = RouterBOARD 750 r2
# serial number = 8B3909xxxx
/ip dhcp-server lease add address=192.168.55.249 client-id=1:b8:70:f4:5b:c1:88 mac-address=B8:70:F4:5B:C1:88
/ip dhcp-server lease add address=192.168.55.245 client-id=00:E0:4C:EE:F6:3E mac-address=00:E0:4C:EE:F6:3E server=server55
/ip dhcp-server lease add address=192.168.55.243 client-id=00:0B:82:E0:F0:AD mac-address=00:0B:82:E0:F0:AD server=server55
/ip dhcp-server lease add address=192.168.55.238 client-id=ff:67:f:4f:59:0:4:fd:4f:7b:d5:cf:97:42:bf:aa:f9:37:49:7:39:85:e
4 mac-address=00:E0:67:0F:4F:59 server=server55
/ip dhcp-server lease add address=192.168.55.236 client-id=1:0:e0:67:b:85:20 mac-address=00:E0:67:0B:85:20 server=server55
/ip dhcp-server lease add address=192.168.55.233 client-id=sb03 mac-address=00:E0:67:09:90:E7 server=server55

Now wait for “static lease abandonment”. Then make the new lease static, export leases again and check for any changes in meta-data of leases which should belong to same client.

BTW, your device needs upgrade, latest v6 version is either 6.49.13 (long-term) or 6.49.15 (stable) …

Will watch for next static IP abandonment.
Updaet to rOS soonest.
Thanks.