A network engineer is configuring a centralized DHCP server () to service client devices across multiple remote subnets. A workstation located on the Sales subnet () broadcasts a DHCPDISCOVER message, which is intercepted by the local default gateway router. How does the central DHCP server determine which specific IP address scope to allocate the lease from?
- The server evaluates the Gateway IP Address (giaddr) field in the DHCP header, which was populated by the relay agent with its local interface IP address.Answer
- BThe server inspects the source MAC address field in the Ethernet header to map the client to its physical switchport VLAN broadcast domain.
- CThe server receives the original broadcast frame encapsulated in TCP port 67 and extracts the client's requested IP address option.
- DThe server matches the destination IP address of the incoming unicast packet, which is set to the client's default gateway IP address.
Answer
The server evaluates the Gateway IP Address (giaddr) field in the DHCP header, which was populated by the relay agent with its local incoming interface IP address.
When a Layer 3 device functions as a DHCP relay agent (e.g., using `ip helper-address`), it receives the client's local broadcast DHCPDISCOVER packet and rewrites it into a unicast packet destined for the central DHCP server. Crucially, the relay agent fills the Gateway IP Address (`giaddr`) field in the DHCP header with the IP address of the local interface on which the broadcast was received. Upon receiving the relayed packet, the central DHCP server inspects the `giaddr` value to select an IP address from the pool corresponding to that specific subnet.
Step-by-Step Solution
Key Concept
DHCP Relay Gateway IP Address (giaddr) Field Scope Selection