Services
DHCP Relay
DHCP relay allows a router to forward DHCP broadcast messages between clients and a DHCP server on a different subnet, using the ip helper-address feature.
What you need to know
- ip helper-address is configured on the client-side interface (the one facing the broadcast domain without a local server).
- By default, ip helper-address forwards UDP broadcasts for 8 well-known services including DHCP (67/68), TFTP, DNS, and NetBIOS.
- The relay agent inserts the giaddr (gateway IP address) field so the DHCP server knows which subnet to allocate from.
- The DHCP server pool network statement must match the subnet of the interface where helper-address is applied.
- Multiple ip helper-address statements can be configured on one interface to reach multiple DHCP servers.
- ip forward-protocol udp can add or remove additional UDP ports relayed beyond the defaults.
- Relay is needed because DHCP Discover is a Layer 2 broadcast that routers do not forward by default.
Configuration commands
| Command | Mode | Purpose |
|---|---|---|
| interface vlan10 | config | Enters the SVI or interface facing the DHCP clients. |
| ip helper-address 172.16.1.10 | config-if | Forwards DHCP broadcasts to the specified server address. |
| ip helper-address 172.16.1.11 | config-if | Adds a second DHCP server as a relay target. |
| ip forward-protocol udp 517 | config | Adds an additional UDP port to be relayed alongside the default set. |
| no ip forward-protocol udp tftp | config | Removes a default forwarded protocol (example: TFTP) from relay. |
| ip dhcp pool REMOTE-POOL | config | Creates the pool matching the remote client subnet. |
| network 172.16.20.0 255.255.255.0 | config-dhcp | Defines the subnet for the relayed clients. |
Verify it
- show ip interface gigabitethernet0/0
- show ip dhcp binding
- show running-config interface vlan10
- debug ip udp
- show ip dhcp server statistics
Common mistakes
- Placing ip helper-address on the server-side interface instead of the client-side interface.
- Forgetting that the DHCP pool's network statement must match the relayed subnet, not the server's own subnet.
- Assuming helper-address relays all UDP traffic when it only covers 8 default ports unless expanded.
- Blocking UDP 67/68 with an ACL on the path between relay agent and server.
- Not accounting for giaddr when troubleshooting scope selection on the DHCP server.
Practise DHCP Relay in a real CLI
Generated labs, graded against the simulated network state.