Rogue DHCP Servers: Detection, Containment, Prevention
It starts as the strangest ticket pattern you have ever seen. Half the marketing floor cannot reach anything, but the other half is fine. The broken machines have addresses from a network you do not run — 192.168.1.x on a network you numbered 10.0.x.x. Their "gateway" is an address that does not answer. A user reboots and gets a good address this time. Another reboots and gets a bad one. Your DHCP server logs look normal. Your DHCP server, as it turns out, is no longer the only front desk in the hotel.
A rogue DHCP server is any device answering DHCP requests on your network without being supposed to. It is one of the most confusing failures in networking precisely because nothing is down. Two servers are up, both cheerfully handing out addresses. Every new device joins a coin-flip raffle for a working configuration. The good news: rogues are very findable. They cannot help announcing themselves in every lease they grant. And that signature can be traced to a physical switch port, usually within the hour.
This guide covers the whole arc. It explains how rogues get onto sensible networks (spoiler: usually attached by a helpful, well-meaning human). It explains why the symptoms scatter and shimmer the way they do. It covers the exact hunt — from a poisoned laptop, to a hardware address, to a switch port, to a device you can hold. It shows how to contain the mess and heal the clients. And it covers the switch feature that makes the whole problem structurally impossible next time.
In this guide
- How a rogue appears on a sensible network
- Why the symptoms scatter and shimmer
- Confirming it from one affected machine
- Not every wrong address is a rogue
- The hunt: from MAC address to switch port
- Containment and cleanup
- Prevention: DHCP snooping and friends
- Where to go next
How a rogue appears on a sensible network
Recall from how DHCP really works that a joining device broadcasts its request to the whole local segment. It accepts the first offer that comes back. There is no authentication in that exchange — no password, no badge check. Any device that speaks the protocol can answer, and clients have no way to know which desk clerk is legitimate. That openness is what makes DHCP effortless, and it is the entire attack surface here: whoever answers first, wins.
So who answers uninvited? The league table, from most common to least. First: the helpful person's home router. Someone wants more ports or better Wi-Fi at their desk. They bring in a consumer router and plug one of its LAN ports into your wall jack. Consumer routers run a DHCP server on their LAN side, out of the box, always. Now it is on your network, handing out its factory-default 192.168.x.x world view to your colleagues. No malice; genuine helpfulness, catastrophic side effect. Second: the misconfigured box. It might be a lab machine with a DHCP role left enabled. It might be a virtualization host whose guest network is bridged instead of isolated, so its internal address-sharing service leaks onto the real network. Or it might be a spare firewall powered up "just to check something," or a phone hotspot bridged badly. A distant third: actual malice. An attacker who controls the offer controls the gateway and DNS server a victim uses. That gives them the ability to sit in the middle of traffic or steer victims to counterfeit sites. Rare, but it is why an unexplained rogue deserves a serious look at what the device actually is before you shrug it off as someone's router.
Two honorable mentions round out the lineup. A laptop with connection sharing switched on quietly runs a DHCP server on its wired side. Connection sharing is the operating-system feature that turns a machine into a mini-router so it can share its own link. People enable it in hotels and forget. The same goes for pocket-sized travel routers that come back from a trip still configured to serve. And the strangest variant of all: two legitimate servers fighting. Consider a second authorized DHCP server: a restored backup, a branch server after a topology change, an old appliance someone re-racked. If it ends up answering for a range it should no longer own, you get every rogue symptom with no villain at all. It is just your own infrastructure disagreeing with itself. The hunt in this guide finds that case exactly the same way, which is part of why the hunt is worth learning even on a locked-down network.
Why the symptoms scatter and shimmer
Rogue symptoms follow three rules, and each explains one weird aspect of the ticket pattern.
Rule one: it is a race, and the rogue is often faster. Both servers hear the broadcast; the client takes the first offer. Your legitimate server frequently sits across a relay, a router hop or three away. The rogue is usually plugged into the same local segment as its victims — so the rogue wins embarrassingly often. But not always: load, timing, and luck vary per exchange, which is why one reboot fixes a machine and the next breaks it. Intermittent, per-device, per-moment randomness is the rogue's signature scent.
Rule two: only address-seekers are affected. Devices holding a valid lease renew it by contacting their original server directly — no broadcast, no race, no rogue. Established devices stay healthy while newcomers, rebooters, and expiring leases fall into the raffle one by one. The floor breaks gradually, which nicely disguises the moment the rogue arrived.
Rule three: broadcasts stop at the segment boundary. The rogue can only poison the VLAN (or switch area) it is physically attached to. That is as far as the Discover broadcasts — and its offers — reach. Symptoms clustered in one area of the building, one VLAN, or downstream of one switch are a location fix before you have touched a single tool. If accounting is fine and engineering is on fire, the rogue lives with engineering.
What the poisoned users experience depends on what the rogue handed out. That could be a wrong-subnet address (can talk to nobody) or a wrong gateway (local things work, internet does not). Or it could be wrong DNS (everything "is down" because nothing resolves). All of it reads as "the network is broken, but only for some people, and it keeps moving". Without this mental model, that sends admins chasing cables and access points for a day.
Confirming it from one affected machine
One poisoned machine is all the evidence you need, because every lease names the server that granted it. On a Windows victim:
C:\> ipconfig /all IPv4 Address . . . . . . . . . . : 192.168.1.57 <-- not your numbering Subnet Mask . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . : 192.168.1.1 <-- not your gateway DHCP Server . . . . . . . . . . : 192.168.1.1 <-- the culprit names itself DNS Servers . . . . . . . . . . : 192.168.1.1
If the DHCP Server line is anything other than your real server (or the relay-forwarded lease you expect), you have confirmation in one command. The "everything points at 192.168.1.1" pattern is the classic consumer-router fingerprint. The device is advertising itself as address-giver, gateway, and DNS all at once, exactly as it would in someone's apartment. Now convert that IP address into a hardware address, because the IP is meaningless outside the rogue's imaginary network. But the MAC address is physical. It is burned into the offending box and recorded by every switch it talks through. From the same victim machine, which shares a segment with the rogue:
C:\> ping 192.168.1.1 C:\> arp -a Internet Address Physical Address Type 192.168.1.1 a4-2b-b0-9e-11-07 dynamic <-- the rogue's MAC
The arp -a command lists the IP-to-hardware-address mappings the machine has learned; the ping first simply forces it to learn the rogue's. Feed the first half of that hardware address into any OUI lookup (the manufacturer prefix registry described in the lease churn guide). You usually get a home-networking brand name. At that point you know precisely what you are hunting: somebody's personal router. If you prefer to see the crime itself, a packet capture filtered to DHCP traffic will show it. You will see two OFFERs racing to answer each Discover, timestamps and all. The packet capture pillar covers that skill set.
Not every wrong address is a rogue
Before you launch the hunt, spend two minutes ruling out the impostors' impostors — the ordinary problems that produce superficially similar tickets. A machine with a manually configured wrong address has no DHCP Server line pointing anywhere strange, because DHCP was never involved. Check whether the victim is even set to obtain an address automatically. A machine with a 169.254.x.x self-assigned address is the opposite of a rogue victim. It got no answer at all. That points at a dead server, empty scope, or broken relay, all covered elsewhere in this pillar. And a user might be on the wrong Wi-Fi network (the guest network, a neighboring office's network). They will have a perfectly valid lease from a perfectly legitimate server — just not yours. The quick sorting table:
| What you see on the victim | Most likely story | Quick check |
|---|---|---|
| Valid-looking address, unfamiliar DHCP Server entry | Rogue server (or a second legitimate server misbehaving) | Compare the DHCP Server line against your real server and relays |
| 169.254.x.x self-assigned | No server answered: dead service, empty scope, broken relay | Scope utilization + service status; see the rest of this pillar |
| Wrong address, DHCP disabled on the interface | Old static configuration, not DHCP at all | Interface settings: "obtain automatically" unchecked |
| Right address family, wrong network's lease | Device joined the wrong Wi-Fi network | Which network name is it actually connected to? |
| Same symptoms on exactly one VLAN, correct server named | Relay pointing at the wrong scope or network | Review the relay/helper configuration for that VLAN |
Only the first row justifies the bloodhound work below. The others have their own, faster fixes — and skipping this two-minute sort is how admins spend an afternoon hunting a rogue that never existed.
The hunt: from MAC address to switch port
Switches keep a MAC address table: a live list of which hardware addresses have been seen on which port, learned automatically from traffic. That table is your bloodhound. The hunt is the same on every vendor's gear, even though command syntax varies:
- 1. Start at any switch in the affected area and search its MAC table for the rogue's hardware address. It will name a port.
- 2. Ask what that port is. An uplink is a port leading to another switch — the giveaway is dozens of different MACs learned on the same port. If it is an uplink, move to the switch at the far end and search again.
- 3. Repeat until the trail ends at an access port — a port with only one or two MACs on it. That is the physical jack the rogue is plugged into.
- 4. Translate port to place. Port documentation or cable labels turn "port 17" into "the jack by the window in the third-floor huddle room." (If your patch panels are unlabeled, this is the incident that finally motivates fixing that.)
- 5. Go look. You will usually find a small plastic router, a glowing lab box, or a very apologetic coworker mid-explanation.
A worked trace, with generic output of the kind every managed switch can produce:
core-switch> show mac-table address a4-2b-b0-9e-11-07 VLAN MAC Port 20 a4-2b-b0-9e-11-07 Gi0/48 <-- 40+ MACs here: uplink, keep walking floor3-switch> show mac-table address a4-2b-b0-9e-11-07 VLAN MAC Port 20 a4-2b-b0-9e-11-07 Gi0/17 <-- 2 MACs on this port: found the jack
Two MACs on the final port, incidentally, is itself informative. It is the router's own address plus one device behind it — the helpful colleague's laptop. The laptop is working perfectly, blissfully unaware of the chaos radiating from the other ports.
Two dead-ends you may hit, and their exits. Suppose the trail ends at a port carrying a small handful of MACs that is clearly not an uplink. There is probably an unmanaged mini-switch under a desk at that jack — a five-port box with no MAC table you can query. The switch got you to the desk; your eyes and the cable do the last meter. And if the rogue's address never appears in any wired MAC table, consider that it may be attached over Wi-Fi. It may be a hotspot or badly configured device joined to your wireless network. Your wireless controller can search connected clients by MAC and name the exact access point it is speaking through. That narrows the search to one antenna's coverage area instead of one jack.
Containment and cleanup
Containment is gloriously simple: disable that switch port (or walk over and unplug the cable). Administratively shutting the port from the switch is faster than walking and works from your desk, which matters when the rogue is at a branch site. Do that first; investigate second. Suppose the device turns out to be anything you cannot explain — not a coworker's router, not a known lab box. Treat it as a potential security incident. Leave it powered for examination, note where it was and when, and escalate rather than factory-resetting the evidence.
Then heal the victims, because killing the rogue does not fix the machines still holding its poisoned leases. They will limp until those leases expire. On any machine you can reach, ipconfig /release followed by ipconfig /renew forces a fresh DORA that only your real server can now answer. For the rest, a reboot does the same thing, so a short "please restart if you still have no network" notice mops up the long tail. Expect stragglers for hours on scopes with long leases; the mess fades in exact proportion to your lease durations.
Tip: after any rogue incident, skim your DHCP logs for the affected period. A gap in expected grants, plus a cluster of devices renewing strange addresses afterward, gives you the rogue's arrival time. That is useful for the incident write-up and for spotting whether it had been quietly running for weeks. Reading lease churn shows what those patterns look like.
Prevention: DHCP snooping and friends
The structural fix is a switch feature generically called DHCP snooping, available on most business-grade switches under that name or a close cousin. The idea is elegant: you tell the switch which ports are trusted to carry DHCP server traffic. These are the port facing your real server and the uplinks toward it. Every other port becomes untrusted. The switch then inspects DHCP messages. Client messages (Discovers, Requests) pass freely everywhere, but server messages (Offers, Acknowledgments) arriving on an untrusted port are simply dropped. A rogue can shout offers all day into a port that discards them; clients never hear it. And many switches will log or alert on the attempt, converting next year's mystery outage into a one-line notification. As a bonus, the switch builds a binding table of which address belongs to which port. That is a foundation other switch security features build on, and a handy troubleshooting record in its own right.
Warning: roll snooping out deliberately, in a maintenance window, one VLAN at a time. The classic self-inflicted wound is forgetting to trust an uplink or the real server's port. At that point the switch dutifully blocks your legitimate DHCP. You have built yourself a network-wide outage with extra steps. Test on a low-stakes VLAN first, watch it, then expand.
Three softer layers complete the defense. Give people a sanctioned alternative: most rogues exist because someone needed more ports or better coverage. So a request path that actually delivers a switch or access point within days removes the motive — cheaper than any technology. Keep guests off the staff network: a proper guest VLAN both shrinks the blast radius and reduces the improvised-hardware temptation. And watch for the symptom centrally. Your monitoring can catch rogues by their effects. Checks include synthetic lease tests that verify the answering server's identity, and log review that flags leases granted by unfamiliar sources. Both checks are part of the standard kit described in monitoring DHCP itself.
Where to go next
Rogue DHCP is the failure mode that best rewards understanding the protocol. Once you know the offer race exists, the shimmering symptoms stop being spooky and start being coordinates. If the underlying mechanics still feel wobbly, how DHCP really works is the foundation. The guide on monitoring DHCP itself turns the detection ideas here into scheduled checks. And if your address pools have their own troubles, scope exhaustion covers the other great DHCP mystery. The full series lives at DHCP: The Service Everyone Forgets.
Put this into practice with SysPeep Monitor
Half of catching a rogue is knowing your network's normal population and noticing the stranger. SysPeep Monitor auto-discovers the devices and interfaces on your network and watches your infrastructure over SNMP, WMI, and SSH. That way, an unexpected box, or a DHCP server behaving oddly, surfaces on a dashboard instead of in a flood of confused tickets. The free trial installs on any Windows machine in minutes.
Download Free TrialLearn About SysPeep