7.2 10 Packet Tracer Configure Dhcpv4

8 min read

Introduction

Configuring DHCPv4 in Cisco Packet Tracer is a fundamental skill for anyone preparing for the CCNA or simply wanting to understand how IP address allocation works in a simulated network. Lab 7.2, often titled “10‑Device DHCPv4 Configuration,” guides students through the process of setting up a DHCP server, defining address pools, and verifying that client devices receive correct IP parameters automatically. This article walks through each step of the lab, explains the underlying concepts, and highlights common pitfalls, ensuring you can reproduce the configuration confidently and apply the knowledge to real‑world scenarios Easy to understand, harder to ignore..


Why Use DHCPv4?

Dynamic Host Configuration Protocol (DHCP) automates the distribution of IPv4 configuration data—IP address, subnet mask, default gateway, DNS servers, and more. Without DHCP, network administrators must manually assign these parameters to every host, a tedious and error‑prone task. DHCPv4 offers several benefits:

  1. Scalability – One server can serve hundreds of devices.
  2. Consistency – Centralized control guarantees uniform settings.
  3. Flexibility – Lease times allow temporary address assignment, ideal for guest networks.
  4. Reduced Errors – Eliminates duplicate‑address and subnet‑mask mistakes.

In a Packet Tracer environment, DHCPv4 also allows you to visualize the DHCP handshake (Discover, Offer, Request, ACK) and see how routers and switches interact with the server.


Lab Overview: 10‑Device Network Topology

The lab consists of the following devices:

Device Role Interface(s)
R1 Core router (DHCP server) Gig0/0 (connected to ISP), Gig0/1 (to LAN)
R2 Edge router (optional) Gig0/0 (to R1), Gig0/1 (to LAN)
SW1–SW3 Access switches VLAN 10 (data), VLAN 20 (voice)
PC1–PC4 End‑user PCs Connected to SW1–SW3
Server Optional static‑IP server (e.g., DNS) Connected to SW1

The official docs gloss over this. That's a mistake.

All PCs are set to “Obtain IP address automatically.168.Worth adding: ” The goal is for R1 to act as a DHCPv4 server, providing addresses for VLAN 10 (192. On the flip side, 10. Which means 168. 0/24) and VLAN 20 (192.20.0/24) That alone is useful..


Step‑by‑Step Configuration

1. Basic Device Setup

First, assign hostnames, enable the interfaces, and configure IP addresses for the router‑to‑router link and the LAN interfaces.

R1> enable
R1# configure terminal
R1(config)# hostname R1
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 203.0.113.1 255.255.255.252   ! ISP link
R1(config-if)# no shutdown
R1(config-if)# exit

R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip address 192.Which means 10. 255.Because of that, 1 255. So 255. 168.0   ! 

Repeat a similar process on **R2** (if included) and assign appropriate VLAN interfaces on the switches. confirm that the **SVI (Switched Virtual Interface)** for each VLAN exists on a Layer‑3 switch or on R1 if you are using router‑on‑a‑stick.

### 2. Enable DHCP Service on the Router  
By default, Cisco IOS has DHCP disabled. Turn it on with the global command:

