This article gives an overview of DHCP Server, It’s Importance, DHCPv6 Operation, DHCP Server Conflict and DHCPv4 Operation.
DHCP Server

A network server program known as a DHCP (Dynamic Host Configuration Protocol) server is used to automatically lease or assign IP addresses and other important network configuration data to client devices connected to a network. Users can join their devices to a network more easily and network administration is greatly simplified by this automation.
DHCP Server Importance
Centralized Configuration: By centralizing IP setting configuration, DHCP servers enable client devices to automatically learn these settings rather than needing to be manually configured for each device. This makes them essential in the majority of contemporary networks.
Device Mobility: They make it possible for clients to connect to new networks, including wireless LANs, and lease new IP addresses without the need for human configuration.
Automation and Efficiency: Network administrators’ manual workload is lessened via DHCP, which also minimises human mistake that may occur from managing IP addresses by hand. It effectively maintains an IP address pool, automatically recovering addresses from disconnected devices so that new ones can utilise them.
Scalability: Networks of all sizes, from tiny home networks to expansive corporate settings with thousands of devices, can be easily managed with DHCP.
Client/Server Model: With benefits like centralized management and data and service security, DHCP uses a client/server architecture.
Information Provided by a DHCP Server
Clients can access a variety of IP configurations and other helpful data from a DHCP server:
- IP address
- Subnet mask
- Default gateway (router’s IP address on that subnet)
- DNS server address(es)
- Domain name
- WINS server address
- TFTP server IP address (using Option 66)
DHCPv4 Operation

The four-step DORA (Discover, Offer, Request, Acknowledgement) mechanism is used in DHCPv4 client/server communication:
Discover: In order to locate any available DHCP servers, a device broadcasts a DHCP Discover message when it joins a network. All of the devices on the local network receive this message since the device does not yet have an IP address.
Offer: In response, a DHCP server sends a DHCPOFFER message containing the suggested IP address, subnet mask, DNS server, default gateway, and lease term. 255.255.255.255 is often sent as a broadcast since the client does not yet have an IP address.
Request: The client sends a DHCPREQUEST message to formally accept the offered IP address and other parameters after choosing an offer (often the first one). Additionally, this broadcast notifies other DHCP servers that their bids were rejected.
Acknowledgment: The lease is completed and the IP address, mask, default router, and DNS server IP addresses are assigned when the selected DHCP server sends a DHCPACK (acknowledgement) message. The offer is sent a DHCPNAK (negative acknowledgement) if it is no longer valid.
DHCPv6 Operation

In IPv6, Stateless Address Autoconfiguration (SLAAC) and Stateful DHCPv6 are the two main ways to get a global unicast address. In both setups, DHCPv6 servers are connected:
Stateless DHCPv6: The client requests extra configuration information, such as DNS servers, from a stateless DHCPv6 server after obtaining its global unicast address using Router Advertisement (RA) messages. The client is alerted to the availability of this extra information via the ‘Other’ (O) flag in the RA message. IPv6 address leasing and client state tracking are not features of stateless DHCPv6 servers.
Stateful DHCPv6: The RA message directs the client to contact a DHCPv6 server for all of its addressing details, including the IPv6 address. For this purpose, the ‘Managed’ (M) flag is set to 1. IPv6 addresses are leased by stateful DHCPv6 servers, which also monitor client state data.
DHCPv6 Messages: The entire process consists of SOLICIT, ADVERTISE, REQUEST, and REPLY communications between the client and DHCPv6 server, followed by RS (Router Solicitation) and RA (Router Advertisement) messages. FF02::1:2 is the link-local multicast address that clients utilize to locate DHCPv6 servers.
Configuration on Cisco Routers/Switches
DHCP servers can be set up on Cisco routers and certain switches. Crucial configuration actions consist of:
Creating a DHCP Pool: Using the ip dhcp pool pool-name
command.
Defining the Network: Network subnet-ID mask or network subnet-ID prefix-length are used to specify the range of addresses to be leased.
Excluding Addresses: Using ip dhcp excluded-address to reserve particular addresses that shouldn’t be dynamically leased (for routers, servers, printers, etc.).
Configuring Other Parameters: Establishing the domain name, DNS server, router, and lease duration by default. A 24-hour lease is frequently the default duration.
DHCPv6 Server Configuration: IPv6 unicast routing must be enabled, and a pool (ipv6 dhcp pool pool-name), DNS server, domain name, and address prefix must be configured for stateful DHCPv6. Enabling the pool and setting the relevant flag (ipv6 nd other-config-flag for stateless or ipv6 nd managed-config-flag for stateful) are both done on the interface.
Verification Commands (Cisco Example)
The following instructions can be used to confirm that the DHCP server is operating:
show ip dhcp binding
: Provides state details on IP addresses that are currently leased.
show ip dhcp pool [poolname]
: Provides lease statistics and a list of specified IP address ranges.
show ip dhcp server statistics
: DHCP server statistics are shown.
debug ip dhcp server packet
: Offers thorough details on the discussions between DHCP relay agents.
DHCP Server Conflict

