Detailed operation of a DHCP relay
A DHCP relay operates as follows:
- DHCP client C broadcasts a DHCP/BOOTP discover message on its subnet.
- The relay agent examines the gateway IP address field in the DHCP/BOOTP message header. If the field has an IP address of 0.0.0.0, the agent fills it with the relay agentʼs or routerʼs IP address and forwards the message to the remote subnet of the DHCP server.
- When DHCP server receives the message, it examines the gateway IP address field for a DHCP scope that can be used by the DHCP server to supply an IP address lease.
- If DHCP server has multiple DHCP scopes, the address in the gateway IP address field (GIADDR) identifies the DHCP scope from which to offer an IP address lease.
- DHCP server sends an IP address lease offer (DHCPOFFER) directly to the relay agent identified in the gateway IP address (GIADDR) field.
- The router then relays the address lease offer (DHCPOFFER) to the DHCP client.
NOTE:
- DHCP relay service supports up to 8 relay targets per interface.
- Each target is sent a copy of the DHCP message.