DHCP Relay Agents
As mentioned, a router can act as a DHCP relay agent. This means that the router passes DHCP broadcast messages from clients to DHCP servers that are not on the same subnet as the clients. This avoids a requirement for a DHCP server to reside on each subnet with clients.
With Cisco routers, you can use the ip helper-address command on each router interface where clients reside to cause the router to become a DHCP relay agent. An address parameter for the command should point to the IP address of the DHCP server. Alternatively, the address can be a broadcast address so that the router broadcasts the DHCP discover message on to the specified network. (A broadcast address should be used only if the server is on a directly connected network because modern routers do not forward directed broadcasts to other networks.)
When a router relays a discover message to another network or subnet, the router places the IP address for the interface on which the message arrived in the gateway address (giaddr) field of the DHCP header. The DHCP server can use the giaddr information to determine from which scope the assigned address should come.
CAUTION
When you enable an IP helper address, Cisco routers forward numerous
UDP broadcasts by default, including TFTP, DNS, NetBIOS, and TACACS
broadcasts. To configure the router to be more discerning in its forwarding, use the ip forward-protocol command for the protocols that should be forwarded and the no ip forward-protocol command for the protocols that should not be forwarded. To make sure DHCP packets are forwarded, use the ip forward-protocol udp 67 command. (DHCP discover and request messages use UDP destination port number 67, the port number reserved many years ago for BOOTP.)
Continue reading here: Zero Configuration Networking
Was this article helpful?