DHCP server static lease, one IP, multiple MAC ?

In my network is 1 IP per customer, static dhcp and everything is fine.

but some clients have two or more computers (desktop + laptop).

with linux dhcp conf was like that:

host clientX_dektop { hardware ethernet 00:22:22:22:22:22; fixed-address 10.0.6.24; }
host clientX_laptop { hardware ethernet 00:11:11:11:11:11; fixed-address 10.0.6.24; }

everything worked fine (but one computer at once).


Tried same thing with Mikrotik RouterOS but can’t make several dhcp static leases with same IP "Couldn’t change DHCP Lease <10.0.6.24> - already have static lease with this IP adress (6).

is there any workaround ?

Just go to ip - arp, and remove the mac address you want to. and if the arp appear again, just make it static. you can di it by right click and set it to static :laughing:

this is not possible to add 2 different mac addresses to one ip address in RouterOS

why is that limited ?

but is there any workaround for that ?

Hi all!

This is an old post, but I need to do the same thing.

I know that RouteOS do not manage different associations from mac addresses to one ip, but I was wondering if could be possible to bypass that, using a script that change the associations (static) mac-ip just before the dhcp assign the ip.

Any suggestions about how tu run a script just before the dhcp-server asign the ip?

That’s quiet sad. I have lots of IP_Cams. When connected by wire, they automatically disable wifi. wired and wireless have the same mac,
and i need them to have the same IP and i don’t care if they are connected by wire or just wireless…

If they indeed have the same mac on ether and wifi and you bridge the ethernet and wifi networks there
will be no issue I think. The DHCP server will give the same IP to each because mac is the same.

Sorry, of course i was wrong! They do have DIFFERENT MAC-adresses, but there is always only one of them connected. wired or wireless.
so i’d need a feature to add static leases with different-macs and same ip!
most other dhcp-server allow this, so i don’t understand why they implemented this limitation.

I’m glad to hear that i’m not the only one who need that function.
Unfortunatly It’s due to that feature that I can’t use the dhcp server on some routerboard :frowning:

I do really hope to see, in a future (soon), this function implemented.

if both interfaces have the same MAC, DHCP server will give you same IP address. If there are 2 MAC addresses, you will give different IP addresses. As weird solution, you can create VLAN for your camera and assign DHCP server with only 1 address in the pool with very short lease time, so when something changes, your camera would be able to get the only address in the pool.

It is not possible to add 2 static leases with the same IP address.

Maybe you can put that on the wishlist as it apparently is desired by some people to do that, and technically it should be no problem.
Of course the user is responsible when the two devices are online at the same time…

it is not allowed because technically, you will have address conflict enforced by the DHCP-server. And if you suddenly have some switch with longer cache times you will have problems.

As others have already written, it just works when using the Linux ISC DHCP server.
Of course there will only be a conflict when both MAC addresses are active at the same time, which probably cannot happen with the intended usage.
However, it will surely introduce the potential for errors when fixed IP addresses are configured for other purposes.

Is this a MIKROTIK rule as i cannot find this in the RFC? I have multiple other Routers and only really cheap router prohibit this aswell. Most other routers allow me this setting, alltough my
main firewall just ignore the static reservation if the ip is already taken…

For me, this limitation results in “more work, running a second device just for a better (more usable) dhcp”

Edit1: added questionmark

long time ago this was made thas way.

As a workaround you can try to set up VRRP interface (without any slave interface, so you can add additional DHCP server (might work) and then add lease with different servers but same IP address. It is not something that can be changed easily.

I understand this, but please also understand that unneeded limitations sometimes result in extra work for your support (for explaining the limitation) and for
your customers (for creating a workaround).

Did not work, the duplicate-check is still complaining, even on a different dhcp-server. I think that this isn’t good aswell :wink:

It might well be that another user has caused work for support by setting static IP addresses using DHCP and not checking that
every device has a unique address, then getting very strange and not-reproducible effects.
I have seen other postings where users were requesting extra checking/limitations to prohibit them from fouling up.
So the situation is not so easy. There probably would have to be an extra checkmark (default off) with “allow duplicates” that the
user would have to set before doing this and with many people asking what it is for.
Maybe it is easier when you just configure a static IP on your camera.

I have over 50 cameras, and my gateway or ntp sometimes change, so dhcp ist the preferred way :wink:

Configuration-faults are marked red in winbox, so i wonder if there should be an option to highlight “unsecure” configuration as blue, or any other color.
But i know, this isn’t easy aswell.
I’d be very happy with an “allow duplicates”-setting, maybe even “allow duplicates-(beta)” for declaring it as an untested feature, but currently it seems to be easier to setup
a seperate linux-instance just for this. this would be a perfect usecase for a small linux-distro in metarouter, but sadly there is not much progress i see and i don’t like old openwrt.

For a quick solution I would add a Raspberry Pi running Linux. It can often be used to add small functions that RouterOS cannot provide.
Indeed it would be nice to have a Metarouter running a standard Linux (e.g. Debian) instead of openwrt.

as I said before but this time I will make it clearer - allowing same IP address for different MAC addresses would require a general overhaul of DHCP server in RouterOS. Sorry, it is not on the “possible feature list” for now.