Setting up DHCP on a Cisco router


It’s relatively straight forward to set up DHCP on a Cisco router. The first step is to ensure the DHCP service works & is running on the router, usually by default, it is;

router# configure terminal
router(config)# service dhcp

The next step is to create the DHCP pool that defines the network of IP addresses that will be given out to the clients. Note that ‘TEST-POOL’ is the name of the DHCP IP Pool we are creating:

router(config)# ip dhcp pool TEST-POOL

router(dhcp-config)# network

The above sets a Class C scope starting at – 254. On Cisco routers, you handle exclusions later. So now we need to define some granular parameters that will be given to each client, these include a default gateway (default-router) dns servers, domain and lease period (in days);

router(dhcp-config)# default-router

router(dhcp-config)# dns-server

router(dhcp-config)# domain-name
router(dhcp-config)# lease 9


So now we’ve set up some standard parameters, we now need to set some exclusions. Drop back to ‘global configuration mode’ and do the following;

router(config)# ip dhcp excluded-address 
router(config)# ip dhcp excluded-address

What I’m showing above is you can set IPs seperated by a space on the same line, or you can enter line by line. In the example above, we’ve reserved the IP’s we’ve specified earlier when we were setting up the main parameters.

If you want to see which clients are being serviced by DHCP you can use the command;

router# show ip dhcp binding