Community discussions

MikroTik App
 
rivey
just joined
Topic Author
Posts: 6
Joined: Sat Jun 24, 2017 2:49 am

MAC Reservations

Sat Jun 24, 2017 3:01 am

This may be simple to some but I have searched the forum and can't find instructions on how to setup mac reservations for specific devices. I don't want to have to go into every device and set static ip's, I would rather tell the router that if my laptop as an example is connected to the network that is should be assigned ip address say 192.168.0.102. Any help would be greatly appreciated.
Thanks, Bob
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: MAC Reservations

Sat Jun 24, 2017 3:30 am

If you'd searched for "static lease" I'm sure that would have given a bazillion results....

But anyway, to answer your question:
1) Connect the laptop to your network and get an IP from DHCP as usual.
2) Go into the Mikrotik's IP > DHCP-Server menu and click on the leases display.
3) Scroll through the leases and find your laptop's lease and double-click it
4) In the window that opens, there is a button on the right hand side "make static"
5) Click that button and you're done.

Once the static lease exists, you can edit it and change the IP address that gets assigned if you want a specific address. If you do that, go on your laptop and do an ipconfig /release then an ipconfig /renew - you'll have the new address. (or just disconnect it from the network and re-attach it)

Note that if you sometimes use the wired ethernet connection and sometimes use WiFi on your network, that these two interfaces have different MAC addresses, so you'll need to assign a static lease for both of them if you want to cover all of your bases. Oh, and you'll have to use a different IP address for each MAC address - there's no getting around that AFAIK.
 
rivey
just joined
Topic Author
Posts: 6
Joined: Sat Jun 24, 2017 2:49 am

Re: MAC Reservations

Sat Jun 24, 2017 4:13 am

Thanks so much for the fast and accurate reply. Worked perfectly and already have been setting up laptop wired and wireless as separate ip's. To me, that just makes sense. One other question, other that in comments section, is there any way to enter an id for each lease? As example, "Bob's Laptop Wired". Also, is there a way to print out the static lease assignments? And if so, can they be ordered by different variables?

Thanks again for the super reply.
Thanks, Bob
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: MAC Reservations

Sat Jun 24, 2017 7:06 am

Thanks again for the super reply.
Thanks, Bob
No problem.

As for labeling your leases, just put a comment on each one (the little yellow sticky-note icon on the tool bar whenever you have one highlighted, or else double-click one and there's a comment button on the side of the window near where "make static" was....

To print them, you can open a terminal window and issue this command:
/ip dhcp-server lease print

There might be an ordering option on the command-line (use ? in your command to see what options are available) but I'm not sure. Once they're printed to the screen, you can copy-and-paste them into Excel and use the text-to-columns feature to make them individual columns and sort in Excel (or whatever spreadsheet app you may have lying around).
 
Marcus1
just joined
Posts: 1
Joined: Sun Nov 04, 2018 11:29 am

Re: MAC Reservations

Sun Nov 04, 2018 11:49 am

Good day,

Please assist, i am network support agent, i have come across where i need to add/make mac reservation, static IP Reserve.
I have to two questions,

1. If MAC address doesn't show up on leases, can i add it or maybe i need to plug LAN cable from RouterBoard to PC before?
2. How is IP DHCP reservation helps? because what i observe was the connection inconsistent.
3. If i have to add IP DHCP reservation which static IP i should use?

Regards
Marcus
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1497
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: MAC Reservations

Mon Nov 05, 2018 7:37 am

Please assist, i am network support agent, i have come across where i need to add/make mac reservation, static IP Reserve.
I have to two questions,

1. If MAC address doesn't show up on leases, can i add it or maybe i need to plug LAN cable from RouterBoard to PC before?
2. How is IP DHCP reservation helps? because what i observe was the connection inconsistent.
3. If i have to add IP DHCP reservation which static IP i should use?
I am assuming that you are asking if you can create a static reservation for a device that is not connected and therefore does not show up in the DHCP leases listing. If that's the case, the answer is yes - I do it periodically.
I normally use WinBox so I am going to give you a step by step when using WinBox.
Start with an existing DHCP lease. Double click on it to bring up the edit box for that lease. Then select Copy. That will create a copy of that lease (named "New DHCP Lease"). Edit the following fields: Address, MAC Address, and Client ID. I suggest also adding a Comment so you know what this reservation is for.

Who is online

Users browsing this forum: Amazon [Bot], fxcd and 97 guests