DHCP (Dynamic Host Configuration Protocol ) is a network management protocol used to dynamically allocate an IP address to any device or node on a network so that they can communicate via Tcp. DHCP automates and handles these configurations centrally, rather than allowing network administrators to allocate IP addresses to all network devices manually. DHCP can be deployed on small local networks and on big business networks.
When devices are transferred from place to place, DHCP can assign new IP addresses at each site , ensuring that network administrators will not have to manually configure each device with a valid IP address or reconfigure the device with a new IP address if it moves to a different position throughout the network. Versions of DHCP are available for use in IP 4 ( IPv4) and IP 6 (IPv6) versions. IPv6 became an industry standard in 2017 — about 20 years after first releasing its requirements. Though IPv6’s adoption rate was sluggish, more than 29 per cent of Google users were making inquiries using IPv6 by July 2019.
How does DHCP works
DHCP runs at the application layer of the Transmission Control Protocol / IP (TCP / IP) stack to dynamically assign IP addresses to DHCP clients and to allocate TCP / IP configuration information to DHCP clients. This includes subnet mask detail, default gateway IP addresses and domain name system ( DNS) addresses.
DHCP is a client-server protocol in which servers maintain a list of specific IP addresses, as well as information about client configuration parameters, and allocate addresses out of those address pools. DHCP-enabled clients send a request to the DHCP server whenever they connect to a network.
Clients equipped with DHCP transmit a request to the DHCP server and request network configuration information for the local network to which they’re connected. A client usually broadcasts a demand for this information immediately after booting up. The DHCP server addresses the client request by supplying previously defined IP configuration information by a network administrator. This requires a particular IP address, as well as a time-limit for which the allocation is valid — often called a lease.
A DHCP client requests the same parameters when refreshing an assignment but the DHCP server can allocate a new IP address based on administrator policies. You can install DHCP clients on an Ethernet network, too.
A DHCP server maintains a record of all the IP addresses which it assigns to the network nodes. When a node is moved in the network, the server recognizes it using its Media Access Control ( MAC) address, which prevents several nodes with the same IP address from being mistakenly configured. Configuring a DHCP server often involves creating a configuration file, which will store client network details.
DHCP is not a routable, nor is it a stable, protocol. DHCP is limited to a particular local area network, meaning that one single DHCP server per LAN is available or two servers for use in the event of a failover. Larger networks can provide a wide area network ( WAN), with many locations. Multiple DHCP servers can be set up to manage the distribution of addresses, depending on the connections between such points and the number of clients at each location.
If network administrators want a DHCP server to provide addressing to several subnetworks on a specified network, they will configure DHCP relay services located on routers that need to be crossed by DHCP requests. These agents are relaying messages between DHCP clients and servers located on various subnetworks.
There is no built-in DHCP mechanism which would allow clients and servers to authenticate each other. Both are vulnerable to fraud — one device claiming to be another — and to attack, where rogue clients will exhaust the IP address pool of a DHCP server.
Users may make use of a command line when managing multiple DHCP servers or DHCP servers within a WAN. Also users should be conscious that starting, stopping and restarting can affect daemon running.
DHCP consists of several elements, such as the DHCP server, client, and relay. The DHCP server — usually a server or router — is a networked computer operating on the DHCP service. The DHCP server holds IP addresses, as well as configuration related information. The DHCP client is a system that can connect to a network and communicate with a DHCP server — such as a computer or phone — DHCP relay can handle requests between clients and servers in DHCP. Relays are usually used when an company has large or complex networks to manage. Other components include the communication protocol for the IP address collection, subnet, let, and DHCP.
DHCP leasing static vs. dynamic.
A customer does not have the allocated IP address with dynamical DHCP, but rents it instead. Any time a computer has a dynamic IP address, a new IP address needs to be transmitted to the DHCP server. Clients that are allocated dynamic IP addresses when connecting to a network are examples of wireless devices. On the other hand, permanent IP addresses are allocated to static machines, such as web servers and switches.
A client may also carry out such activities in a complex DHCP configuration, leading to the termination of his IP address and a reconnection to the network with another IP address. DHCP leasing times can differ according to how long an internet connection is likely to be needed at a given location. Devices release their IP addresses when their DHCP leases expire. If they remain online, they will then request the renewal from the DHCP Server. A new address may be allocated to the DHCP server rather than an existing one.
This is the standard dynamic DHCP leasing cycle:
- An IP address leased to a client is obtained from the DHCP server during the allocation process.
- If a client has an IP address from a lease it must change its IP address after it is shut down and contact the DHCP server for a reassigned IP address.
- The borrower is said to be bound to the rental and the address while a loan is active.
- After the lease has expired, a client will contact the server which initially renewed the lease so that it can continue to use its IP address.
- When a client transfers to another network, their IP address is terminated and a new IP address is demanded from the DHCP server of the client.
Usage of DHCP and its functions
DHCP is used to distribute IP addresses within a network and to configure the correct subnet mask , default gateway and DNS server details on the system.
DHCP, like RFC (Request for Comments) 8415 — the draft version published in November 2018 — can also be used by ordinary electronic devices whose manufacturers want them to be part of the Internet of Things ( IoT). DHCP is one of the ways in which a computer — such as refrigerators and lawn sprinkler systems — can be connected to the Internet using a Product Use Definition (MUD), suggested by the IETF.
An person can also confuse DNS with servers running the Windows Internet Naming Service (WINS). Using a different protocol a WINS server is used to achieve the same goal but in a different way. WINS is part of topology of Microsoft networking but is not commonly used today — DNS has replaced WINS.
DHCP pros and cons
DHCP makes it easier for network administrators, whether it’s a LAN or WAN, to connect or switch devices within a network. But DHCP is not inherently stable, and can wreak havoc if malicious actors access the DHCP server. Apart from this, if the DHCP server does not have a backup and the server crashes, the machines it supports do so.
One of DHCP ‘s key vulnerabilities has been the use of so-called middle man (MitM) attacks, in which the attacker secretly intercepts and relays messages between two parties that think they are directly communicating with each other.
DHCP servers have also been the victim of several vulnerabilities to memory corruption. In these attackers the Windows DHCP Server service was attacked. The attacks will lead to complete Microsoft Active Directory (AD) compromise if successful. The Famous Vulnerabilities and Exposures (CVE)-2019-0725 Windows DHCP Server Remote Code Execution (RCE) vulnerability was one such vulnerability, patched by Microsoft.
The DHCP History
DHCP is an extension of Bootstrap Protocol (BOOTP), a 1985 network IP control protocol. DHCP is more advanced, so if any BOOTP clients reside in a network area, DHCP servers will handle BOOTP client requests. BOOTP introduced the idea of a relay agent using one central BOOTP server to serve hosts on several IP subnets that allowed BOOTP packets to be transmitted across networks. However, BOOTP included a manual procedure to attach configuration information for each device, and did not have a reclaiming mechanism for IP addresses that were no longer in use.