Junos dhcp relay not working, with the client binding stuck permanently in SELECTING state, is most often caused by one of five things: the DHCP relay group not actually applied to the client-facing interface, a firewall filter dropping bootp traffic on the path, an unreachable or misconfigured DHCP server address, a mismatch between the configured server-group and active-server-group, or a routing-instance boundary between the relay interface and the server path. This guide walks the check order using packet capture to prove exactly where the DORA exchange breaks down, rather than guessing.
This guide is written against Junos OS 21.4R3 on MX and EX platforms running the non-ELS DHCP relay configuration under forwarding-options dhcp-relay. If you are on an older ELS-based EX/QFX switch, the configuration hierarchy differs slightly and is referenced separately below.
What "Stuck in SELECTING" Actually Means
DHCP uses a four-step exchange commonly called DORA: Discover, Offer, Request, Acknowledge. A binding permanently stuck in SELECTING means the relay agent received the client's Discover but never got an Offer back from the server -- or the Offer came back but never made it to the client. This is a transport problem, not a DHCP protocol problem, which is why packet capture at each hop is more useful here than staring at the relay configuration alone.
show dhcp relay binding
A healthy binding moves from SELECTING through REQUESTING to BOUND within a second or two. A binding parked in SELECTING indefinitely, as documented in Juniper's own MX troubleshooting reference, means the Offer never arrived.
Diagnostic Order
show dhcp relay statistics
Gives you aggregate counts of packets received, relayed, and dropped by the relay process itself, which tells you quickly whether the relay agent is even seeing client traffic before you dig into packet captures.
monitor traffic interface ge-0/0/1.0 matching "udp port 67 || udp port 68" no-resolve detail
Run this on the client-facing interface first to confirm the Discover is arriving, then move the same capture to the server-facing interface to see whether the relay actually forwarded it, and finally capture at the server's own uplink if you have access, to see whether a reply was ever generated.
Root Cause 1: Relay Group Not Applied to the Client Interface (Most Common)
This is the single most common cause in the field, particularly after adding a new VLAN or subinterface that the DHCP relay group statement was never updated to include. The relay process only listens for client Discover packets on interfaces explicitly listed under the relay group.
set forwarding-options dhcp-relay server-group CORP-DHCP 203.0.113.10
set forwarding-options dhcp-relay active-server-group CORP-DHCP
set forwarding-options dhcp-relay group ALL interface ge-0/0/1.0
Confirm every client-facing VLAN or subinterface that needs relay service is explicitly listed under the group with show forwarding-options dhcp-relay | display set -- a forgotten interface here is invisible until someone tries to DHCP a device on that specific VLAN.
Root Cause 2: Firewall Filter Dropping DHCP Traffic
If an interface or loopback filter was rewritten without carrying forward an explicit permit for UDP ports 67 and 68, DHCP Discover and Offer packets get silently dropped with no log entry unless you specifically added a log or count action to the filter term.
set firewall family inet filter DHCP-RELAY-IN term 1 from protocol udp
set firewall family inet filter DHCP-RELAY-IN term 1 from source-port 68
set firewall family inet filter DHCP-RELAY-IN term 1 then count BOOTP-REQUEST-COUNT
set firewall family inet filter DHCP-RELAY-IN term 1 then accept
set firewall family inet filter DHCP-RELAY-IN term 2 then accept
set interfaces ge-0/0/1 unit 0 family inet filter input DHCP-RELAY-IN
Check the counter after a client attempts to get an address with show firewall filter DHCP-RELAY-IN -- if the counter stays at zero while you know the client is actively broadcasting, the packets are being dropped somewhere upstream of this filter, not by this filter itself.
Root Cause 3: Server Unreachable or Reply Path Asymmetric
The relay agent forwards the client's Discover as a unicast packet to the configured server address, using the relay interface's own address as the giaddr. If the return route from the server back to that giaddr takes a different path than the forward route -- common in networks with asymmetric routing or a firewall in the return path that does not expect unsolicited inbound DHCP replies -- the Offer never makes it back.
show route 203.0.113.10
Confirm the server address itself is reachable, and separately confirm the server has a correct return route to the relay agent's giaddr, not just to the client subnet.
Root Cause 4: Server-Group and Active-Server-Group Mismatch
Junos requires both a server-group definition and a separate active-server-group statement pointing at it. If the active-server-group name does not exactly match a defined server-group, or references a group that was renamed without updating this statement, the relay has no valid server to forward to even though the configuration looks complete at a glance.
show forwarding-options dhcp-relay server-group
show forwarding-options dhcp-relay active-server-group
Confirm the names match exactly, including case, between these two statements.
Root Cause 5: Routing-Instance Boundary Between Relay Interface and Server
If the client-facing interface sits in a non-default routing-instance (a VRF) and the DHCP server is reachable only through the default instance or a different VRF, the relay group configuration needs to explicitly account for that boundary, or the forwarded packet has no route to the server at all.
set forwarding-options dhcp-relay group ALL routing-instance-access-only
Note that cross-VRF DHCP relay requires additional route-leaking or logical-system design beyond the relay statement itself -- if your client VLAN and DHCP server live in different routing-instances, treat this as a routing problem first, not purely a DHCP relay configuration problem.
Quick Reference: Symptom, Cause, Fix
| Symptom | Likely Cause | Fix |
|---|---|---|
| No Discover seen at relay statistics at all | Relay group not applied to interface | Add the interface under forwarding-options dhcp-relay group |
| Discover seen locally, nothing forwarded | Firewall filter dropping UDP 67/68 | Add explicit DHCP permit term with counter |
| Forwarded to server, no Offer returns | Asymmetric routing or unreachable server | Verify return route to the relay giaddr |
| Relay configured but inactive | server-group/active-server-group name mismatch | Confirm exact name match between both statements |
| Works in default instance, fails in VRF | Routing-instance boundary | Address as a routing/VRF leaking problem first |
Verification: Healthy DORA Exchange
monitor traffic interface ge-0/0/1.0 matching "udp port 67 || udp port 68" no-resolve detail
16:44:57 Out IP 203.0.113.1.68 > 203.0.113.10.67: BOOTP/DHCP, Request, length 316
DHCP-Message Option 53, length 1: Discover
16:44:57 In IP 203.0.113.10.67 > 203.0.113.1.68: BOOTP/DHCP, Reply, length 300
DHCP-Message Option 53, length 1: Offer
A healthy exchange shows a Discover going Out from the relay toward the server, followed within milliseconds by a Reply with Offer coming back In. If you only ever see the Discover going out and never a Reply coming back, the problem is firmly on the server side or in the return path, not in your local relay configuration.
show dhcp relay binding
IP address Session Id Hardware address Expires State Interface
203.0.113.45 340872070 aa:bb:cc:dd:ee:ff 7200 BOUND ge-0/0/1.0
Full step-by-step reference is in Juniper's support portal. Troubleshooting DHCP relay issue for MX
Frequently Asked Questions
Why is my DHCP client stuck in SELECTING state on Junos?
SELECTING means the relay agent sent the client's Discover but never received an Offer back from the server. Use monitor traffic on both the client-facing and server-facing interfaces to find exactly where the exchange breaks.
Does Junos drop DHCP traffic by default on a Layer 3 interface?
Yes, any transit DHCP packet is dropped unless the receiving interface is explicitly configured for DHCP relay or DHCP server service. This is deliberate default behavior, not a bug, and is a common surprise on newly added VLANs.
How do I check if a firewall filter is blocking my DHCP relay traffic?
Add an explicit permit term for UDP ports 67 and 68 with a count action, then check the counter with show firewall filter <name> after a client attempts to request an address. A counter stuck at zero during an active client request points to a drop happening upstream of that filter.
What is the difference between server-group and active-server-group in Junos DHCP relay?
The server-group statement defines a named list of one or more DHCP server addresses. The active-server-group statement tells the relay agent which defined server-group to actually use, and the two names must match exactly or the relay has no server to forward to.
Can DHCP relay work across different routing-instances in Junos?
Not by default -- if the client interface and the DHCP server live in different routing-instances or VRFs, you need to address the route-leaking or logical-system design separately. Treat a cross-VRF DHCP failure as a routing problem first before troubleshooting the relay statement itself.
Related guides: visit our troubleshooting category hub for more interface and protocol failure guides, see our Junos VRRP not working guide if the same gateway is also having first-hop redundancy issues, and check our Junos LACP interface down guide if the uplink carrying DHCP traffic is itself an aggregated bundle.
Juniper, Junos, MX, SRX, EX and QFX are trademarks of Juniper Networks, Inc. juniperclient.com is independent and unaffiliated.
Discussion (0)