DHCP Server in Cisco IOS

Cisco IOS provides a basic DHCP server that can be useful for testing or small networks. If you’re in an Active Directory environment I recommend providing DHCP service from your domain controller systems and using the “ip helper-address” command (dhcp relay) to forward all DHCP requests from other subnets to your DC’s (no ip helper needed for the same subnet). You can provide redundancy with split-scope configuration on your redundant local site domain controllers.

Here are some hints for using the IOS built-in DHCP server on a small single subnet network. This is great for testing out a new router or internet connection before migrating production systems. Remember to remove the dhcp config from your router before going live if you’re using other servers to provide production dhcp service.

! -- enable privileged exec mode and configure from terminal --
configure terminal
! -- turn on the dhcp service --
service dhcp
! -- keep dhcp state across router reboots
ip dhcp database flash:/dhcp-database.txt
! -- retry dhcp conflicts every hour (or specify minutes)
ip dhcp conflict resolution
! -- limit which ip's to dynamically assign --
ip dhcp excluded-address
ip dhcp excluded-address
! -- create the dhcp pool, choose any name --
! -- the interface with matching subnet will serve the pool --
ip dhcp pool test_pool
  network /24
  lease 0 8
write memory
! -- monitor dhcp status with commands like these --
show ip dhcp binding
show ip dhcp pool
clear ip dhcp binding IP.ADD.RE.SS

Official Cisco documentation is available for Configuring the Cisco IOS DHCP Server.

The ASA firewall provides similar DHCP capabilities, but the command syntax is quite different. You may also want to read my follow-up article for Cisco ASA DHCP Server configuration.


About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Networking and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s