From CCIE Study Wiki
The Cisco IOS can be set to provide DHCP services for a network
Theory
Cisco routers can be configured as DHCP servers. Three steps:
- Configure a DHCP pool - This includes the subnet, the default gateway, the lease, DNS servers, ect...
- Configure IP address exclusions - Be sure to make the routers own address unavailable for allocation
- Either configure a DHCP database agent OR disable DHCP conflict logging - DHCP address conflicts can either be set not to log (disable DHCP conflict logging) or be logged to a central server (dhcp database agent)
Commands
- ip dhcp pool name (global) - creates a dhcp pool
- network network [mask|prefix-length] (dhcp subcommand) - defines the IP addresses that can be assigned by DHCP
- default-router address [address2...address3...] (dhcp subcommand) - assigns default route(s) to the pool
- lease {days[hours][minutes]|infinite} (dhcp subcommand) - defines the lease length
- ip dhcp excluded-address [low-address high-address] (dhcp subcommand) - defines the IPs excluded from the dhcp pool
- host address [mask|prefix-length] (dhcp subcommand) - used with the hardware address command below to predefine a host's IP address
- hardware-address hardware-address type (dhcp subcommand) - works with the command above, used to define MAC addresses
Default Settings
- DHCP server or DHCP forwarding is not enabled by default.
Verification
Troubleshooting, Tips, and Tricks
- In order to forward DHCP requests off of the subnet, use the ip helper-address command.
Online Resources
- Chris from Layer 3 has a multipart article on the inner workings of DHCP:
Have something to contribute? See a mistake on this page? Have a hint or a link to share?
The CCIE Study Wiki is open to everyone to edit! All you need to do is to create an account to start contributing.
Please be sure to follow our posting guidelines when editing the wiki.
Maybe you have just have some thoughts or suggestions for this entry?
Use the Discussion link on the top or bottom menu to create or join the CCIE forum post on this topic.
You can also go straight to the CCIE Forums and start a new discussion in the forum of your choice.
If you'd rather just contact us with your thoughts, we'd love to hear what you have to say.