Implementing Dynamic Host Configuration Protocol ( DHCP )
Benefits of using DHCP
DHCP reduces the complexity and amount of adminstrative work by using automatic IP configuration.
Manual IP Configuration
- Ip adress are entered manually.
- Ip adress could be entered in incorrectly
- Communication and network issues can result
- Frequent computer moves increase administrative effort.
Automatic IP configuration
- IP addresses are supplied automatically
- Correct configuration information is ensured
- Client configuration is updated automatically
- A common source of network problems is eliminated.
Benefits of using DHCP
- DHCP stands for “Dynamic Host Configuration Protocol”. It Requires the complexity and administrative tasks efforts by using automatic IP configuration.
- There are two methods of IP Assignment that is Manual IP Configuration and Automatic IP Configuration.
Manual IP Configuration Versus Automatic IP Configuration
- The Administrator has to enter the IP Address Manually to each machine by machine. It is a tedious task example if your company has 200PCs then it is practically not possible for desktop administrator. Automatic IP Configuration using DHCP resolves this problem.
- Also Manual IP address could mismatch or it can be entered incorrectly resulting into a network communication issues. DHCP ensures correct configuration information and the client configuration is updated automatically.
- If a computer is moved from one department to another department, it can lead to change of the IP address and more administrative effort. By using DHCP the common network problem is eliminated.
DHCP process to allocate IP Address to the client
An IP adress is allocated or leased to a client machine by a DHCP server for a time period. For windows server 2012, the default lease period is 8 days. After 8 days the IP has to be renewed.
- A client with a static IP configuration is a Non-DHCP client. The IP of Client 1 and Client 2 are configured automatically by DHCP server.
- As soon as a client connects successfully to a network, DHCP allocates or lease an IP address, This process is called lease generation.
- Client 2 is reconnecting to a network so using DHCP database, The DHCP Server renews the lease as per administrator instructions.
DHCP Lease process
- In DHCP lease process, a client obtains a lease for an IP address from a DHCP server.
- The Default lease period is 8 days.
- Before the expiry of the lease duration, The DHCP client must request for a new lease.
- Leases are retained in the DHCP database for approximately one day after expiration, this is DHCP grace period.
- This Grace period is given to protect client’s lease if client and server are in different time Zones or if their internal clocks are not synchronized or when the client is off the network when the lease expires.
DHCP Renewal Process
- As per the Last section, we have seen the DHCP lease process, This section gives information about lease Renewals.
- The Lease renewals occur when a client already has a lease and the client needs to renew.
- To ensure that the IP addresses are not left in assigned state even when they are not required, The DHCP server places an administrator defined lease duration on the assigned IP adress.
Working of DHCP Lease process
- This process uses 2 important components, DHCP client and DHCP server.
- DHCP client requires the new IP address from DHCP server.
- DHCP server initiates a IP Lease process, this is also called as DORA process,
D: Discover , Here the DHCP client broadcast a DHCP discover packet on the network.
o: Offer, In this process DHCP Server broadcasts the DHCP offer packet, This packet contains the information about the DHCP server and its network scopes.
R: Request, This is initiated by DHCP Client, Here the DHCP Client broadcasts the DHCP Request packet, Requesting for the IP address from the DHCP server
A: Acknowledge from the DHCP Server, Here the DHCP server broadcasts the acknowledgement to DHCP client request about the assigned IP address Note, In this process the DHCP server gives the IP address to the DHCP client and notes the MAC (media access control) of the DHCP client.
The DHCP broadcast uses UDP port 67 and 68, DHCP Server uses UDP 67 and DHCP client uses UDP port 68
DHCP Renewal Process
The Last process we have seen was DHCP “DORA” process, DHCP DORA is used to assign IP address to the DHCP Client machines.
Now we need to understand about DHCP Lease Renewal Process
- Since the lease duration set by the administrator is about to expire , the DHCP client initiates a broadcast DHCPREQUEST packet.
- The DHCP Server1 sends a broadcast DHCPAck (Acknowledgement) packet.
- If the Client fails to renew lease after Expiry of 50% of its lease duration time, The DHCP Renewals process begins again after 87.5% of lease duration time has expired.
- Again if the client fails to renew after expiry of 87.5% of its lease duration time, the DHCP renewa process starts over again with a DORA process.
DHCP Renewal Process occur when 50 percent of lease duration has expired or during startup, even if more than 50 percent remains. This is because a computer might have been relocated to a different department on the same corporate network.