(no title)
teach | 1 month ago
I've had a similar problem in the past. It turns out that most routers have a way to assign an IP address statically based on the MAC address of the requesting device without affecting the other DHCP devices on the network.
I do this for my pi-hole, my NAS and my gaming PC.
lostlogin|1 month ago
I thought that step one of geekdom was assigning a few static IPs.
Ruining the home network while ‘optimising’ has happened a few too many times.
Neywiny|1 month ago
hunter2_|1 month ago
tzs|1 month ago
Let's assume the LAN is 10.0.0/24, so addresses of devices on the LAN are 10.0.0.1-10.0.0.254. In the following I'll omit the 10.0.0. part of an address, so will just refer to addresses 1-254.
Find the range DHCP manages, which should be somewhere in the router settings. If it is 1-254 reduce it. Let's say it is 1-200 (either by default or after you have reduced it).
Then you can simply go the settings on your server or other device that you want to have a static address and configure it to use a hard coded address outside that range, such as 201.
A possible downside of that is that on some devices if you want to give it a hard coded address you also have to hard code the gateway address and the name servers.
Some devices though have an option to use a hard coded address but still get the gateway and name servers from DHCP.
In summary, there are three ways to manage address for a given device on most home routers.
1. DHCP assigns the address. It can choose any address in its pool. Each time the device needs an IP address, such as after a boot or when its lease expires, it could get a different IP address.
2. DHCP assigns the address, but you can tell it to give a specific address from the pool to a given device identified by the device's MAC address.
3. Tell the device to use an address outside the router's DHCP pool. It's up to you to decide how to assign these address and how to make sure no conflicts arise.
For #2 if you want some device to have a fixed IP address but you don't actually care what that address is, many routers have an easy way to do that. Connect the device under #1, so DHCP picks the address.
Then go find the table in the router's web interface that shows all currently connected devices and find your device. Many routers will have a toggle in there to tell it to switch to #2 for that device. From then on the device's current address will be reserved for it.
That's a little easier than going through their "assign an IP" dialog, because that usually makes you enter the MAC address. If you go through the connection table details it doesn't have to ask you for the MAC address.
bartvk|1 month ago
galleywest200|1 month ago