The Dynamic Host Configuration Protocol (DHCP) is integral to networks and controls what IP addresses devices receive so they can communicate with the internet. Usually, IP assignment is automated, but if you need static IPs, familiarity with DHCP is essential.
DHCP Can Handle IP Assignments
Every device that connects to a network needs and IP address. In the early days of networking, users manually assigned their IP addresses, but thats a cumbersome task, especially for places with many devices, such as a corporate office. DHCP, part, automates this process, which makes connecting devices to the network easier. DHCP servers or routers handle this process based on a set of defined rules. Most routers are used for 192.168.0.x range, for instance, so you will usually see IP addresses like this in home networks.
The process is pretty straight forward. When a client (a computer, IOT device, tablet, cell phone, etc.) connects to the network, it sends out a signal (called DHCPDISCOVER) to the DHCP server (or router). The server responds with all the rules and settings for the network and an IP address for use (a DHCPOFFER). The client acknowledges the information and asks permission to use the assigned address (a DHCPREQUEST message). Finally, the DHCP server acknowledges the request and the client is free to connect to the network
DHCP Controls the Range of IP Addresses
The upside to this is how many devices connect to your network simultaneously (no more than 100 in this example). But the downside is if you set the range too small you can unintentionally prevent connection of new devices. To allow for lower ranges of IP addresses, DHCP servers only lease out IP addresses to devices. The machine retains this IP address for a number of days, after which it can try to renew the IP address. If no renewal signal is sent (such as a decommissioned machine), then the DHCP server reclaims the IP address to assign to another device. When the renewal signal is detected, the device retains its IP address for another set of days. This is why your IP address may appear from time to time if you use the ipconfig option often.
It's possible for two devices to end up with the same IP, such as a VM machine that spends most of its time offline . The VM machine has been able to send the renewal signal, so its IP address will be handed out to another machine. When the VM is backed up, it still has a record of the old IP address (especially if restored from a snapshot), but it still needs to be used that IP address since it is tasks. Without that permission, it can connect to the network until a new IP is assigned. But using dynamic IP addresses should prevent this type of scenario.
Static IP Addresses are Necessary for Some Devices
If you have a network connected printer or media server (such as a NAS unit or Plex Server) it would be inconvenient for them to have their IP addresses changed. While renewal of the lease can prevent this, it's still possible for the IP address to change. If your router is restarted, you need to have a problem because you are trying to solve a problem, then all Dynamically generated IP addresses may be reassigned. For those scenarios, manually assigning a static IP address will solve the problem.
The exact process for this variety, especially as router web interfaces can change from device to device even when made by the same manufacturer. On some routers, like the Eero Mesh Router kit, this may be referred to by another term, such as IP reservation. But a static IP address still needs to conform to any range rules if they exist. Using a current IP address as the basis for a static IP is usually the easiest thing to do. Depending on the device and its operating system, it may be possible to set a static IP at the device end instead of through the router or DHCP server. This may be necessary if the router itself does not support Static IP.