What is DHCP
Why DHCP is Important
Components of DHCP
How DHCP works
Advantages of DHCP
Disadvantages of DHCP
What is DHCP
Dynamic Host Configuration Protocol (DHCP) is a network protocol used in TCP/IP network that provides and automatically assigns IP addresses and other related configuration information to client devices such as computers, smartphones etc. DHCP allows hosts to obtain required TCP/IP configuration information from a DHCP server.
Why DHCP is Important
Each device on a TCP/IP-based network requires a unique IP address to access the network and its resources. Without DHCP, IP addresses for new devices or devices that are moved from one location to another must be configured manually. IP addresses for computers that are removed from the network must be manually reclaimed but with DHCP, this entire process is automated and managed centrally. The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled device when it starts up on the network. Because the IP addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation.
Components of DHCP
There are different components that comes together to make DHCP work efficiently. Some of these components includes:
- DHCP Server: It is the server that holds the IP addresses and other information relating to configuration.
- DHCP client: it is a device that receives configuration information from the server. This device can be a computer, laptop, smartphone or any other device that requires internet connection.
- Subnets : subnets are smaller portion of the IP network to keep the network under control.
- DHCP Relay: DHCP relay allows the DHCP Server to communicate with DHCP client across different networks.
- DHCP Lease time: it is the length of time that the server grant to a client to use a specific IP address.
- IP address Pool: it is simply a range of unique IP addresses possess by the DHCP server that can be assigned to various clients devices.
How DHCP works
DHCP Discover
When a device (DHCP client) connects to a network, it sends out a DHCP Discover message. This is a broadcast message that seeks available DHCP servers on the netw0rk.
DHCP Offer
Upon receiving the Discover message, any available DHCP server responds with a DHCP Offer message. This message includes an available IP address, subnet mask, default gateway, DNS server information, and the lease duration for the IP address.
DHCP Request
The client receives one or more offers and selects one. It then sends a DHCP Request message back to the chosen DHCP server, indicating its acceptance of the offered IP address and configuration.
DHCP Acknowledgment
The DHCP server receives the Request and sends a DHCP Acknowledgement (ACK) message to the client. This message confirms the assignment of the IP address and includes any additional configuration information.
Advantages of DHCP
- Centralized management of IP addresses and automated TCP/IP configuration
- The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable devices that move to different locations on a wireless network.
- Simple reconfiguration of the IP address space on the DHCP server without needing to reconfigure each client.
- The DHCP protocol gives the network administrator a method to configure the network from a centralized area
- Reuse of IP addresses reduces the total number of IP addresses that are required
Disadvantages of DHCP
- The problem with DHCP is that clients accept any server. Accordingly, when another server is in the vicinity, the client may connect with this server, and this server may possibly send invalid data to the client.
- The client is not able to access the network in absence of a DHCP Server.
- The name of the machine will not be changed in a case when a new IP Address is assigned.
- IP conflict may occur