Here is how I have always done it:
First set the static IP on the device, then define it under fixed leases.
However I see you can convert an existing Dynamic Lease to Fixed with a radio button on the right edge of the Dynamic Lease. I see that it moves the device to the Fixed section, but leaves the IP alone. So the IP remains what it was when it was in the Dynamic Pool.
It is not clear to me, is it okay to leave this IP as-is and IPFire will know not to ever use that IP for another Dynamic device? Or must you manually change the IP to something outside of the Dynamic range? If you do the latter, must you then go into that deviceâs network settings and set the same static IP on it? Or can you leave the device set to Dynamic?
You should change the IP to outside the Dynamic Range.
It might work with it set like that but if that PC was ever disconnected from the network for some time then that âfixedâ lease could end up being assigned to another machine and now no longer available to be used by the fixed lease machine.
If you have set the client up with a staic IP then you would need to go and change that IP.
I always have my clients set up with dhcp so they ask IPFire for an IP and the fixed lease ensures that they always get the same IP.
It also means that if I want to change the fixed lease IP then I can just change the fixed leases and then reboot the client machine so it requests an IP from fresh.
search for fixed leases definition (MAC, IP) for a requesting MAC; if found, hand out this IP
otherwise choose an IP from the dynamic pool ( based on usage age, ⌠), check if the IP is active; if inactive hand out this IP, otherwise choose another IP.
This shows, if you have any static or fixed IPs which are an element of the dynamic pool, you may run into double instances of these IPs. Device not active during check â IP can be handed out; activation of device â IP becomes active at the device ( either by static definition or by fixed leases definition ).
dhcpd does not check for this doublings, in case of static definition it is even impossible.
EDIT: Iâve tried to clarify this in DHCP wiki page.
Obviously not relevant here from what has been posted and IPF does not use dnsmasq, but dnsmasq allows you to have a static lease inside or outside the DHCP pool as it makes a permanent reservation whether or not the device is continually connected to the LAN.
Windows Server does the same in its DHCP Server config. You can convert any dynamic IP to âreservedâ which is equivalent to converting that IP to fixed.
As an addendum, here is what it looked like for me converting an existing dynamic lease to fixed:
-clicked on the Add button next to a dynamic lease. The device was moved into the Fixed Leases section, but with its existing dynamic IP.
-I then manually changed the last octet of the IP out of the dynamic range. At this point, the device is showing in both locations with two different IPs.
-I then went to Who Is Online and updated the IP of the device to the new fixed IP. It was showing as offline.
-I checked the IP at the client and it was still showing the old dynamic IP.
-I then went to the client and from Command Prompt, issued 'ipconfig /release" and âipconfig /renewâ commands. It took a minute for it to renew, but when it did, it came back with the new fixed IP.
-I went back to IPFire DHCP page and the dynamic IP was showing with a strikethrough.
-I rechecked and clicked the update button in Who is Online and this time it showed as online.