Lab 7 — DHCP
One router, two hats: client and server.
R1 gets its own WAN address from the ISP by DHCP, then turns around and hands out addresses on the LAN from a pool — until you tear the pool down and make the PCs ask a server across the router instead. Work through it in order — check steps off, copy the commands, and finish with the show commands that prove the leases are real.
Interactive lab — play with it
A simulated CLI for this lab. Click a device, type the commands, and watch the PCs lease addresses only when the pool is complete — and fail to renew once it's gone.
A simulated CLI for this lab — click R1 or a PC, type the commands, and watch leases appear only when the pool is really complete. The PCs are DHCP clients: they hold no address until you run ipconfig /renew. This models Lab 7’s commands only, not a real router: unsupported commands say so instead of faking it. Type ? for help and use Tab to complete a command.
Microsoft Windows [Version 10.0.19045.0]
(c) Microsoft Corporation. All rights reserved.
Up/down arrows recall commands. The full command list is in the walkthrough below.
Interactive lab
Lab 7 — DHCP
A router that gets its own address from the ISP, hands addresses out to the LAN, then steps aside for an external DHCP server — with a relay in between.
Click a device to open its console, type the real commands, and check your work when you think it’s done. The lab checks each step as you go.
Walkthrough — commands in order
One router, two hats. R1 gets its own WAN address from the ISP by DHCP, then turns around and hands out addresses on the LAN from a pool — until you tear the pool down and make the PCs ask a server across the router instead.
PC1 ── G0/1 [R1] G0/0 ── ISP (203.0.113.1) DHCP client → 203.0.113.2
PC2 ── 10.10.10.0/24 ── Pool "Flackbox" ── DNS 10.10.20.10
Excluded: 10.10.10.1 – 10.10.10.10 (gateway + spares)
The lab pack uses Fa0/0/Fa0/1; the simulator uses G0/0/G0/1.Where this shows up in the data center
I don’t run the DHCP service in the data center, but I chase its failures: a host that comes up with no address, a management interface that never got one, a provisioned server that grabbed the wrong lease. The checks are the same ones as this lab — is the interface actually a client, is the pool up with a gateway and DNS, and is the relay pointing at the right server — and the same verify-before-you-change-it discipline as checking LLDP neighbors and optical levels before touching a fiber link.
R1(config)# interface g0/0 R1(config-if)# ip address dhcp R1(config-if)# no shutdown
The ISP side is already up. Verify with show dhcp lease before moving on.
R1(config)# ip dhcp excluded-address 10.10.10.1 10.10.10.10 R1(config)# ip dhcp pool Flackbox R1(dhcp-config)# default-router 10.10.10.1 R1(dhcp-config)# dns-server 10.10.20.10 R1(dhcp-config)# network 10.10.10.0 255.255.255.0 R1(dhcp-config)# lease 1
The excluded range covers the gateway (.1) and nine spares. The first lease a PC gets will be .11.
C:\> ipconfig /renew C:\> ipconfig /renew
Run the first renew on PC1 (.11) and the second on PC2 (.12).
R1# show ip dhcp binding R1# show ip dhcp pool R1# show ip dhcp server statistics
The lease expiry date is a fixed representative value — the simulator has no clock.
R1(config)# no ip dhcp excluded-address 10.10.10.1 10.10.10.10 R1(config)# no ip dhcp pool Flackbox C:\> ipconfig /release C:\> ipconfig /renew
Run the release and the renew on both PCs. The renew fails with "unable to contact your DHCP server".
R1(config)# interface g0/1 R1(config-if)# ip helper-address 10.10.20.10 C:\> ipconfig /renew C:\> ipconfig /renew
Renew on both PCs. They lease again — .2 and .3, the first free addresses in the external server’s scope (it has no excluded range of its own) — but show ip dhcp binding on R1 stays empty: the leases now live on the external server.
Verify it worked
Don’t trust the config until a show command proves it. These are the outputs you should see — if yours differ, that’s the troubleshooting.
R1# show dhcp lease
Temp IP addr: 203.0.113.2 for peer on Interface: GigabitEthernet0/0 Temp sub net mask: 255.255.255.0 DHCP Lease server: 203.0.113.1 , state: Bound DHCP Transaction id: 64B8EE07 Lease: 86400 secs, Renewal: 43200 secs, Rebind: 75600 secs Temp default-gateway addr: 203.0.113.1 Next timer fires after: 11:53:13 Retry count: 0 Client-ID:cisco-0001.42bb.0001-G0/0 Client-ID hex dump: 636973636F2D000142bb0001 Hostname: R1
R1# show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
10.10.10.11 0100.0142.aa10.10 Mar 02 2026 12:00 AM Automatic
10.10.10.12 0100.0142.aa10.20 Mar 02 2026 12:00 AM AutomaticR1# show ip dhcp pool
Pool Flackbox : Utilization mark (high/low) : 100 / 0 Subnet size (first/next) : 254 / 0 Total addresses : 254 Leased addresses : 2 Excluded addresses : 10 Lease : 1 day Pending event : none 1 subnet is currently in the pool Current index IP address range Leased/Excluded/Total 10.10.10.11 10.10.10.1 - 10.10.10.254 2 / 10 / 254
R1# show ip dhcp server statistics
Memory usage 12345 Address pools 1 Database agents 0 Automatic bindings 2 Manual bindings 0 Expired bindings 0 Malformed messages 0 Secure arp entries 0 Message Received BOOTREQUEST 0 DHCPDISCOVER 2 DHCPREQUEST 2 DHCPDECLINE 0 DHCPRELEASE 0 DHCPINFORM 0 Message Sent BOOTREPLY 0 DHCPOFFER 2 DHCPACK 2 DHCPNAK 0
Check yourself
Three questions from the exam angle. Tap to reveal the answer — say it out loud first.
Q1. Why exclude 10.10.10.1–10.10.10.10 from the pool instead of just letting the pool hand out any address?
Q2. PC1 renews after the pool is deleted and gets nothing. Is the PC broken?
Q3. Why does a DHCP request need ip helper-address to reach a server on another subnet?
Next labs:
Keep going: Lab 8 — HSRP gives two routers one shared gateway, or go back to Lab 6 — Port Security. All labs are on the labs hub.