Reference

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

CommandModePurpose
interface vlan10configEnters the SVI or interface facing the DHCP clients.
ip helper-address 172.16.1.10config-ifForwards DHCP broadcasts to the specified server address.
ip helper-address 172.16.1.11config-ifAdds a second DHCP server as a relay target.
ip forward-protocol udp 517configAdds an additional UDP port to be relayed alongside the default set.
no ip forward-protocol udp tftpconfigRemoves a default forwarded protocol (example: TFTP) from relay.
ip dhcp pool REMOTE-POOLconfigCreates the pool matching the remote client subnet.
network 172.16.20.0 255.255.255.0config-dhcpDefines 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.

Start a free lab