Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Windows DHCP server ignores relayed requests: the relay's giaddr must sit in an active scope

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

If clients on a routed VLAN or a remote site cannot get an address from a Windows DHCP server, and the relayed DHCPDISCOVER does arrive at the server, check the relay's own address. Microsoft documents that the relay's giaddr must belong to an active scope on the server. A relay whose address is outside every scope is treated as a rogue relay, and the server does not answer its clients.

The server logs nothing documented for this case. The proof is a packet capture on the server: a relayed DISCOVER arrives with a giaddr, and no OFFER leaves. The fix is to add an active scope that contains the relay's address, or to make the relay use an address that is already inside a scope.

What the error means

A DHCP relay agent forwards a client's broadcast to a server on another subnet. In doing so it fills the giaddr field (the relay agent IP address) with its own address. RFC 1542 says: "If this field is zero, the relay agent MUST fill this field with the IP address of the interface on which the request was received", and that if the field is already non-zero it "MUST NOT be modified".

The server uses giaddr for two jobs. RFC 2131 says a new address is selected "based on the subnet from which the message was received (if 'giaddr' is 0) or on the address of the relay agent that forwarded the message ('giaddr' when not 0)", and that when giaddr is non-zero the server sends return messages to the DHCP server port on the relay agent whose address appears in it. RFC 1542 puts the port as BOOTPS (67).

Microsoft adds a rule on top. In DHCP Subnet Selection Options: "All relay agent IP addresses (GIADDR) must be part of an active DHCP scope IP address range. Any GIADDR outside of the DHCP scope IP address ranges is considered a rogue relay and Windows DHCP Server will not acknowledge DHCP client requests from those relay agents." The page applies to Windows Server 2016 to 2025.

Microsoft's documentation does not give an event ID or a log line for a rogue relay. Do not wait for one. A server that silently ignores the request looks the same from the client side as a request that never arrived, so you tell them apart with captures on both ends.

Likely causes

Cause What you see How to confirm
Relay address (giaddr) is in no scope Relayed DISCOVER arrives; no OFFER leaves Server capture shows the DISCOVER with a giaddr; compare it with every scope range
The scope exists but is inactive Same as above Scope state is InActive. Microsoft: "Only an active scope responds to client requests."
The relay uses a different interface address than the client subnet Scope for the client subnet exists, but the relay's address is elsewhere The giaddr is not in the client scope; consider option 82 sub-option 5
Request never reaches the server Client capture shows DISCOVER; server capture does not Compare captures on both sides; check the relay target address and any firewall or VPN in the path
Server answers but the reply does not reach the relay Server capture shows OFFER sent; client does not see it Ping the relay address from the server; check what lies between
Something else holds UDP 67 or the server is bound wrongly Server never sees the packet in the DHCP service netstat -anb, Get-DhcpServerv4Binding

Prove the cause before changing anything

These commands and steps are taken from vendor documentation and have not been run or lab-tested. Everything here only reads state.

1. Capture on both sides

Microsoft's troubleshooting guidance uses Wireshark on the client and on the server at the same time, with ipconfig /renew on the client to trigger the exchange. Apply the display filter dhcp on the client capture. On the server capture use dhcp.id == <Transaction ID>, taking the transaction ID from the client capture.

Microsoft lists these drop patterns:

  • "Client capture shows DISCOVER packets, but server capture does not." The relayed request is not reaching the server. This is a path problem, not a scope problem.
  • "Client capture shows DISCOVER packets and server shows OFFER sent, but no OFFER seen on client." The server answered; the reply is lost on the way back.

The pattern that matters here is the one Microsoft does not list: the server capture shows the relayed DISCOVER, and no OFFER leaves. Open that DISCOVER in the packet details and read the relay agent IP address field (giaddr). RFC 2131 names the field in its message table as "Relay agent IP address". Write the value down.

2. Compare giaddr with the scopes

On the server:

Get-DhcpServerv4Scope

Microsoft documents that without -ScopeId it returns all scopes configured on the server; with -ScopeId 10.0.20.0 it returns that scope. Read the range and the state of each scope. Ask whether the giaddr you wrote down lies inside the range of an active scope. If no, you have found the cause.

3. Rule out the basics

Microsoft's server checklist includes:

  • Get-DhcpServerv4Binding to check the address the server is bound to;
  • netstat -anb to "verify that only the DHCP server is listening on UDP port 67 and 68";
  • "Verify that the relay agent IP address can be pinged from the DHCP server";
  • checking intermediate devices "for features such as VRRP/HSRP, Dynamic ARP Inspection, or DHCP snooping that are known to cause problems".

Event logs are under Applications and Services Logs > Microsoft > Windows > DHCP-Server, and the service debug logs are in %windir%\System32\Dhcp by default. Read them for context, not as the proof for this fault.

