Configuring DHCP on a Cisco router is a key skill for every network administrator. DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses to devices on the network, saving time and reducing human errors.
In this lesson, you’ll learn how to configure, verify, and troubleshoot DHCP step by step on a Cisco router, just like in real network environments.
Figure 1 – DHCP Configuration Topology
Answer the question below
The first step is to exclude a range of IP addresses that won’t be assigned to DHCP clients. These reserved addresses are meant for important devices like servers, routers, or printers that always need static IPs.
The command is :
ip dhcp excluded-address
R1(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
This command ensures that the IP addresses from 192.168.1.1 to 192.168.1.10 are excluded from the DHCP pool. This avoids conflicts between dynamically assigned IP addresses by the DHCP server and the statically assigned IP addresses for critical devices.
Answer the question below
To dynamically assign IP addresses to clients, you need to create a DHCP pool.
A DHCP pool is a named configuration that defines the settings for DHCP clients. It acts as a container where you specify the range of IP addresses that can be assigned, along with other parameters like the default gateway and DNS servers.
To create a DHCP pool, use the following command:
ip dhcp pool
R1(config)# ip dhcp pool MY_DHCP_POOL
This command creates a DHCP pool named
MY_DHCP_POOL
and enters DHCP configuration mode, where you can define the network settings for DHCP clients.Answer the question below
Which command is used to create a DHCP pool?
Once the DHCP pool is created, you need to specify the network range from which IP addresses will be assigned. This tells the router which subnet is available for DHCP clients.
To create a DHCP pool, use the following command:
network
R1(dhcp-config)# network 192.168.1.0 255.255.255.0
or using CIDR notation:
R1(dhcp-config)# network 192.168.1.0 /24
Figure 2 – DHCP Network Topology
This means the router can allocate IPs from 192.168.1.1 to 192.168.1.254, except for excluded addresses.
Answer the question below
The default gateway is the IP address that devices use to send traffic outside their local network.
Configuring the default gateway ensures that DHCP clients can communicate with external networks.
R1(dhcp-config)# default-router 192.168.1.1
In this example, the router's IP address (192.168.1.1) is set as the default gateway for DHCP clients, allowing them to reach other networks.
Answer the question below
Which command specifies the default gateway for DHCP clients?
The DNS server resolves domain names into IP addresses, allowing devices to access websites and network resources using names like google.com.
R1(dhcp-config)# dns-server 8.8.8.8
In this example, Google’s public DNS server (8.8.8.8) is used. You can also specify an internal DNS server if needed.
40 % Complete: you’re making great progress
Unlock the rest of this lesson
If you’d like to continue your CCNA journey, create your free account now.
Access all free CCNA lessons
Practice with quizzes and level test
Progress tracking in your dashboard
Made by network engineers - CCNP certified
Create your Free Account1151 learners continued their CCNA journey this month