2
1
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!
And what happens when you run out of IPs? – heavyd – 2015-05-07T14:49:56.550
Good point. However on the size of network I am operating the 255.255.0.0 subnet would allow this setup to operate for many years without trouble. – o.comp – 2015-05-07T14:50:52.140
What you're after is just a DHCP server... if you want to "permanently" provide the same device the same IP then you would need to either give it a static IP or tell the DHCP server to "reserve" that MAC address an IP... Raspberry Pi uses a Linux distro that can run a DHCP server... http://www.ronnutter.com/raspberry-pi-dhcp-server-reservation/
– Kinnectus – 2015-05-07T14:53:30.6431Ideally you should update your question with a bit more information about your network... What OS is your Raspberry Pi running? Is your Raspberry Pi the DHCP server for your network? Do you have an existing router on your network that does DHCP? Do you want this to continue providing DHCP? – Kinnectus – 2015-05-07T14:57:31.763
Just as a remark: I have a router that has an option called static DHCP, which does exactly that (well, it drops its database when it loses power, but that's a different matter)
– Slizzered – 2015-05-07T18:16:34.110These are reserved addresses. Please don't use the term "static" in such cases. (I discuss this in this answer...)
– TOOGAM – 2017-11-06T10:09:50.127