How DHCP Relays Work across VLANs

A DHCP relay lets clients in one VLAN obtain IPv4 settings from a DHCP server on another routed network. A new client normally starts with a local broadcast because it does not yet have an IP address or know the DHCP server's address. Routers do not forward that ordinary broadcast into another VLAN by default. A relay listens on the client's network, forwards the DHCP message to a configured server, and delivers the response to the client.
A VLAN does not automatically require a relay. If an appropriate DHCP server already serves that VLAN locally, clients can reach it within the same broadcast domain. A relay is needed when those clients must obtain their settings from a server outside that broadcast domain. With relays, one central DHCP service can serve several VLANs, with a separate address range and settings for each client subnet.
Where the Client Broadcast Stops
Each VLAN forms a separate Layer 2 broadcast domain. A client looking for a new lease normally sends a DHCPDISCOVER broadcast to find a server. Other devices in the VLAN can receive that broadcast, but routing between VLANs does not carry it to a server on another subnet. Without a local server or a relay, the client's discovery message cannot reach that remote DHCP service.
For example, employee and guest devices may use the same physical switches while belonging to different VLANs. A DHCP server connected only to the employee VLAN will not receive the guest VLAN's broadcasts directly. Even if firewall rules allow guest devices to reach some employee resources, that permission does not forward DHCP discovery messages. The guest VLAN still needs a local DHCP service or a relay to the intended server.
How the Relay Reaches a Remote Server
The relay often runs on the client VLAN's gateway interface, which may belong to a router, firewall, or Layer 3 switch. It receives the client's broadcast and sends the DHCP message to the configured server, typically by unicast. On some routers and switches, you specify the DHCP server with an IP helper address setting. The DHCP server remains responsible for assigning addresses; enabling a relay does not create a pool of leases on the relay device.
In a basic DHCPv4 setup, the first relay fills the message's giaddr field with the IP address of the interface that received the request. The server uses that relay address to identify the client's subnet and to address its reply. It can then choose an available address from the pool configured for that subnet. The pool must already exist and have settings appropriate for the client network.
Some designs use a link-selection extension to identify the client subnet separately from the address used to reach the relay. Both the relay and server must support the extension and be configured to use it. When checking an unfamiliar network, establish which method it uses before assuming that giaddr alone determines the address pool.
How the Reply Reaches the Client
The server sends a DHCPOFFER containing an offered address and configuration details back to the relay. The relay delivers the offer on the client's VLAN. Depending on the client's broadcast flag and ability to receive unicast packets before configuring an address, that delivery can be a local broadcast or a unicast to the client.
The client then broadcasts a DHCPREQUEST identifying the offer it has selected, and the relay forwards that message to the server. If the server accepts the request, it returns a DHCPACK through the relay to confirm the lease and settings. The exchange therefore needs a working return path as well as a route from the relay to the server. Seeing the discovery request at the server proves only that the request arrived.
To renew a lease, the client usually sends a unicast DHCPREQUEST directly to the server, with the client's leased address as the source address. If renewal does not succeed, the client eventually broadcasts a request during rebinding, before the lease expires. That broadcast again needs a relay when the DHCP server is on another network. A successful renewal alone therefore does not show that new clients can obtain leases through the relay.
Configure the Scope, Routes, and Access Rules
Match each client subnet to the intended DHCP scope, including its address pool, subnet mask, gateway, and DNS settings. A guest VLAN should receive settings for the guest network, not addresses from the employee subnet. A wrong subnet mask or unreachable gateway can leave a client unable to communicate correctly even after it receives a lease.
Configure relay destinations for the DHCP servers authorized to serve that VLAN, then check the routes and access rules in both directions. Allowing the required DHCP traffic does not require unrestricted access between guest and employee devices. The relay's role in address assignment is separate from the firewall policy that controls what clients can reach afterward.
Before changing a relay destination or moving the server, record the current interface, destination, and scope settings. Use the instructions for the actual router, firewall, or switch: the names of relay settings and the way access rules apply vary by platform. Plan how to restore the previous configuration if clients cannot obtain the intended settings after the change.
Find Where the DHCP Exchange Fails
Start with a client in the affected VLAN. Confirm that it is configured to obtain an address automatically, then check its address, subnet mask, gateway, and DNS servers. A working connection with a manually assigned address does not show whether DHCP relay is working. Confirm the client's VLAN assignment too, since receiving a valid lease from the wrong VLAN can look like a server problem.
Use packet captures and DHCP logs to follow the exchange from the client VLAN to the relay and server, then back again. If the server receives the request but sends no offer, check the selected scope, available addresses, and any policy that could reject the request. If the server sends a reply but the client never receives it, check routing and filtering on the return path and delivery into the client VLAN.
After a change, have a test client request a new lease, then verify the assigned network settings. Check access to the resources that VLAN is supposed to reach separately. A successful ping between VLANs does not prove that DHCP relay works, just as receiving a lease does not prove that all application traffic is allowed.







