How do I permanently assign an IP address with DHCP?
I am wondering if there is anything (software or hardware) out there that can do something I think I may have made up, Dynamic Static IPs. The idea is that when a new device connects to the local network this device/software acts as a DHCP server, if the device is new then it dynamically assigns it a new address that has never been used before and stores this MAC Address IP Address combination in a database, if the device's MAC is in the database the devices gets the same IP as before.
I am aware this is similar to sticky IP allocation but I don't want the IPs to stick for a while I want them to be superglued on for ever.
Bonus question: Is this possible using a Raspberry Pi running Raspbian on a network with around 100 devices? The RPi is already acting as the DHCP server and the router has this capability but it is turned off.
Many thanks in advance for any and all help offered!
Solution 1:
Most DHCP servers work this way, it's just they don't permanently assign the IP to a host.
On Linux, using isc-dhcp-server
, it's possible to set the lease duration to never expire.