7.2.10 Packet Tracer – Configure DHCPv4
Understanding how to set up a Dynamic Host Configuration Protocol version 4 (DHCPv4) network is one of the most practical skills for anyone learning networking. Day to day, in Cisco Packet Tracer, you can simulate a real‑world environment without needing physical hardware, and this makes it an ideal platform to practice DHCPv4 configuration. Whether you are a student preparing for the CCNA exam or an IT professional brushing up on fundamentals, the steps below will walk you through a complete, hands‑on configuration of DHCPv4 in Packet Tracer Which is the point..
What Is DHCPv4?
DHCPv4 automatically assigns IPv4 addresses, subnet masks, default gateways, and other network parameters to hosts. Instead of manually configuring each device, a DHCP server hands out addresses from a predefined pool and tracks which addresses are in use. The protocol works through a four‑step exchange:
- DHCP Discover – The client broadcasts a request looking for a DHCP server.
- DHCP Offer – The server replies with an available IP address.
- DHCP Request – The client accepts the offer.
- DHCP Ack – The server confirms the lease and the client is configured.
Because the process is fully automated, DHCPv4 dramatically reduces configuration errors and eases network management.
Why Use Packet Tracer for DHCPv4?
- Zero hardware cost – No need for routers, switches, or PCs.
- Instant feedback – You can see the traffic, verify IP addresses, and test connectivity in real time.
- Reusable scenarios – Save your topologies and revisit them later for troubleshooting practice.
- Learning by doing – Packet Tracer forces you to type actual commands, reinforcing muscle memory.
Building the Topology
Before you configure DHCPv4, you need a basic network. Follow these steps:
- Add devices – Drag a Router (R1), a Switch (S1), and three PCs (PC0, PC1, PC2) onto the workspace.
- Connect them – Use a copper straight‑through cable to link:
- R1’s Gig0/0 to S1’s Fa0/1.
- S1’s Fa0/2, Fa0/3, and Fa0/4 to PC0, PC1, and PC2 respectively.
- Add a DHCP Server – In Packet Tracer, you can enable DHCP on the router itself. No separate server device is required.
Your topology should now look like this:
[PC0]---[S1]---[R1]
[PC1] |
[PC2] |
Configuring the Router as a DHCPv4 Server
The router will act as the DHCP server for the LAN. The configuration consists of three main parts: interface addressing, DHCP pool definition, and optional parameters Less friction, more output..
1. Assign IP Addresses to Interfaces
First, give the router’s LAN interface a static IP address that will serve as the default gateway for all clients.
R1> enable
R1# configure terminal
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
2. Create the DHCP Pool
Next, define a pool of addresses that the router can hand out. The pool name is arbitrary, but it is good practice to use a descriptive label.
R1(config)# ip dhcp pool LAN_POOL
R1(dhcp-config)# network 192.168.1.0 255.255.255.0
R1(dhcp-config)# default-router 192.168.1.1
R1(dhcp-config)# dns-server 8.8.8.8
R1(dhcp-config)# exit
- network – Specifies the subnet from which addresses will be allocated.
- default-router – Sets the gateway for clients.
- dns-server – Provides a DNS resolver (you can use any public DNS here).
3. Exclude Addresses (Optional but Recommended)
You usually want to keep certain addresses static—commonly the gateway itself and any devices that need a fixed IP.
R1(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
This command tells the router to never assign the range 192.Plus, 168. 168.10. 1 through 192.1.1.1.On top of that, 168. And the gateway (192. 1) stays static, and you reserve the first ten addresses for future static devices.
4. Verify the Configuration
Run the following commands to confirm the pool is set up correctly:
R1# show ip dhcp pool
You should see an output similar to:
Pool LAN_POOL:
Utilization mark (high/low) : 100 / 0
Subnet size (first/last) : 192.168.1.11 / 192.168.1.254
Default router : 192.168.1.1
DNS server : 8.8.8.8
Configuring the PCs to Use DHCP
All three PCs must be set to Obtain an IP address automatically. In Packet Tracer:
- Click on a PC (e.g., PC0).
- Open Desktop → IP Configuration.
- Set Obtain IP address automatically and click Apply.
- Repeat for PC1 and PC2.
You can also use the command line on each PC (via the CLI tab) to issue a DHCP request:
PC0> ipconfig /release
PC0> ipconfig /renew
Verifying DHCPv4 Operation
After a few seconds, each PC should have received an IP address from the router. Verify by checking the PC’s IP configuration:
PC0> ipconfig
Typical output:
Ethernet adapter Ethernet0:
IP Address . . . . . . . . . . : 192.168.1.11
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . : 192.168.1.1
You can also run show ip dhcp binding on the router to see which addresses are leased:
R1# show ip dhcp binding
Result:
IP address Hardware address Lease expiration
192.168.1.11 00D0.BA0E.AB01 00:05:00
192.168.1.12 00D0.BA0E.AB02 00:05:00
192.168.1.13 00D0.BA0E.AB03 00:05:00
If the binding table shows the correct MAC addresses and IP addresses, DHCPv4 is working as intended Turns out it matters..
Testing Connectivity
A quick ping test confirms end‑to‑end communication:
PC0> ping 192.168.1.1
You should see replies:
Reply from 192.168.1.1