Setting static IP address

Hi

First time Mikrotik user.
Using an RB962UiGS-5HacT2HnT
How do you make an assigned IP address static?

I am using the basic web interface at the moment.

Also I have about 100 sensors that are currently assigned dynamic addresses.
Is there a command to change all current connections to static or will I have to do them individually?

/ip/dhcp-server/lease/make-static [find where dynamic]

2 Likes

Many thanks.

Using WinBox you have to select one or more entries, right button and then select "Make static"

Yeah, but with 100 entries that can be a bit tedious...

Why?

The user use web interface on one UNDEFINED version, not winbox, but on winbox........

Not too much If they all have addresses form particular IP pool.

Hence:

Come on people!
The user asks a question, it has been answered, there is NO NEED to add irrelevant postings.

In this case, I really don't know if it's that irrelevant...

In context. I needed to set static within an hour or so of installing a Mikrotik router.
We have an unreliable grid supply and power failure with dynamic addressing can cause a huge amount of work if addresses change. Normally we run on a battery system which means it has not in the past been an issue.
Unfortunately our inverter went down with unrecoverable error last week.
I was able to cut and paste the command suggested and job done.

Didn't have to install or find my way around winbox.

There are some who do not like CLI and the additional method is just for them.
It does not hurt anyone to show the alternative. Sometimes the most obvious solutions lurk just behind the corner.

What hurts is people whining about not mentioning the RouterOS version, not including a configuration export, forcing users to use another solution, etc.

Since your complaint is general, and not specific to this topic,
I generally find it rather stupid not to suggest a better (and OBVIOUSLY different) way to do the same thing if it can be done better.

So, for XY problem, you'd be better off letting the user focus on finding a solution to a certain task,
rather than figuring out what they actually want to achieve in the end.

Excellent.

https://en.wikipedia.org/wiki/XY_problem

1 Like

If one is not a psychic then it takes a few conversation cycles to determine that correspondent actually has an XY problem. So for non-psychic people it's only natural to offer a straight-forward answer/solution and only if/when correspondent comes back with another question it triggers the "XY-problem detection" procedure.

In this particular case user asked about how to do a particular task and user also stated that he was a new ROS user. IMO using GUI is a tad easier for new users (well, perhaps not so much for new WebUI and Winbox4, IMO they make seeing the whole configuration tree a bit harder), so answers by @BartoszP and @rextended are IMO well placed. Yours as well, don't get me wrong.