Community discussions

MikroTik App
 
idanmikos
just joined
Topic Author
Posts: 19
Joined: Thu Nov 01, 2018 2:45 pm
Location: Bucharest

How to go back to dynamic IP in DHCP server

Fri Apr 05, 2019 10:33 pm

Hi all,

Newbie here... using a hEx3 routerboard which works great in my office.

Just figured out how to set a fixed IP for some devices in IP-DHCPserver, by right clicking on that devices entry and set 'Make static'.
But how on earth can I go back to dynamically allocated IP in the same Winbox menu?

Thanks.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21297
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: How to go back to dynamic IP in DHCP server  [SOLVED]

Fri Apr 05, 2019 10:45 pm

Quick guess is to delete the lease??
 
idanmikos
just joined
Topic Author
Posts: 19
Joined: Thu Nov 01, 2018 2:45 pm
Location: Bucharest

Re: How to go back to dynamic IP in DHCP server

Fri Apr 05, 2019 10:50 pm

Thanks for the quick reply, Anav.
But what if once reconnected it will not lease a new IP to that device? Just maybe...
I would rather like to have a simple menu type choice - 'Make dynamic'.
 
wise0tamas
just joined
Posts: 14
Joined: Sun Oct 03, 2010 1:12 am

Re: How to go back to dynamic IP in DHCP server

Fri Apr 05, 2019 11:34 pm

Hi!

Why would you go from static back to dynamic? What might be the use case?
And why do you think, that dynamic would not be like its name: dynamic? :)

If you want the device to always be available via the same IPv4(/IPv6) address, then make it static; if you do not want this device to be a server, then don't make it static.
If you (e.g. by error) made a dynamic lease static, the lease can be deleted, then (before the old lease ends, as the client does not know about the server changing its configuration!) the client will first try to get that old IP address back, and if the DHCP server does not see it free, then it gives the client another address, otherwise, the client gets back the old address (but this time, it will be dynamic).
 
idanmikos
just joined
Topic Author
Posts: 19
Joined: Thu Nov 01, 2018 2:45 pm
Location: Bucharest

Re: How to go back to dynamic IP in DHCP server

Fri Apr 05, 2019 11:44 pm

Thanks, Wise.

My question was more like academic, as you're right, no need for dynamic lease in normal environments.
Strange that the 'Make static' option does not have the 'Get back to dynamic' option too.

Have fun.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 21297
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: How to go back to dynamic IP in DHCP server

Sat Apr 06, 2019 1:02 am

Not really, its a one way decision. If you want to make it dynamic one deletes the fixed lease and DHCP works as advertised afterwards
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1568
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: How to go back to dynamic IP in DHCP server

Sat Apr 06, 2019 5:09 am

Just delete the lease and next time the device requests an address, it will get one from the regular pool.
 
idanmikos
just joined
Topic Author
Posts: 19
Joined: Thu Nov 01, 2018 2:45 pm
Location: Bucharest

Re: How to go back to dynamic IP in DHCP server

Sat Apr 06, 2019 1:57 pm

Thank you all for your support.
Have fun.

Dan
 
sleerf
Frequent Visitor
Frequent Visitor
Posts: 62
Joined: Tue Sep 13, 2016 9:12 am

Re: How to go back to dynamic IP in DHCP server

Sun Dec 29, 2019 6:40 pm

He does have a valid point. I had the same question once. I suspect it gets asked by anyone who's assigned a static by mistake and wanted it back to dynamic. The solution - deleting the lease - doesn't feel very natural - especially the first time you do it. A button that simply carried out the command would make a lot of noobs much more comfortable and save a lot of time with many people having to ask the question and wait for answers.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: How to go back to dynamic IP in DHCP server

Mon Dec 30, 2019 12:04 am

.... A button that simply carried out the command would make a lot of noobs much more comfortable and save a lot of time with many people having to ask the question and wait for answers.

That button is there already!!
RemoveLease.JPG
You do not have the required permissions to view the files attached to this post.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12619
Joined: Thu Mar 03, 2016 10:23 pm

Re: How to go back to dynamic IP in DHCP server

Mon Dec 30, 2019 8:37 am

.... A button that simply carried out the command would make a lot of noobs much more comfortable and save a lot of time with many people having to ask the question and wait for answers.

That button is there already!!

I agree with previous posters in that the wording on the button might be a bit scary for user which didn't press it before. For a cautious/frighten user the label might mean "block device from obtaining lease in the future" as well ... The only problem is that there isn't action "make dynamic" ... even in CLI there's only "remove" and if the label on the button was changed to "make dynamic", pressing it would still make lease to disappear ... probably making cautious/frighten user panic.

So this thread is actually a feature request ... for a new action "make-dynamic", which would not remove lease, it would only remove the "static" bit.
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: How to go back to dynamic IP in DHCP server

Mon Dec 30, 2019 2:00 pm

@mkx,
I disagree, if one understands how DHCP / Lease, etc works, then "removing / deleting" the lease make 100% sense.

Who is online

Users browsing this forum: pgbross, Wolvyreen and 24 guests