Using the same IP address by two hosts is known as an IP address dispute.
Proactive Checking: Before providing an address, DHCP servers proactively use a ping to look for conflicts. A ping answer indicates that the address is not available and is tagged as in conflict.
Client Detection: When DHCP clients receive an offer, they can additionally use gratuitous ARP to identify conflicts. There is a problem if another site responds to the ARP request.
Resolution: The address gets deleted from the DHCP pool and won’t be redeployed until the conflict is manually resolved by an administrator if one is found.
Security (DHCP Snooping and Attacks)
Certain attacks can target DHCP servers:
DHCP starvation attacks: A denial-of-service scenario for legitimate clients results from an attacker’s attempt to lease every IP address in a DHCP pool using fake MAC addresses.
DHCP spoofing attacks: A network’s rogue DHCP server may give erroneous IP setup parameters (such as an incorrect default gateway), which could result in a man-in-the-middle attack.
DHCP Snooping: Incoming DHCP messages are examined by this switch security feature, which filters out dangerous or unusual ones and functions as a firewall. It makes a distinction between trustworthy ports which are linked to authentic DHCP servers or relay agents and untrusted ports, which are for clients. Using a DHCP binding table and MAC address consistency checks, untrusted ports reject server messages and apply logic to client communications. Dynamic ARP Inspection (DAI) also uses the DHCP snooping binding table it creates, which contains valid lease data (MAC, IP, VLAN, interface, and lease time).
DHCP Relay Agents
When DHCP clients are on a different subnet than the DHCP server, routers serve as DHCP relay agents.
- The relay agent sends unicast DHCP broadcast messages to the DHCP server.
- The router interface linked to the DHCP clients is configured using the ip helper-address IP-address command.
- In a DHCP packet, the relay agent modifies the destination IP address to the address of the DHCP server and the source IP address to its own interface. It changes the client’s destination address (255.255.255.255) back to a broadcast for return messages.
- By setting its outgoing interface’s address as the source, the relay agent in DHCPv6 modifies the destination multicast address (FF02::1:2) to the DHCPv6 server’s unicast address.
Dedicated DHCP Servers vs. Router/Switch DHCP
There are restrictions, especially for bigger networks, even though routers and some switches can operate as DHCP servers.
Limitations of Router/Switch DHCP: Uses up device resources (packets are handled in software rather than hardware), isn’t appropriate for a large number of clients (>150), doesn’t support dynamic DNS, isn’t easy to manage scopes and bindings across multiple devices, doesn’t provide high availability or redundancy, is hard to configure DHCP options, and isn’t integrated with IP Address Management (IPAM).
Benefits of a Dedicated DHCP Server: Better, especially for situations that require support for both IPv4 and IPv6. When used with IPAM for both IPv4 and IPv6, dedicated servers give clients insight into their nodes. They also offer logging and administrative interfaces, support redundancy and high availability, and guarantee that clients maintain their IP addresses in the event of a server failure. Companies such as Infoblox provide certified and tested dedicated DHCPv6 servers.
Recommendation: For IPv6 deployments, organizations should convert from DHCP for IPv4 scope off routers/switches to a reliable, centralized, dual-protocol DHCP server infrastructure to guarantee consistent functioning for both protocols.