<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lucas Czekaj</title>
    <description>The latest articles on DEV Community by Lucas Czekaj (@czekaj).</description>
    <link>https://dev.to/czekaj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F56683%2F3c52f270-3a5a-45fc-a3d8-4b34ec3282b3.jpg</url>
      <title>DEV Community: Lucas Czekaj</title>
      <link>https://dev.to/czekaj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/czekaj"/>
    <language>en</language>
    <item>
      <title>When your home network lies to you</title>
      <dc:creator>Lucas Czekaj</dc:creator>
      <pubDate>Fri, 11 Jul 2025 00:27:30 +0000</pubDate>
      <link>https://dev.to/czekaj/when-your-home-network-lies-to-you-28a6</link>
      <guid>https://dev.to/czekaj/when-your-home-network-lies-to-you-28a6</guid>
      <description>&lt;p&gt;&lt;em&gt;A deep-dive into troubleshooting an "impossible" network outage that wasn't my Mac's fault at all.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The Perfect Setup, The Impossible Problem
&lt;/h4&gt;

&lt;p&gt;I believe in building a robust home lab. When you’re a startup founder, stability isn't a luxury; it's a requirement. So when I upgraded my network to a prosumer-grade UniFi Cloud Gateway Ultra and a U7 Pro AP, I expected rock-solid performance for my workhorse: a beastly 64GB, M4 Pro Mac Mini.&lt;/p&gt;

&lt;p&gt;Instead, I got a nightmare.&lt;/p&gt;

&lt;p&gt;Once or twice a day, my Mac would be completely cut off from the network. The outage would last for about a minute, then spontaneously resolve. Pings to my gateway (&lt;code&gt;192.168.0.1&lt;/code&gt;) would time out. SSH sessions would drop. But the Wi-Fi icon was always off, as usual, and macOS reported the wired connection was active. For a founder who lives on video calls, this was unacceptable.&lt;/p&gt;

&lt;p&gt;Thus began a week-long odyssey to hunt down a ghost in my machine.&lt;/p&gt;

&lt;h4&gt;
  
  
  Act I: The Usual Suspects (and a Lot of Red Herrings)
&lt;/h4&gt;

&lt;p&gt;Every good troubleshooter starts with a list of suspects. Gemini 2.5 Pro, Claude 4 Opus, and I went through them all, and each one led to a dead end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The "It's a Software Bug" Theory:&lt;/strong&gt;&lt;br&gt;
My first thought was a software issue on the Mac. I was running OrbStack for my Supabase development environment and Tailscale for VPN. These tools hook deep into the network stack. Could they be the cause? We also saw a storm of &lt;code&gt;mdworker&lt;/code&gt; (Spotlight) activity in the &lt;code&gt;launchd&lt;/code&gt; logs, a classic source of system-wide slowdowns.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Verdict:&lt;/strong&gt; False. The issue persisted even after quitting both OrbStack and Tailscale. The &lt;code&gt;mdworker&lt;/code&gt; issue was a red herring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. The "It's a Hardware Problem" Theory:&lt;/strong&gt;&lt;br&gt;
Maybe it was a bad cable, a faulty port on my new UniFi gateway, or a dying NIC in the Mac Mini?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Verdict:&lt;/strong&gt; False. &lt;code&gt;netstat -i&lt;/code&gt; consistently showed &lt;strong&gt;zero&lt;/strong&gt; input or output errors (&lt;code&gt;Ierrs 0, Oerrs 0&lt;/code&gt;). The link was always active at 1Gbps with flow control. The hardware was solid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. The "It's a Network Protocol War" Theory (The Great BPDU Hunt):&lt;/strong&gt;&lt;br&gt;
This was our most promising lead for days. My Mac, by running OrbStack, was acting as a virtual switch. Virtual switches can sometimes send out &lt;strong&gt;BPDU (Bridge Protocol Data Unit)&lt;/strong&gt; packets, which are the language of the Spanning Tree Protocol (STP) that physical switches use to prevent network loops.&lt;/p&gt;

&lt;p&gt;Our theory was that my new UniFi gear was seeing these BPDUs, thinking a switch was misconfigured, and blocking the port as a safety measure. We went deep down this rabbit hole:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  We identified a small 4-port switch under my desk.&lt;/li&gt;
&lt;li&gt;  We found it had a physical "Loop Prevention" toggle, which was off.&lt;/li&gt;
&lt;li&gt;  We enabled it, turning the switch into a BPDU filter.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Verdict:&lt;/strong&gt; False. My credibility took a major hit here. A day later, the outage happened again. The BPDUs weren't the culprit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Act II: The Impossible Clue
&lt;/h4&gt;

&lt;p&gt;During one of the outages, I made a bizarre discovery. While I couldn't ping my local gateway, I could still load HackerNews. I clicked a link on the page to a random site, &lt;code&gt;offchess.com&lt;/code&gt;, and it loaded too.&lt;/p&gt;

