I’m trying to move a dhcp server to mikrotik, using the API (php).
The machine before uses dnsmasq and works as supposed: there are 6 vlans, each with a ip range like this:
vlan11 - 192.168.1.1-126
vlan12 - 192.168.1.129-254
vlan13 - 192.168.3.1-126
vlan14 - 192.168.3.129-254
vlan15 - 192.168.5.1-126
vlan16 - 192.168.5.129-254
there is a lease file that assigns these ip-s:
192.168.1.1 with mac 11:11:11:11:11:11
192.168.1.2 with mac 11:11:11:11:11:12
192.168.1.3 with mac 11:11:11:11:11:13
192.168.1.7 with mac 11:11:11:11:11:17
…
and so on. Not all available ip addresses are used (here 192.168.1.4, .5, and .6 are free).
Using dnsmasq, when a new computer connects with an unknown mac (mac that doesn-t have an IP assigned), dnsmasq gives the computer one of the free addresses in the vlan (192.168.1.4 in our case) and so on.
However, doing the same thing on mikrotik, the dhcp server offers also “reserved” addresses (there is a lease for that ip address, with a different mac in the /ip dhcp leases menu).
I should point out that only leases that are not bound yet are offered.
How can we obtain that dnsmasq-type behaviour, so that “reserved” leases are not offered anymore to another mac?
Thank you