How to reserve IP addresses for some hosts and ignore other hosts

As the title describes, I want to reserved IP addresses for known hosts, and ignore unknown devices plugged into my network. How do I do that in /etc/config/dhcp?

P.S: yes I do know that they can manually set their IP address, but at least they need to know all the parameters, which is not trivial for a stranger.

Use start=254 limit=0 and add a static lease with a random mac for this address.
You can then create static leases as usual for the legitimate hosts.

2 Likes

Be aware that no DHCP for unknown hosts does not imply any security, at all. Usually there shouldn't be any harm in giving them a dynamic DHCP lease, at least not from the security point of view.

That seems rather workaround-y to me. Is there a functional difference to what the forum user below suggested?

1 Like

In practical terms you are talking about mac filtering where only allowed mac get a IP address.
To set up that in luci under dhcp isn’t harder than anywhere else.

But still, this isn’t a meaningful security arrangement and you will have to run for your own tail until you spinn around so much you get dizzy.
And this solution only get worse as more and more mobile devices haw mac randomization as standard.

The only devices in a network using fixed IP are servers and basic network hardware (switches and access points) that must find each other on admin level no matter what.
Devices that only use the network for daily work doesn’t need fixed addresses.

1 Like

Right, I had forgotten there was this option :smiley:

1 Like