DHCP messages are generally broadcast, which means they are non routable (gateways won't pass them). A DHCP client and server therefore need to be on the same subnet. This restrictions would require that individual subnets each have their own DHCP server which is not practical in large networks. This problem is solved through the use of DHCP relay agents. The core function of a DHCP relay agent is to convert broadcast DHCP packets into unicast packets and forward to the DHCP server (its a specialised router providing a link between 2 networks on different subnets).
DHCP CLIENT <——link_a——>DHCP RELAY <——link_b—-> DHCP SERVER
1a) DHCP CLIENT sends a 'DHCP Discover' packet broadcast.
1b) DHCP RELAY sends the packet unicast to the DHCP server.
2a) DHCP SERVER sends a 'DHCP Offer' packet unicast to the DHCP RELAY. In this packet option 54 (DHCP Server Identifier) is present and specifies the IP address of the DHCP SERVER.
2b) DHCP RELAY sends the DHCP offer packet broadcast or unicast to the DHCP client.
3a) DHCP CLIENT sends a 'DHCP Request' packet broadcast. In this packet option 54 (DHCP Server Identifier) is present and specifies the IP address of the DHCP SERVER.
3b) DHCP RELAY sends the packet unicast to the DHCP Server.
4a) DHCP SERVER sends a 'DHCP Ack' packet unicast to the DHCP RELAY.
4b) DHCP RELAY sends the packet broadcast or unicast to the DHCP CLIENT.
IP Address Renewal
The DHCP CLIENT uses unicast to send the request directly to the DHCP SERVER.
Good resources
www.slideshare.net/Netmanias/netmanias20131105-dhcp-relay-agent-overview-en