DHCP Relay Not Working: Free ip helper-address Packet Tracer Lab

A free CCNA Packet Tracer ticket: VLAN 20 PCs get no address while VLAN 10 is fine. Work from the client to R1's ip helper-address and fix it.

DHCP relay Packet Tracer topology: R1 ISR4331 router-on-a-stick to SW1 2960-24TT trunk, PC1 VLAN 10, PC2 VLAN 20, SRV1 DHCP server VLAN 99

DHCP relay fails when the ip helper-address on the client VLAN's gateway doesn't point to a reachable DHCP server. In this free DHCP relay Packet Tracer lab, VLAN 20 PCs come up with 0.0.0.0 while VLAN 10 is fine, and you find and fix the one wrong line on R1.

I built this lab in my home lab and verified it in Cisco Packet Tracer 9.0.1. Everything below is real output from the lab file. The topology is router-on-a-stick with a Server-PT DHCP server on its own VLAN, so DHCP has to be relayed to reach it. It maps to CCNA 200-301 v1.1 topic 4.6, "Configure and verify DHCP client and relay", which CCNA v2.0 frames as a troubleshooting task.

The ticket: VLAN 20 users get no IP address

Since this morning, staff on VLAN 20 can't get on the network. A new laptop on SW1 Fa0/2 shows no usable address. VLAN 10 users are fine.

That's all the information you get. Open the broken .pkt, work the problem from the client up, and only check the walkthrough when you're done or stuck.

DHCP relay lab topology and addressing

Topology diagram: Packet Tracer DHCP relay lab. R1, an ISR4331, connects from G0/0/0 to SW1 Gi0/1 over an 802.1Q trunk (allowed VLANs 10, 20 and 99, native VLAN 1). R1's subinterfaces are G0/0/0.10 at 10.10.10.1/24 and G0/0/0.20 at 10.10.20.1/24, both with helper 10.10.99.10, and G0/0/0.99 at 10.10.99.1/24. On SW1, a 2960-24TT with Vlan99 at 10.10.99.2/24, PC1 is on Fa0/1 in VLAN 10 with DHCP address 10.10.10.100, PC2 is on Fa0/2 in VLAN 20 with 10.10.20.100, and SRV1 is on Fa0/24 in VLAN 99 at 10.10.99.10. SRV1 is the DHCP server for the USERS and STAFF pools.
Built in Packet Tracer 9.0.1: R1 relays DHCP from VLANs 10 and 20 to SRV1 at 10.10.99.10.

One ISR4331 router (R1) does router-on-a-stick over an 802.1Q trunk to a 2960-24TT switch (SW1). Two PCs sit in different user VLANs, and the DHCP server SRV1 sits in a server VLAN. R1 relays DHCP from both user VLANs to SRV1.

DeviceInterfaceVLANAddress
R1 (ISR4331)G0/0/0 (trunk parent, no IP)--
R1G0/0/0.1010 USERS10.10.10.1/24
R1G0/0/0.2020 STAFF10.10.20.1/24
R1G0/0/0.9999 SERVERS10.10.99.1/24
SW1 (2960-24TT)Vlan999910.10.99.2/24, gateway 10.10.99.1
SW1Gi0/1 to R1 G0/0/0trunk, allowed 10,20,99-
PC1 (PC-PT)Fa0 to SW1 Fa0/110DHCP
PC2 (PC-PT)Fa0 to SW1 Fa0/220DHCP
SRV1 (Server-PT)Fa0 to SW1 Fa0/249910.10.99.10/24 static, gateway 10.10.99.1

SRV1 runs the DHCP service with two pools: USERS (start 10.10.10.100, gateway 10.10.10.1, DNS 10.10.99.10, 50 addresses) and STAFF (start 10.10.20.100, gateway 10.10.20.1, DNS 10.10.99.10, 50 addresses). The default serverPool is removed, so SRV1 never leases VLAN 99 addresses.

What you'll practice in this DHCP relay lab

  • Reading a DHCP failure from the client side: ipconfig, ipconfig /release and ipconfig /renew on a Packet Tracer PC.
  • Ruling out Layer 2: access VLANs with show vlan brief and the trunk with show interfaces trunk.
  • Checking router-on-a-stick subinterfaces with show ip interface brief.
  • Finding the relay target with show ip interface and the running config.
  • Proving the server is reachable, fixing ip helper-address, and verifying the lease and inter-VLAN pings.

For the theory behind the relay, see how DHCP relay and giaddr work on Cisco, and for the subinterface build, inter-VLAN routing with router-on-a-stick.

How DHCP relay with ip helper-address works

A PC's DHCP Discover is a broadcast, and a router doesn't forward broadcasts between VLANs on its own. ip helper-address on the client-facing subinterface makes R1 relay the request as unicast to the DHCP server. R1 also writes that subinterface address into the giaddr field (10.10.20.1 for VLAN 20 here), and the server uses giaddr to choose the pool for that subnet (Cisco DHCP relay agent guide).

FAQ

What does ip helper-address do?

It makes a router interface forward DHCP broadcasts it receives as unicast to the server address you configure, so one DHCP server can serve VLANs it isn't directly connected to. It's Cisco's DHCP relay agent: the router writes its client-facing address into the giaddr field so the server picks the right pool (Cisco DHCP relay agent guide). Put it on the client-facing subinterface, or the SVI on a Layer 3 switch, not on the server side.

Why does my Packet Tracer PC show 0.0.0.0 after DHCP?

Packet Tracer PCs show 0.0.0.0 and "DHCP request failed." when no Offer comes back. Check the access VLAN, the trunk, the gateway subinterface and the helper address in that order, and make sure the server has a pool for that subnet.

Does the DHCP server need a route back to the client VLAN?

Yes. The server replies to the giaddr, the relay address on the client VLAN (10.10.20.1 here), so it needs a gateway or route that reaches it. In this lab SRV1's default gateway is 10.10.99.1 on R1.

Which UDP ports does ip helper-address forward?

By default: Time (37), IEN-116 (42), TACACS (49), DNS (53), BOOTP/DHCP (67 and 68), TFTP (69) and NetBIOS (137 and 138), per the Cisco IOS command reference. Use no ip forward-protocol udp <port> to stop forwarding one of them.

Can I use a Server-PT as the DHCP server instead of the router?

Yes. That's how this lab is built: SRV1 holds one pool per VLAN, and R1 only relays. Each pool's default gateway must match the router subinterface for that VLAN.

Get the free DHCP relay lab files

The .pkt files are free with a PingLabz account.
Create a free account and the broken ticket file, the solution file and the full walkthrough unlock right here on this page.
Get the free lab files
Already have an account? Sign in and this page unlocks automatically.

Read next