Community discussions

MikroTik App
 
augustocadini
just joined
Topic Author
Posts: 3
Joined: Thu Oct 20, 2022 2:39 pm

Setting correct Static IP address in DHCP

Thu Oct 20, 2022 2:50 pm

Hi all, this is my first time setting up a MikroTik router. I would like describe my solution and verify whether it is correct.

Goal: Fix five Static IP Address in the MikroTik to protect those to not be used for other devices.

What I did:
1. Fixed the IP in the devices.
2. Accessed MikroTik -> IP -> DHCP Server -> Leases -> Add new
3. Setting up: Address, Mac Address and a comment. Then clicked on "Apply". When I clicked on "Check status", nothing happens so I nevermind.
4. Accessed MikroTik -> IP -> Addresses > Add new. Then added the five addresses.

These are the information obtained from Windows: arp -a.
192.168.5.240 60-8d-26-38-7d-90 dynamic
192.168.5.241 8c-19-b5-3c-56-08 dynamic
192.168.5.242 30-b1-b5-7a-9c-fc dynamic
192.168.5.243 30-b1-b5-7a-9d-70 dynamic
192.168.5.250 20-7c-14-f0-94-dd dynamic

The configuration is as the screen shot:
Capturar.PNG
Capturar.PNG
But, after did that, in arp -a command I continue to see the addresses as "dynamic". Does anyone could please help me? I would like understand whether that is enough to achieve my goal.
Thanks in advanced.
You do not have the required permissions to view the files attached to this post.
 
Sob
Forum Guru
Forum Guru
Posts: 9049
Joined: Mon Apr 20, 2009 9:11 pm

Re: Setting correct Static IP address in DHCP  [SOLVED]

Thu Oct 20, 2022 4:35 pm

First half (static entries in DHCP leases) is correct. Second half (addresses assigned to router in IP->Addresses) is nonsense, you don't want that at all, that actually breaks communication with those devices. As for clients seeing IP/MAC mapping as dynamic, that's correct, because to them it is dynamic, they can't know about DHCP reservations on router, and router can't influence direct communication between clients. About the whole protection, it depends. DHCP reservation will make sure that DHCP server won't give these addresses to any other client. But it won't prevent some bad client from taking them (manual config). If you'd be worried about that, it would be more difficult to solve.
 
augustocadini
just joined
Topic Author
Posts: 3
Joined: Thu Oct 20, 2022 2:39 pm

Re: Setting correct Static IP address in DHCP

Fri Oct 21, 2022 12:40 pm

Thank you for the clarifications.

I have no intention to prevent that some bad informed user set up manually a reserved IP, I will take care to make an advice to prevent someone do it. Also, I will remove the IPs added in "IP" -> "Addresses". Once done that, I hope that everything is fine to prevent DHCP to not set those IPs for new connected devices.

BTW: what happens when IPs are added in "IP" -> "Addresses"? I haven't found a specific documentation explaining it.
 
Sob
Forum Guru
Forum Guru
Posts: 9049
Joined: Mon Apr 20, 2009 9:11 pm

Re: Setting correct Static IP address in DHCP

Fri Oct 21, 2022 2:08 pm

Addresses in IP->Addresses is what router itself has. In your case, aside from wrongly added ones, you have static 192.168.5.1 on LAN interface, which is used by connected clients as gateway, and dynamic 192.168.18.13 from upstream (ISP's?) router. That's the normal part, multiple interfaces with separate addresses/subnets. You could have more, e.g. if you'd use VPN on router.

What you did with those other addresses, you added point to point config saying that router also has 192.168.5.24x and there's 192.168.5.0 as remote address reachable on ether1. Technically it would be possible, but slightly wrong. But it's definitely not what you have. It also broke communication with those devices in LAN that actually have these addresses. If e.g. 192.168.5.240 wanted to communicate with router (it may use it as DNS resolver), it wouldn't work, because when router would respond, it would send packets to itself, because it would see 192.168.5.240 as its own local address.
 
augustocadini
just joined
Topic Author
Posts: 3
Joined: Thu Oct 20, 2022 2:39 pm

Re: Setting correct Static IP address in DHCP

Mon Oct 24, 2022 2:29 pm

Very clear. Coud please refer me where I can find the fully MikroTik documentation where I can learn those concepts?

Last question: is possible to set up a fixed IP in DHCP Server for a Device connected through Wireless?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 9582
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: Setting correct Static IP address in DHCP

Mon Oct 24, 2022 2:39 pm

1) Those concepts are not related to MikroTik but about how things work, so you can't find gude written by MikroTik about the basics of how networks work.

2) Yes, the DHCP server doesn't know if the device is wireless or not,
but with the MAC address randomizer on the latest generation devices, you can have different MAC every time = different address.
 
Sob
Forum Guru
Forum Guru
Posts: 9049
Joined: Mon Apr 20, 2009 9:11 pm

Re: Setting correct Static IP address in DHCP

Mon Oct 24, 2022 2:58 pm

Correct. Just to add, MikroTik has old manual (https://wiki.mikrotik.com/wiki/Manual:TOC), which I like very much, but you already need to know what you're looking for. Then there's newer documentation (https://help.mikrotik.com/docs/), which I guess aims to be more user friedly, but personally I can't seem to find anything in there.

Who is online

Users browsing this forum: Ahrefs [Bot], AlvinAlvin, drmotaadam, Semrush [Bot], swa69er and 28 guests