Friday 26 April 2019

networking - 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!



Answer



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.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...