&lt;p&gt;This should be impossible.&lt;/p&gt;

&lt;p&gt;Both of those sites resolve to IPs behind Cloudflare. I also use Cloudflare for my own DNS fallback (&lt;code&gt;1.1.1.1&lt;/code&gt;) and hosting. This meant my Mac was in a bizarre state: it was cut off from its own local network but had a live, working connection to a specific slice of the public internet.&lt;/p&gt;

&lt;p&gt;This clue stumped my AI assistants completely. The logs showed no VPNs were active. It wasn't Tailscale Funnel. It wasn't a routing issue. It defied all standard models.&lt;/p&gt;

&lt;h4&gt;
  
  
  Act III: The Grand "Aha!" Moment
&lt;/h4&gt;

&lt;p&gt;The real breakthrough came, as it often does, from finding a way to reliably reproduce the "intermittent" issue. I noticed that &lt;strong&gt;the network would drop every single time I plugged my iPhone into my Mac via USB, and again when I unplugged it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was the key. Claude finally had the trigger event it needed. Claude 4 Opus pointed out a critical detail in the logs I captured before and after an iPhone-triggered outage:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The MAC address for my gateway &lt;code&gt;192.168.0.1&lt;/code&gt; was changing.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Before (Working):&lt;/strong&gt; &lt;code&gt;? (192.168.0.1) at [MAC_ADDRESS_OF_GATEWAY]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;After (Outage):&lt;/strong&gt; &lt;code&gt;? (192.168.0.1) at [DIFFERENT_MAC_ADDRESS]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This wasn't a software conflict on my Mac. This was &lt;strong&gt;ARP Poisoning&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  The True Culprit: The Buggy Switch's Ghost
&lt;/h4&gt;

&lt;p&gt;The real villain was a cheap, 8-port TP-Link managed switch that my Proxmox server and the under-desk switch were plugged into. Here’s the perfect crime it was committing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;The Bug:&lt;/strong&gt; The switch has a firmware bug. When its DHCP client fails to get (or keep because of an internal bug) an IP lease from my UniFi gateway, it's programmed to fall back to a hardcoded default IP.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The Conflict:&lt;/strong&gt; That hardcoded IP is &lt;code&gt;192.168.0.1&lt;/code&gt;—the exact same address as my gateway.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The Poison:&lt;/strong&gt; The switch, now wrongly thinking it &lt;em&gt;is&lt;/em&gt; the gateway, starts responding to ARP requests for &lt;code&gt;192.168.0.1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The Heist:&lt;/strong&gt; When my Mac flushed its ARP cache (triggered by the iPhone connection), it would broadcast "Who has &lt;code&gt;192.168.0.1&lt;/code&gt;?" If the buggy switch's reply was the last one my Mac heard, it would incorrectly map the gateway's IP to the switch's MAC address.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The Outage:&lt;/strong&gt; All my internet-bound traffic was being sent to a switch port that didn't know how to route it, creating a black hole. My connection was dead. The outage ended whenever the ARP cache timed out and the Mac was lucky enough to get the &lt;em&gt;real&lt;/em&gt; gateway's reply first.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  The Fix: Taking Away the Keys
&lt;/h4&gt;

&lt;p&gt;After TP-Link themselves acknowledged the bug and released a firmware update that did nothing to fix it, I took matters into my own hands. I logged into the switch's admin panel and essentially killed its networking:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Disabled its DHCP client.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Assigned it a random, unused static IP address.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Set its default gateway to &lt;code&gt;0.0.0.0&lt;/code&gt;&lt;/strong&gt;, ensuring it could never phone home or talk to the wider network.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I put the switch in a configuration box where it could do nothing but its primary job: forward packets.&lt;/p&gt;

&lt;p&gt;The network has been stable ever since.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lessons Learned
&lt;/h4&gt;

&lt;p&gt;This journey was a brutal, humbling reminder of some core networking truths:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Don't Trust, Verify:&lt;/strong&gt; The network can, and will, lie to you. Just because a link is "active" with no errors doesn't mean it's working.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The Dumbest Device Can Be the Smartest Criminal:&lt;/strong&gt; The problem wasn't my high-end Mac or my pro-grade UniFi gear. It was the cheapest managed switch in the chain, with a single firmware bug.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Find the Trigger:&lt;/strong&gt; "Intermittent" problems are often just complex problems with a trigger you haven't found yet. The iPhone connection was the key that unlocked the entire mystery.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Sometimes You're Not Crazy:&lt;/strong&gt; If the symptoms seem to defy the laws of networking, it's possible a device on your network is breaking those laws. ARP poisoning, while rare in a home lab, is a real and devastating attack—even when it's unintentional.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So if your network is acting strange, start with the simple stuff. But never forget that sometimes, the problem is a ghost in the machine you'd least expect.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
