Community discussions

MikroTik App
 
jacksony
just joined
Topic Author
Posts: 3
Joined: Fri Aug 31, 2018 5:30 am

DHCP Static Assigned IP Issue

Fri Aug 31, 2018 9:39 am

Hi,

We have switched from Ubiquiti to MikroTik and so far, so good.

However there is one problem which we find it very strange and we need to know the best and easiest solution for this.

We have DHCP running, eg. 192.168.1.1/24.

What we want to do is to bind some devices like a printer to a fixed static DHCP IP, example 192.168.1.2.

We have set the static IP onto the printer (192.168.1.2).

However we noticed for all devices which we have set the static DHCP IP for, it will NOT show up in the DHCP Server (under leases).

When we tried to manually add a lease for it by adding the IP with its MAC Address, it is always having the "waiting" status.

The reason why we want these static assigned dhcp IP to appear on the "Leases" list is so that we can right click to make it "Static" so it will not be dynamically assigned other IPs.

Can you advise how we can resolve this issue?
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: DHCP Static Assigned IP Issue

Fri Aug 31, 2018 12:20 pm

However we noticed for all devices which we have set the static DHCP IP for, it will NOT show up in the DHCP Server (under leases).

When we tried to manually add a lease for it by adding the IP with its MAC Address, it is always having the "waiting" status.

DHCP Server will inspect the ARP table for IPs being already used in the network (as those statically set up on other network devices), prior to handing them, that's why it won't assign any IP from the pool, doesn't matter if static or dynamic lease, it won't happen.

What we want to do is to bind some devices like a printer to a fixed static DHCP IP, example 192.168.1.2.

Proper method:
  1. Set all those network devices to DHCP
  2. Go to IP > DHCP Server | Leases tab. Devices that got an IP assigned will appear on Leases as Dynamic entries (D flag), bound state
  3. Locate those devices you want to have a fixed IP assigned always, i.e. the printer: right click -> Make Static
  4. Double click on the just created static lease (no D in front) and edit the IP, comment, etc.

This way DHCP Server will assign same fixed IP each time a given device asks for one.

This is also best practice: you control all the network devices from a single point, the router. No need to run after printers or PCs, ask for remote access, etc.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11593
Joined: Thu Mar 03, 2016 10:23 pm

Re: DHCP Static Assigned IP Issue

Fri Aug 31, 2018 2:41 pm

What we want to do is to bind some devices like a printer to a fixed static DHCP IP, example 192.168.1.2.

We have set the static IP onto the printer (192.168.1.2).

However we noticed for all devices which we have set the static DHCP IP for, it will NOT show up in the DHCP Server (under leases).
By setting printer with static IP address you actually switched off DHCP client on it. So it's just normal that DHCP server doesn't notice printer requesting IP address as it doesn't happen.

Instead you should do as @pukkita wrote: set printer to use dynamic address (enable DHCP) and then make binding for individual devices static.
 
jacksony
just joined
Topic Author
Posts: 3
Joined: Fri Aug 31, 2018 5:30 am

Re: DHCP Static Assigned IP Issue  [SOLVED]

Mon Sep 03, 2018 3:18 am

Thanks. It is resolved.
 
bazanga
just joined
Posts: 3
Joined: Sun Mar 29, 2020 12:46 pm

Re: DHCP Static Assigned IP Issue

Sun Mar 29, 2020 7:49 pm

BUMP!


Im having an issue where already static assigned device grabs new, DHCP provided IP.
Ive already rebooted the device multuple times and also router.
Didnt help.

Why does this happen ?
Is this a bug?


I use RB4011iGS, lates RouterOS and FW. All packages updated.
 
Buhamoney
just joined
Posts: 1
Joined: Fri Jul 24, 2020 12:57 pm

Re: DHCP Static Assigned IP Issue

Fri Jul 24, 2020 1:07 pm

BUMP!


Im having an issue where already static assigned device grabs new, DHCP provided IP.
Ive already rebooted the device multuple times and also router.
Didnt help.

Why does this happen ?
Is this a bug?


I use RB4011iGS, lates RouterOS and FW. All packages updated.
This is what happened to me exactly
The dhcp server assigned a new IP right in front of my eyes for my static IP IP PBX and destroyed weeks of work !!!!!!!!!!!
Before I had a chance to right click on the address and make it static
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2993
Joined: Mon Apr 08, 2019 1:16 am

Re: DHCP Static Assigned IP Issue

Sun Jul 31, 2022 11:47 pm

The "client id" in the static lease record must be undefined or correct. Or the static lease entry will not be used.

"DHCP static lease IP" cannot be the same as a local static (=non-DHCP) IP address in the client device. (DHCP lease address is not accepted by the client, because duplicate address)
 
ecortez
just joined
Posts: 1
Joined: Thu Sep 28, 2023 9:40 pm

Re: DHCP Static Assigned IP Issue

Thu Sep 28, 2023 9:48 pm

The "client id" in the static lease record must be undefined or correct. Or the static lease entry will not be used.

"DHCP static lease IP" cannot be the same as a local static (=non-DHCP) IP address in the client device. (DHCP lease address is not accepted by the client, because duplicate address)

Thank you, this was I needed. Once, I opened my "static" ip address on the DHCP server, I was able to removed the "Client ID". reset the services on the client and it picked up the correct address.
Very helpful tip. It has solve quite a few of my issues with my different VMs and other devices, picking up different addresses once their leases are up. Thanks again.

Who is online

Users browsing this forum: Google [Bot] and 72 guests