Question

Difficulty: MediumDHCP Architecture and Relay Services

A network administrator configures a Layer 3 switch interface serving the Finance subnet (10.20.40.0/2410.20.40.0/24) with `ip helper-address 10.10.10.254` to direct DHCP traffic to a centralized DHCP server on the Management subnet (10.10.10.0/2410.10.10.0/24). When a client host on the Finance subnet broadcasts a DHCPDISCOVER packet, how does the Layer 3 switch process this packet before transmitting it to the DHCP server?

  1. It populates the gateway IP address (`giaddr`) field with the IP address of its receiving interface and forwards the packet as a unicast UDP message to destination port 67.Answer
  2. B
    It forwards the client's broadcast packet unchanged to 10.10.10.254 using destination UDP port 68.
  3. C
    It encapsulates the DHCPDISCOVER frame into a Layer 2 Ethernet broadcast frame and floods it out all active switch ports.
  4. D
    It converts the packet payload into a TCP segment to guarantee delivery across subnets to 10.10.10.254.

Answer

The Layer 3 switch populates the gateway IP address (`giaddr`) field with the receiving interface's IP address on the client subnet and forwards the packet as a unicast UDP message to the DHCP server at 10.10.10.254 on destination port 67.
When an `ip helper-address` (DHCP relay agent) is configured on a router or Layer 3 switch interface, it intercepts local DHCP broadcast messages (DHCPDISCOVER/DHCPREQUEST). The relay agent inserts the IP address of the interface that received the broadcast into the `giaddr` (gateway IP address) field of the DHCP message header. This informs the remote DHCP server which IP subnet scope to assign an address from. The relay agent then forwards the modified packet directly to the configured DHCP server IP as a unicast UDP packet on destination port 67.

Step-by-Step Solution

1
Intercept client broadcast
The Layer 3 switch receives a Layer 2/3 broadcast DHCPDISCOVER packet on the client-facing interface (10.20.40.110.20.40.1).
DHCP clients initially have no IP address, so they broadcast to find local DHCP servers.
2
Modify DHCP header (`giaddr`)
The switch inserts 10.20.40.110.20.40.1 into the gateway IP address (`giaddr`) field of the DHCP payload.
The centralized DHCP server uses the `giaddr` field to determine which subnet scope (10.20.40.0/2410.20.40.0/24) should be used for address allocation.
3
Unicast forward to destination server
The switch encapsulates the payload as a unicast UDP packet with source IP 10.20.40.110.20.40.1, destination IP 10.10.10.25410.10.10.254, and destination UDP port 67.
DHCP servers listen on UDP port 67 for both client broadcasts and relayed unicast messages.

Key Concept

DHCP Relay Agent Behavior and `giaddr` Header Insertion
Estimated Time:1m 0s
Rate this question