Example (illustrative): relay-a forwards for VLAN 30 (10.0.30.0/24) to dhcp01 across a site-to-site link. The VLAN 30 interface on relay-a has the address 10.0.30.1, and dhcp01 has a scope for 10.0.30.0/24 that has never been activated. The server capture shows each DISCOVER arriving with giaddr 10.0.30.1 and no OFFER. Get-DhcpServerv4Scope shows the 10.0.30.0 scope as InActive.

Fix

Create or activate a scope that contains giaddr

If a scope for the client subnet exists but is inactive, Microsoft's Set-DhcpServerv4Scope page documents -State with the values Active and InActive:

Set-DhcpServerv4Scope -ScopeId 10.0.30.0 -State Active

Risk: activating a scope makes the server start leasing from it. Confirm the address range and exclusions first, and activate it in a maintenance window.

If the relay's address is not in any scope, Microsoft's workaround is: "A special scope can be created to 'authorize' relay agents. Create a scope with the GIADDR (or multiple if the GIADDR's are sequential IP addresses), exclude the GIADDR address(es) from distribution, and then activate the scope. This will authorize the relay agents while preventing the GIADDR addresses from being assigned."

The cmdlets are documented as Add-DhcpServerv4Scope (parameters -Name, -StartRange, -EndRange, -SubnetMask, -State; the state defaults to Active) and Add-DhcpServerv4ExclusionRange (-ScopeId, -StartRange, -EndRange). For a relay at 192.168.250.2:

Add-DhcpServerv4Scope -Name "Relay authorisation" -StartRange 192.168.250.2 -EndRange 192.168.250.2 -SubnetMask 255.255.255.252 -State InActive
Add-DhcpServerv4ExclusionRange -ScopeId 192.168.250.0 -StartRange 192.168.250.2 -EndRange 192.168.250.2
Set-DhcpServerv4Scope -ScopeId 192.168.250.0 -State Active

Adding the scope as inactive and activating it after the exclusion exists prevents a window in which the address could be leased. The values above are an example; use your own addressing, and check that the new range does not overlap a scope already on the server. Risk: this is a configuration change on a production DHCP server. If the server is part of a failover pair, check whether the partner needs the same scope. To back out, remove the scope.

The relay uses an address outside the client subnet

Microsoft documents DHCP option 82 sub-option 5 (RFC 3527 link selection), which lets a relay "specify an IP subnet from which the DHCP server should assign IP addresses and options". It is for the case where "the IP address that the relay agent uses to communicate with the DHCP server might be different than the IP address range from which the DHCP client IP address needs to be allocated". The same page's note still applies: the relay's giaddr must be inside an active scope. Link selection needs a relay that supports it; Microsoft's example is a wireless access point.

The request never arrives, or the reply never returns

If the server capture shows no DISCOVER, check the relay's configured server address and anything in the path that drops UDP 67. On a Linux relay the dhcrelay(8) page documents -iu for the upstream interface ("an interface from which replies from servers and other relay agents will be accepted"), -id for the downstream interface ("an interface from which requests from clients and other relay agents will be accepted"), and the server address(es) at the end of the command line. If the OFFER leaves the server and the client never sees it, check that the server can reach the relay address, which Microsoft's list covers with the ping check.

Disruptive step: restarting the relay service on a router or Linux host interrupts address assignment for every subnet that relay serves. Do it in a window, and back out by restoring the previous configuration.

Confirm the fix

  1. On a test client on the relayed VLAN, run ipconfig /renew while capturing on the client and the server.
  2. The client capture should show all four packets: DISCOVER, OFFER, REQUEST and ACK. Microsoft says: "If all are present, the DORA process is likely successful."
  3. In the DHCP console, the scope statistics and Address Leases show the new lease. Microsoft's checklist points to these for scope statistics and for bad-address listings.
  4. Confirm the relay's own address is not leased to a client, which is the point of the exclusion.

What to watch afterwards

  • Add the relay's address to a scope before changing, moving or adding a relay interface. Make it part of the checklist for a new VLAN or site.
  • Check that every scope you rely on is Active after any server rebuild or restore.
  • Capture a test renewal after each change in the path between relay and server (firewall, VPN, routing).
  • Record the relay address next to each scope so the next engineer can compare giaddr with the scopes.

Risks and limits

  • Microsoft documents the rogue-relay rule but no event ID, log line or counter for it. The proof therefore rests on a packet capture and the scope list.
  • Microsoft's rule says the relay address must be "part of an active DHCP scope IP address range". The page does not say how the server treats a relay that sits in an excluded address of a scope, but its own workaround excludes the relay address and activates the scope, which is the documented way to authorise it.
  • The subnet-selection page is dated 29 July 2021 and the troubleshooting page 12 February 2026.
  • Relay configuration on Cisco, Juniper and other routers is not covered; use the router vendor's documentation for the exact commands. Source NAT of the relay's address in the path is not covered either.
  • The steps apply to DHCPv4. DHCPv6 relays work differently.

Sources