3

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!

o.comp
  • 159

2 Answers2

3

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.

LawrenceC
  • 75,182
0

Using Debian for your Raspberry Pi

https://wiki.debian.org/RaspberryPi

you can made a DHCP Server and assign :

https://wiki.debian.org/DHCP_Server#Assign_fixed_addresses

where are some examples to make your host with fixed address:

you can manage your dhcp leases in this path there you can set as never expires.

/var/lib/dhcpd.leases

an example:

lease 192.168.1.13 {
  starts 3 2015/05/07 02:21:31;
  ends never;
  binding state active;
  next binding state free;
  hardware ethernet 00:17:3f:be:95:65;
}