<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Cgnat on Frank&#39;s Blog</title>
    <link>https://frankblogs.com/tags/cgnat/</link>
    <description>Recent content in Cgnat on Frank&#39;s Blog</description>
    <generator>Hugo -- 0.150.0</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 18 Sep 2025 19:57:57 +0800</lastBuildDate>
    <atom:link href="https://frankblogs.com/tags/cgnat/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The IPv6 Nightmare and the Double NAT Trap: My Quest for True Connectivity</title>
      <link>https://frankblogs.com/posts/article-1/</link>
      <pubDate>Thu, 18 Sep 2025 19:57:57 +0800</pubDate>
      <guid>https://frankblogs.com/posts/article-1/</guid>
      <description>My journey began with a simple problem: my ISP router wouldn&amp;#39;t give my devices public IPv6 addresses. Little did I know it would lead me down a rabbit hole of Prefix Delegation failures, Double NAT, and CGNAT.</description>
      <content:encoded><![CDATA[<p>It all started with a seemingly simple problem. My home network, centered around a Xiaomi AX6000 router running its stock firmware, was supposed to support IPv6. I had enabled it, and indeed, the router&rsquo;s WAN port proudly displayed a public IPv6 address. Yet, none of my devices – my computers, my phone, my game consoles – could get one. Accessing IPv6-only websites was impossible.</p>
<h2 id="diving-deep-into-ipv6-and-network-structure">Diving Deep into IPv6 and Network Structure</h2>
<p>After some initial head-scratching, research pointed towards a concept called <strong>Prefix Delegation (PD)</strong>. In simple terms, my ISP assigns a block (prefix) of IPv6 addresses to my router, and the router is then responsible for distributing individual addresses from that block to my devices. The symptom – WAN gets an address, LAN doesn&rsquo;t – strongly suggested PD was failing.</p>
<p>Why? The prime suspect became my <strong>ISP&rsquo;s modem (Optical Network Terminal or ONT)</strong>. Was it running in router mode instead of bridge mode? If the modem itself was acting as a router and didn&rsquo;t properly support delegating the prefix downstream, my AX6000 would never receive the necessary block.</p>
<p>I confirmed my network topology: ONT (in router mode) -&gt; Switch -&gt; Multiple Routers (including the AX6000). Unfortunately, due to other devices directly connected to the ONT via the switch, simply switching the ONT to bridge mode wasn&rsquo;t feasible without restructuring everything.</p>
<p>As a temporary workaround, I enabled <strong>NAT6</strong> on the AX6000. Success! My devices could now access IPv6 websites. However, I knew this wasn&rsquo;t <em>true</em> end-to-end IPv6. NAT6 essentially translates internal IPv6 addresses, similar to how traditional NAT works for IPv4. It solved the immediate browsing issue but didn&rsquo;t address the underlying PD failure and wouldn&rsquo;t help with services requiring direct public IPv6 reachability.</p>
<h2 id="enter-the-double-nat-monster">Enter the Double NAT Monster</h2>
<p>Around the same time, my Xbox started complaining: &ldquo;Double NAT detected.&rdquo; This made perfect sense. My network traffic was going through two layers of Network Address Translation: first at the AX6000, and then again at the ISP&rsquo;s ONT (which was also acting as a router). This configuration is notorious for causing issues with online gaming, peer-to-peer connections, and services requiring open ports.</p>
<p>We discussed potential mitigations like UPnP, manual port forwarding, and placing the AX6000 in the ONT&rsquo;s DMZ, but none felt like a clean solution.</p>
<h2 id="the-cgnat-revelation">The CGNAT Revelation</h2>
<p>The real blow came when investigating the Double NAT further. By comparing the WAN IP address shown on my ONT&rsquo;s status page with the public IP address reported by websites like &ldquo;whatismyip.com&rdquo;, I confirmed a dreaded reality: I was behind <strong>Carrier-Grade NAT (CGNAT)</strong>. My ISP wasn&rsquo;t assigning my ONT a unique, public IPv4 address. Instead, I was sharing one with potentially hundreds of other customers.</p>
<p>[<strong>Placeholder: Add a screenshot here showing the discrepancy between your ONT&rsquo;s WAN IP (likely a private 10.x or 100.x address) and your public IP, confirming CGNAT.</strong>]</p>
<p>This revelation made two things crystal clear:</p>
<ol>
<li>Solving the Xbox NAT issue reliably via IPv4 was going to be nearly impossible without resorting to complex (and often unreliable) tunneling solutions.</li>
<li>Getting <strong>native, public IPv6</strong> working correctly was no longer just desirable; it was <strong>essential</strong> for any kind of future-proof home networking or self-hosting.</li>
</ol>
<h2 id="back-to-the-ipv6-root-the-faulty-ont">Back to the IPv6 Root: The Faulty ONT</h2>
<p>With renewed focus, the investigation circled back to the ONT. I confirmed the ONT itself <em>was</em> receiving a <code>/64</code> or similar public IPv6 prefix starting with <code>240e:</code>. The problem was solely its inability to delegate this prefix downstream.</p>
<p>Analyzing the ONT&rsquo;s configuration page revealed a peculiar &ldquo;Port Binding&rdquo; setting. Initially, only LAN1 was bound for internet services.</p>
<p>I modified the settings to bind <em>all</em> LAN ports. Hope surged&hellip; but was quickly dashed. Even after ensuring all ports were bound, testing with the AX6000 and other routers on different ports yielded the same result: no PD, no LAN-side public IPv6.</p>
<p>The conclusion was unavoidable: the ONT&rsquo;s Prefix Delegation functionality was faulty, likely due to a hardware limitation or firmware bug. Relying on it was a dead end.</p>
<p>I needed a router powerful and flexible enough to potentially work around the ONT&rsquo;s limitations, or perhaps even replace its routing functions altogether. This led me to revisit an old piece of hardware sitting in my closet&hellip; a supposedly bricked Netgear R8000 running OpenWrt. Could it be resurrected?</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
