Skip to content

Mastering networks

Intro to DHCP

Dynamic Host Configuration Protocol or DHCP is a networking protocol that allows a particular server to assign TCP/IP configurations automatically to client computers on the same network. In windows, we need to setup windows server server role to have DHCP on our network.

The DHCP server automatically assigns the IP address, subnet mask, DNS server address, and gateway of a client computer. The configuration is not permanently given to the client computer. Instead it is leased to the computer for a certain period. Once the lease period expires, the client computer has to reach back to the DHCP server and renew it’s existing lease or create a new configuration and then lease again.

The IP addresses that cannot be handed out to clients are DHCP exclusion. The reserved IPs are known as DHCP reservation. Some IPs might also be occupied as some computers can take IP addresses as they are available. If an IP is available, it is given to the requesting client for a certain amount of time(DHCP lease, default is 8 days). It is very similar to how a hotel room would be assigned to an incoming guest.

Admins can:

  • specify DHCP IP address range (scope)
  • prohibit IP addresses (exclusion)
  • reserve IPs based on MAC addresses (reservation)

A computer assigns itself a private IP like 169.254.X.X if no DHCP server is found on the network. When it gets connected it sends a DHCP Discover request to the entire network. The DHCP server, upon receiving the request, sends back a DHCP Offer containing TCP/IP config and the lease information. The client then accepts the offer and send back a DHCP Request. Finally, the server sends back a DHCP Acknowledge message. Once the client gets the acknowledgement, the process is completed.

DHCP cannot always be used. DNS servers, domain controllers, printers/scanners, or any server providing an essential service needs static IPs. This is because while we can use DHCP reservations for these type of use-cases, we still have a single point of failure which will be the DHCP server. That’s why it is necessary to manually assign static IPs to the servers critical for business operation so that when the DHCP servers crashes or the lease expires, the critical server will revert back to it’s private IP.

Configure DHCP and static IPs on windows

  • Go to network and sharing center
  • select ethernet adapter
  • select properties > enter IPv4 properties

Configure static IP

  • To assign static IP, input IP address, subnet mask & default gateway
  • to check if it’s assigned properly use ipconfig from CMD

Configure DHCP

  • To use DHCP, keep the option as “obtain IP address automatically” and check ipconfig for the assigned IP


© 2020-2025 Ucchas Muhury