- In most of the Cisco router, the DHCP option is enabled by default.
- To configure the DHCP server on your Cisco router, you have to enable the DHCP service.
- To do it, use the command mentioned below.
- R1 (config)# service dhcp
- After creating the DHCP service successfully, you have to create the DHCP pool. This pool defines the network of IP addresses. Create the DHCP pool, as mentioned below. Type in your preferred pool name.
- R1(config)# ip dhcp pool pool name
- R1(dhcp-config)# network network mask or length; in the network argument, specify your network’s subnet number.
- Now on using how to enable DHCP on Cisco router guide, you have successfully created the DHCP pool. Following that, define the DHCP parameters as instructed below.
- R1(dhcp-config)# default-router ip_address
- R1(dhcp-config)# dns-server ip_address
- R1(dhcp-config)# domain-name domain
- R1(dhcp-config)# lease lease_time
- The default lease time for an IP address is one-day. However, an example to set the lease time as 4 hours and 30 minutes is given below.
- R1(dhcp-config)# lease 0 4 30