Community discussions

MikroTik App
 
User avatar
senseivita
newbie
Topic Author
Posts: 35
Joined: Fri Jan 01, 2021 4:20 am

How do I configure multiple static leases per client in a single location?

Wed Jan 11, 2023 8:24 pm

I remember there was a place in winbox to set multiple addresses/static leases per client (it's been a while), and each consecutive address was added clicking on those ↓ buttons. When a client came online, it would sort things out and pick the address matching the network automatically. I'm trying to get there again, if I didn't imagine it in the first place, but this time around I can only replicate this functionality setting an IP address pool for the client first. This wasn't needed before, as far as I can remember, addresses were added right in the DHCP Lease window at the bottom, but I could be mistaking this with a lot of other places in winbox that allow the same thing.

I mean… Address List itself can be added several times, but from what I understand that doesn't assign address to client but rather adds its (the client's) address/lease to a(some) list(s), is that correct?
Screen_Shot_2023-01-11_at_10_27_43_AM.png
I only use the appliance for DHCP now, so I rarely have to log in (or use webfig) and I lost familiarity with it as a result.

Thanks!
You do not have the required permissions to view the files attached to this post.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: How do I configure multiple static leases per client in a single location?

Wed Jan 11, 2023 9:14 pm

I'm not sure if I understand your exact use case.

If you would like to have a pool of addresses from which single client (most of times identified with MAC address), then I don't see any point of doing it (instead of having single IP address).

If you have multiple IP subnets and you'd like to have static IP address in any of those IP subnets, then you can add multiple static leases (IP->DHCP server->leases ... Add new). There are 3 fields you have to enter/select: MAC address (enter same MAC address every time), Server (select name of DHCP server serving a particular subnet) and Address (enter IP that should be leased to tgat client, make sure it 8s a valid <IP address for selected subnet). You'll end up with multiple static leases, all for same MAC address, but with different IP addresses and DHCP servers.
 
User avatar
senseivita
newbie
Topic Author
Posts: 35
Joined: Fri Jan 01, 2021 4:20 am

Re: How do I configure multiple static leases per client in a single location?

Tue Jan 24, 2023 8:57 pm

That (sort of) is what I've been trying. But unless I add them one by one without relation to one another, it won't work, check this out (in the pic below) the server (in hexa) should match second (and third) octet of the address (in decimal), it's pretty straightforward. Instead it assigns addresses at will from the pool without considering the subnet. I also tried setting the server as "all" thinking somehow it would sort itself out magically, but it wasn't the case though. The only two ways it was worked so far is when entries are added one my one, by hand (though that Copy button: best feature ever) or when reservations aren't used at all.

Image

There needs to be better documentation. Thanks anyway, I'll keep trying.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: How do I configure multiple static leases per client in a single location?

Wed Jan 25, 2023 9:27 am

The addresses for your special device should not be configured in special pool (you have swcentral4 pool), only as static leases ... which seem OK.

As I understand how DHCP server works is this:
  1. each L3 interface (those interfaces that have IP address assigned) on router should run a single DHCP server ... and that DHCP server has to be configured properly (dhcp network part of config, pools, static leases per DHCP server)
  2. when DHCP discover packet arrives at L3 interface, particular DHCP server instance will pick it up and ultimately it'll send DHCP offer which matches client best ... It'll either be dynamic lease, taken out of appropriate pool. Or it'll be static lease, matching client-id, assigned to appropriate DHCP server.
So I think one of your problems is that you have number of address pools and possibly used in invalid way.

You can post textual export of DHCP config so we can verify (screenshots don't work well). Open terminal window, execute command /ip dhcp-server export and copy-paste output here (put it inside [code] [/code] formatting block for better readability).

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 62 guests