```plaintext
R1(config)# service dhcp

3. Define DHCP Pools

Pool for VLAN 10 (Data)

R1(config)# ip dhcp pool VLAN10
R1(dhcp-config)# network 192.168.10.0 255.255.255.0
R1(dhcp-config)# default-router 192.168.10.1
R1(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
R1(dhcp-config)# lease 8   ! 8‑hour lease (optional)
R1(dhcp-config)# exit

Pool for VLAN 20 (Voice)

R1(config)# ip dhcp pool VLAN20
R1(dhcp-config)# network 192.168.20.0 255.255.255.0
R1(dhcp-config)# default-router 192.168.20.1
R1(dhcp-config)# dns-server 8.8.8.8 8.8.4.4
R1(dhcp-config)# lease 2   ! Shorter lease for phones
R1(dhcp-config)# exit

Key points

  • The network command defines the address range that the pool can allocate.
  • default-router is the default gateway (the router’s interface address).
  • dns-server supplies DNS IPs to clients.
  • lease sets the duration in hours; you can also use lease days hours minutes.

4. Exclude Addresses from the Pools

You usually want to reserve a few addresses for static devices (servers, printers, management). Use the ip dhcp excluded-address command before defining pools.

R1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10
R1(config)# ip dhcp excluded-address 192.168.20.1 192.168.20.10

These ranges will never be handed out by DHCP, preventing conflicts with manually configured hosts Surprisingly effective..

5. Configure Relay (If DHCP Server Is Not on the Same Subnet)

In larger networks, the DHCP server may reside on a different VLAN. In this lab, the server lives on R1, but if you place it on a separate VLAN, enable IP helper on the router interface that receives client broadcasts:

R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip helper-address 192.168.30.2   ! DHCP server address
R1(config-if)# exit

The ip helper-address command forwards DHCP broadcast packets (UDP 67/68) to the specified server Worth keeping that in mind..

6. Verify DHCP Operation

a. Show DHCP Bindings

R1# show ip dhcp binding

You should see a table with client MAC addresses, assigned IPs, lease expiration, and the pool name.

b. Check the DHCP Server Statistics

R1# show ip dhcp server statistics

This output displays the number of DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, and DHCPACK messages processed—useful for confirming the four‑step handshake.

c. Test from a PC

On PC1, open the command prompt and run:

PC> ipconfig /renew

You should receive an address in the 192.Also, 168. 10.0/24 range, a subnet mask of 255.In practice, 255. 255.0, a default gateway of 192.In real terms, 168. 10.Which means 1, and DNS servers 8. Also, 8. 8.Now, 8/8. Day to day, 8. But 4. 4.

PC> ping 192.168.10.1
PC> ping 8.8.8.8

If the ping succeeds, DHCP is correctly configured No workaround needed..


Scientific Explanation of the DHCP Process

  1. DHCPDISCOVER – The client broadcasts a UDP packet (port 67) because it does not yet have an IP address. The broadcast reaches every DHCP‑enabled device on the local subnet.
  2. DHCPOFFER – The DHCP server (R1) replies with an offer containing an available IP address, subnet mask, lease time, and other options. This packet is sent as a unicast to the client’s MAC address.
  3. DHCPREQUEST – The client selects one of the offers (usually the first received) and broadcasts a request, indicating the server identifier it wishes to use.
  4. DHCPACK – The server acknowledges the request, finalizing the lease. The client now configures its interface with the supplied parameters.

If any step fails, the client will retry the process. In Packet Tracer, you can view these messages in the Simulation mode, which graphically displays each packet and its source/destination.


Common Issues and Troubleshooting

Symptom Likely Cause Fix
PC receives **0.In practice, 0. 0.

Frequently Asked Questions

Q1: Can a single router host multiple DHCP pools?
Yes. As demonstrated, a router can maintain as many pools as needed, each identified by a unique name and associated with a distinct subnet Most people skip this — try not to..

Q2: What happens if a client moves from VLAN 10 to VLAN 20?
When the client connects to the new VLAN, it will broadcast a new DHCPDISCOVER. The router will allocate an address from the VLAN 20 pool, and the old lease will eventually time out.

Q3: Is it possible to assign static IPs via DHCP?
Absolutely. Use the host statement inside a pool:

R1(dhcp-config)# host 192.168.10.50 255.255.255.0
R1(dhcp-config)# client-identifier 0100.0C9F.1234.56

This binds a specific MAC (or client identifier) to a fixed IP while still using DHCP for other devices Nothing fancy..

Q4: How does DHCP interact with NAT?
DHCP only provides internal addressing. NAT translates those internal addresses to a public IP when traffic leaves the network. Ensure the NAT pool does not overlap with DHCP pools to avoid routing loops.

Q5: Can I use DHCP for IPv6 (DHCPv6) on the same router?
Yes, but you must enable IPv6 routing and configure separate DHCPv6 pools. DHCPv4 and DHCPv6 operate independently.


Best Practices for Production Environments

  1. Document Excluded Ranges – Keep a spreadsheet of reserved addresses to avoid accidental allocation.
  2. Use Separate Pools for Different Device Types – Voice, IoT, and guest devices often require distinct lease times or QoS options.
  3. Implement DHCP Snooping – On switches, enable DHCP snooping to protect against rogue DHCP servers.
  4. Backup Configuration Regularly – DHCP pool definitions are critical; a lost config can bring a network down.
  5. Monitor Lease Utilization – Use show ip dhcp binding and SNMP tools to track address consumption and plan for expansion.

Conclusion

Configuring DHCPv4 in Cisco Packet Tracer’s Lab 7.2 (10‑Device DHCP) reinforces core networking concepts: IP address management, VLAN segmentation, and the DHCP four‑step handshake. By following the systematic steps—enabling the DHCP service, defining pools, excluding static addresses, and verifying with show commands—you gain both practical skills and a deeper appreciation for how dynamic addressing streamlines network operations. Remember to troubleshoot methodically, respect best‑practice guidelines, and experiment with advanced features such as DHCP relay and static bindings. Mastery of DHCPv4 in a simulated environment builds a solid foundation for real‑world deployments, exam success, and confident network engineering Nothing fancy..

Up Next

What's Dropping

Readers Also Checked

We Picked These for You

Thank you for reading about 7.2 10 Packet Tracer Configure Dhcpv4. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home