9
2008
How a DHCP server works and how to configure it on a Cisco router
The Cisco DHCP server feature is a full implementation that assigns and manages IP addresses from specified address pools to DHCP clients. After a DHCP client has booted, the client begins sending packets to its default router. The IP address of the default router should be on the same subnet as the client.
The DHCP discovery follow four steps:
- The client send a DHCPDISCOVER in broadcast to find a DHCP server.
- The server sends a DHCPOFFER to the client in unicast. In this phase the DHCP server sends a proposed configuration to the DHCP client.
- The clients sends a DHCPREQUEST in broadcast, if the clients finds the offer agreeable. Why in broadcast? Because the DHCPDISCOVER sended by the client might have reached more than one DHCP server.
- The server sends a DHCPACK unicast to the client
- If the client detects that the ip is already in use it sends a DHCPDECLINE
- If the client receives a DHCPNAK from the server, it restart the process
- If there is no conflict with the ip address, the client can ‘autoconfigure’ the NIC.
To configure a DHCP server on your cisco router:
- Define the IP range that must be excluded from being offered by the router’s DHCP service: Ciscozine(config)# ip dhcp excluded-address [low ip address] [high ip address]
- Define a pool for your DHCP pool configuration: Ciscozine(config)# ip dhcp pool [name of your pool]
- Define the features of your pool:
- Define the network and subnet that the clients must belong. Ciscozine(config-dhcp)# network [Network number] [Network mask or prefix length]
- Define the default router for the DHCP client: Ciscozine(config-dhcp)# default-router [ip of your default router] (You can configure more than one default gateway)
- Define the DNS server used by the DHCP client: Ciscozine(config-dhcp)# dns-server [dns server ip] (You can configure more than one dns server)
- You could configure others features like domain-name, netbios-name, lease, …
Example of configuration:
!The ip address that could not be used by the dhcp server process
ip dhcp excluded-address 172.16.0.1
ip dhcp excluded-address 172.16.0.2
ip dhcp excluded-address 172.16.0.3
!My dhcp pool named Ciscozine_LAN
ip dhcp pool Ciscozine_LAN
network 172.16.0.0 255.255.255.0
default-router 172.16.0.253
dns-server 212.216.172.62 208.67.222.222 212.216.112.112
Useful command to verify DHCP Operations are:
- show ip binding: DHCP address bindings
- show ip conflict: DHCP address conflicts
- show ip database: DHCP database agents
- show ip server statistics: Miscellaneous DHCP server information
Helpful command for troubleshooting DHCP configurations and operations are:
- debug ip dhcp events: Report address assignments, lease expirations, etc.
- debug ip dhcp linkage: Show database linkage
- debug ip dhcp packet: Decode message receptions and transmissions
2 Comments + Add Comment
Leave a comment
Archives
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008

An article by









Hello,
as I know the DHCPACK Answer of a DHCP-Server is Broadcast and not Unicast.
@Matt: Hi peep, you can crosscheck your references cos DHCPACK is usually sent to client in unicast