Computers should have IP addresses for communication purposes. There are two ways to assign an IP address and can be done by using a static IP or dynamic IP. Assigning IP addresses using a static IP is manually typing in an IP address, a subnet mask, default gateway and a DNS server through the computer’s network configuration page. This method takes a lot of effort if you have several computers to input an IP address manually and individually. Also, you have to make sure that you have to input unique IP addresses because if there are the same IP addresses on the same network, it can cause IP conflict on each computer with the same IPs and will not be able to access the network. This is where a DHCP will be of much help.

A dynamic IP is when a computer gets an IP address from a DHCP server. Dynamic Host Configuration Protocol or commonly known as DHCP, has its goal to assign unique IP addresses to our hosts. It also provides other network addresses such as the subnet mask, the default gateway and the DNS address. It comes as a client and as a server. DHCP servers can be run on routers or servers. What is its role? If your laptop does not have an IP address, the DHCP server will assign an IP address automatically to you.

For example, if your computer is set to obtain an IP address automatically, the computer will broadcast a request for an IP address on the network, then the DHCP server will give an IP address to the computer. To verify all the settings the DHCP server has given to your computer, you can access them by opening a command prompt and typing in ipconfig /all and there you can see that the DHCP is enabled which means you are getting your IP address from a DHCP server. You can also see from here the IP address that has been assigned to your computer, with the subnet mask, the default gateway, and your DNS server.
Now, the question is where does a DHCP server get its list of IP addresses to be used by clients? The answer is from its scope. A DHCP scope is a range of IP addresses that a DHCP server can assign. It has a range of IP addresses that are available for assignment and it will be specified by your network administrator. The DHCP server assigns the IP addresses as a lease which means it has an expiration. It will specify how long will the clients will be able to use their assigned IP addresses. For example, the lease could be for 3 hours. The lease will make sure that your DHCP server will never run out of IP addresses from its scope. If the IP addresses are leased, once the computer has not been already connected to the network, the leased IP address will be given back to the DHCP server so that it will then be re-used for other computers that will be connected to the network. This means that once your computer or device is disconnected occasionally, you will also have different IP addresses every time you are connected depending on the available IP address on the DHCP scope.
If you wanted your computer or device to have a specific IP address all the time, you can create a reservation on the DHCP server. A reservation will make sure that your computer or device will be given the same specific IP address every time it connects to the network and request for an IP address from a DHCP server. All you have to input is the MAC address and a specific IP address so that every time your computer or device tries to connect to the network, your DHCP server will give the reserved IP address in corresponding to your MAC address. Reservations are typically given to special devices or computers which should be given the same address constantly such as servers, routers, etc.
