When a few computers in an office lose the internet at random, while the people beside them carry on as normal, the cause is often not the internet connection at all. It is a second device on the network handing out addresses it has no business handing out: a rogue DHCP server. This guide walks through how to prove it, find the device, remove it and stop it happening again. It is written for small offices in Oshawa and across Durham Region that run their own network with no full-time IT person on staff.
A typical case
A typical case: a 15-person engineering supplier near the Highway 401 corridor starts getting complaints on a Monday. Two laptops and the reception PC show “No internet”, the shared drive vanishes, and a restart fixes it for an hour or two before it happens again. The internet provider says the line is fine, and the problem seems to move from desk to desk.
Why it happens
Every computer, phone and printer that is set to “obtain an IP address automatically” sends out a broadcast when it joins the network asking for an address. Whichever DHCP server answers first wins. In a normal office there is one answer: the firewall, router or Windows server hands out an address in the right range (for example 10.0.0.x), with the right gateway and DNS servers.
When a second DHCP server appears on the same network, both answer. Some devices get a good address from the real server. Others get an address from the impostor, usually in a completely different range such as 192.168.0.x or 192.168.1.x, with that device listed as the gateway. Those machines can no longer reach the firewall, the file server or the printers, and their internet only works if the rogue device happens to have its own path out. Because each device renews its lease on its own schedule, the problem appears to drift around the office.
The most common rogue servers in small offices are:
- A consumer Wi-Fi router plugged into a wall jack through one of its LAN ports, often brought in to “boost the Wi-Fi” in a back room or boardroom.
- The internet provider’s modem or gateway, reset or re-provisioned back to router mode, now handing out addresses on the office network behind the firewall.
- An old router or firewall left plugged in after an upgrade, with its DHCP service still switched on.
- A second DHCP service on a NAS, a Windows server or a virtual machine host that someone enabled during testing.
The other cause of the same symptoms is a duplicate static address: someone typed a fixed address into a printer or PC that sits inside the DHCP range. Ubiquiti’s own help centre article, “Duplicate IP Addresses and Rogue DHCP Servers”, names these as the two main causes, so the diagnosis below separates them.
Before you start
- Access needed: a local administrator account on at least one affected Windows PC, and admin access to your firewall or router and, if you have them, your managed switches or controller (UniFi Network, TP-Link Omada or similar).
- Tools: Windows PowerShell and Command Prompt (built in), a notepad for addresses, and physical access to the network cabinet and wall jacks.
- Time: 30 to 60 minutes to confirm the cause; finding a hidden device on unmanaged switches can take an afternoon.
- What can break: releasing an address drops that PC’s network connection for a few seconds, and any remote session to it will disconnect. Turning on DHCP protection on the wrong switch port can block the real DHCP server and stop every device getting an address.
- Backup and rollback: before changing anything on a switch, controller or firewall, export or back up its configuration (UniFi and Omada controllers both offer a backup download in their settings) and take a photo of the switch ports and cables. Write down your correct address range, gateway and DNS servers so you can compare against them.
Diagnose
1. Record what a good machine looks like
On a PC that is working normally, open PowerShell and run:
# PowerShell
Get-CimInstance Win32_NetworkAdapterConfiguration -Filter "DHCPEnabled=TRUE AND IPEnabled=TRUE" |
Select-Object Description, IPAddress, DefaultIPGateway, DHCPServer, DHCPLeaseObtained
Write down the DHCPServer and DefaultIPGateway values. In a typical office both point to the firewall, for example 10.0.0.1, or the DHCP server is a Windows server such as 10.0.0.10. This is your known-good answer.
2. Check an affected machine
Run the same command on a PC that is having trouble, or use the classic command in Command Prompt:
:: cmd
ipconfig /all
Look at the IPv4 Address, Default Gateway and DHCP Server lines for the active adapter, and compare:
| What you see | What it means |
|---|---|
| Address in a different range (e.g. 192.0.2.105) and DHCP Server is something other than your known-good server | A rogue DHCP server answered. Continue to step 3. |
| Address in the right range, right DHCP server, but drops persist | Probably an address conflict or a different fault. Go to step 4. |
| Address starting 169.254 | No DHCP server answered at all. Check the cable, the switch port and the real DHCP server first. |
For more detail on the same adapter, including its DHCP status and network profile, you can also run Get-NetIPConfiguration -Detailed, which Microsoft documents in its NetTCPIP module reference.
3. Get the rogue server’s hardware address
While the affected PC still has the bad lease, ask it for the MAC address of the device that gave it out. Replace 192.0.2.1 with the DHCP Server value you saw:
# PowerShell
Test-Connection 192.0.2.1 -Count 2
Get-NetNeighbor -IPAddress 192.0.2.1 | Select-Object IPAddress, LinkLayerAddress, State
The LinkLayerAddress is the MAC address of the rogue device. The first six characters identify the manufacturer; you can look them up in the IEEE public registry of assigned identifiers. A consumer router brand tells you to go looking for a router, while the name of your internet provider’s equipment maker points to the modem. If you can reach it, browsing to the rogue address in a web browser often shows the device’s login page and model name, which settles the question quickly. Do not log in to a device you do not own.
4. Rule out a duplicate static address
If addresses look correct, check the Windows System log for address conflicts. Microsoft documents event ID 4199 from the Tcpip source, with the message “The system detected an address conflict”, in its troubleshooting article for event 4199:
# PowerShell
Get-WinEvent -FilterHashtable @{LogName='System'; ProviderName='Tcpip'; Id=4199} -MaxEvents 10 |
Format-List TimeCreated, Message
The message names the conflicting address and the hardware address of the other device. If the conflict is a real address, find that MAC in your router’s client list. If the conflict shows 0.0.0.0, Microsoft’s article explains that a switch or router feature called IP Device Tracking can cause it, which is a different fix from this guide.
The DHCP client also keeps its own log. In Event Viewer, open Applications and Services Logs > Microsoft > Windows > Dhcp-Client > Admin and look for errors around the times staff reported drops.
5. Check your managed network gear
If you use UniFi, the Network application logs duplicate IP and rogue DHCP events in its system log, according to the Ubiquiti article mentioned above. Check it and the client list for a device with the MAC address from step 3; the client entry shows which switch and port it is connected to.
If you have a Windows domain with a Windows DHCP server, list the DHCP servers authorized in Active Directory on a domain controller:
# PowerShell (on a domain controller or a PC with RSAT DHCP tools)
Get-DhcpServerInDC
Microsoft’s Get-DhcpServerInDC reference notes that only authorized Windows DHCP servers can lease addresses. That rule applies only to Windows servers, though. A consumer router does not check Active Directory, so an empty or correct list here does not rule out a rogue router.
Fix
Branch A: you found the device
- Trace the MAC address to a switch port. On UniFi or Omada, the client list shows the port. On unmanaged switches, follow the cable from the port lights, or ask staff whether anything new was plugged in recently: a travel router, a “Wi-Fi extender”, or the ISP modem being swapped.
- Unplug the rogue device. If it is a Wi-Fi router someone needs for coverage, it can stay, but it must be set to access point or bridge mode with its DHCP server turned off. Check its manual for the exact setting name, as every brand labels it differently.
- If the rogue is the ISP gateway, ask your provider to put it back into bridge mode, or turn off its DHCP service in its admin page if your provider allows that. Do not change ISP equipment settings without their guidance if they manage it.
- On each affected PC, get a fresh lease from the real server. This drops the network briefly:
:: cmd (run as administrator)
ipconfig /release
ipconfig /renew
ipconfig /flushdns
Microsoft’s ipconfig reference describes each switch. Printers, phones and other devices that cannot run commands can be restarted, or will pick up a good lease when their current one expires.
Branch B: you cannot find the device
If you have managed switches, turn on the feature that only allows DHCP offers from your real server. Back up the configuration first.
UniFi: following Ubiquiti’s article, select the network in the UniFi Network application, enable DHCP Guarding, and enter the IP address of your trusted DHCP server. If your UniFi gateway hands out addresses, enter the network’s gateway IP. DHCP offers from every other server are then blocked. Ubiquiti notes that DHCP Guarding requires UniFi switches.
TP-Link Omada: TP-Link’s guide to DHCP Snooping and DAI on Omada switches applies to Omada Controller 6.1 and later with current switch firmware. Go to Network Config > Security > IMPB, open DHCP Snooping, tick to enable it globally, click Add, select the switches and choose the ports, then click Confirm.
Warning: on Omada, DHCP server replies arriving from a port with snooping enabled are dropped, and TP-Link states the cascade port cannot be selected. Enable it only on ports that face desks and wall jacks, never on the port leading to your firewall or Windows DHCP server, or nobody will get an address.
Other managed switch brands call the same feature DHCP snooping, with “trusted” ports facing the real server. Check your switch’s own manual for the exact steps.
Once protection is on, renew leases on affected PCs as in Branch A. The rogue device is still on the network, so keep looking for it; protection only stops it handing out addresses.
Branch C: it was a duplicate static address
- In your router or DHCP server, note the start and end of the DHCP range.
- Change the static address on the printer or PC so it sits outside that range, or remove the static setting and create a DHCP reservation for the device instead.
- Restart the device that had the conflict, then check event 4199 stops appearing.
Verify
- On two or three PCs that had problems, run the CIM command from step 1 again. The DHCP server and gateway must match your known-good values.
- Confirm the office can reach its key systems:
# PowerShell
Test-NetConnection 10.0.0.1
Test-NetConnection fileserver.contoso.example -Port 445
Resolve-DnsName example.com
- Check the next morning, after leases have had time to renew overnight, that no device in the router or controller client list has an address outside your range.
- Re-run the event 4199 query on a PC that was affected and confirm no new entries appear after the fix time.
Prevent it
- Turn on DHCP Guarding or DHCP snooping even after the rogue is gone, if your switches support it. It costs nothing and stops the next one.
- Write a short rule for staff: nothing gets plugged into a wall jack except computers, phones and approved printers. Offer a proper access point when someone needs better Wi-Fi in a room, so they do not bring their own router.
- Disable unused wall jacks at the switch, or leave them unpatched in the cabinet.
- Keep static addresses outside the DHCP range and keep a simple list of which device uses which fixed address.
- Watch the alerts your controller or firewall already produces. UniFi logs duplicate IP events; set notifications so someone sees them.
- After any ISP visit or modem swap, check that the modem is still in bridge mode and that only one device is handing out addresses.
When to call a tech
Call in help if the rogue device is somewhere you cannot trace on unmanaged switches, if the network has VLANs or several sites, if the DHCP server is a Windows server you are unsure about changing, or if turning on DHCP protection blocks everyone and you cannot get back to a working state. A tracing job like this is usually faster with someone standing at the network cabinet.
We can send a technician to your office in Oshawa, whether you are downtown, in the north end near the universities or along the Highway 401 business corridor, for a half day ($400) or a full day ($750). We work with business clients only, and taxes are extra. Read more about IT support in Oshawa and our network setup and troubleshooting work, see pricing, or Book a day in Oshawa. You can also use the chat button on this page to describe the problem first.
Questions
How do I know if there is a rogue DHCP server on my network?
Run ipconfig /all on an affected PC. If the DHCP Server line shows an address that is not your router, firewall or Windows server, and the PC’s address is in a different range from everyone else, another device is handing out addresses.
Can a Wi-Fi router plugged into a wall jack break the office network?
Yes. If it is plugged in through a LAN port with its DHCP server on, it answers address requests from office computers and sends them to the wrong gateway. Set it to access point mode with DHCP off, or remove it.
Can someone in Oshawa come on site to trace a rogue DHCP server?
Yes. IT Guy for a Day sends a technician to Oshawa businesses for a half day or full day, with no travel charge, to trace the device, fix the leases and set up DHCP protection on your switches.
Last checked 2026-11-23 against Windows 11 (build 26300) and Windows Server 2016-2025 PowerShell modules, the Ubiquiti UniFi Network help article on duplicate IPs and rogue DHCP servers, and TP-Link Omada Controller 6.1+ DHCP Snooping guidance. Scenarios in this guide are composites of common issues, not a specific client.