DHCP Relay Agent - IOS

  • A DHCP relay agent can forward DHCP packets when the DHCP server and the DHCP client are not on the same network. Note that the role of a DHCP relay agent is not entirely trivial, since it acts as a router for a host that does not have an IP address. 
  • A DHCP client broadcasts a DHCP request and a DHCP relay agent picks up the broadcast, generates a new unicast DHCP message sending to the DHCP server.
  • A DHCP relay agent uses "ip helper-address" command to indicate the DHCP server's IP address. It will insert the IP address of the interface which has that command configured into the gateway IP address field of DHCP packet to let DHCP server know which IP address range should be used to allocate.
Detailed Description

Global Configuration:  
ip forward-protocol udp

-Enables UDP packet forwarding.

Interface Configuration:  
ip helper-address IPaddr -Forwards DHCP request packets received on the current interface to IP address IPaddr, which should be the IP address of a DHCP server.
  • The following commands set up Router1 as a DHCP relay agent. Router1 is configured to forward UDP packets.

Router> enable

Password: <enable secret>

Router1# configure terminal

Router1(config)# ip forward-protocol udp

Router1(config)# interface Fa0/1

Router1(config-if)# ip helper-address

Router1(config-if)# end