Use a Cisco Router as a DHCP server
Instead of having a dedicated DHCP server in a small office, you can use a Cisco router not only as a router but as a DHCP server as well.
1. Configuration
Section titled “1. Configuration”1.1 Exclude all IP addresses that you already have assigned or don’t want to be assigned via DHCP
Section titled “1.1 Exclude all IP addresses that you already have assigned or don’t want to be assigned via DHCP”Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.101.2 Create the DHCP pool
Section titled “1.2 Create the DHCP pool”Router(config)# ip dhcp pool LAN_USERS1.3 Define the network and subnet mask
Section titled “1.3 Define the network and subnet mask”Router(dhcp-config)# network 192.168.1.0 255.255.255.01.4 Configure the default-gateway
Section titled “1.4 Configure the default-gateway”Router(dhcp-config)# default-router 192.168.1.11.5 Configure the DNS server
Section titled “1.5 Configure the DNS server”Router(dhcp-config)# dns-server 8.8.8.81.6 Configure the time lease
Section titled “1.6 Configure the time lease”By default, the time that a device can use an IP before it has to renew it is 1 day on a Cisco router. That can be changed with the command:
Router(dhcp-config)# lease 7 0 0Router(dhcp-config)# exit