<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>镜花水月</name>
  </author>
  <generator uri="https://hexo.io/">Hexo</generator>
  <id>https://www.773747.xyz/</id>
  <link href="https://www.773747.xyz/" rel="alternate"/>
  <link href="https://www.773747.xyz/atom.xml" rel="self"/>
  <rights>All rights reserved 2026, 镜花水月</rights>
  <subtitle>欢迎访问镜花水月的小站</subtitle>
  <title>镜花水月</title>
  <updated>2026-07-02T10:00:00.000Z</updated>
  <entry>
    <author>
      <name>镜花水月</name>
    </author>
    <category term="Linux" scheme="https://www.773747.xyz/tags/Linux/"/>
    <category term="网络优化" scheme="https://www.773747.xyz/tags/%E7%BD%91%E7%BB%9C%E4%BC%98%E5%8C%96/"/>
    <category term="CachyOS" scheme="https://www.773747.xyz/tags/CachyOS/"/>
    <content>
      <![CDATA[<h1 id="CachyOS-开启-BBRv3-与-FQ"><a href="#CachyOS-开启-BBRv3-与-FQ" class="headerlink" title="CachyOS 开启 BBRv3 与 FQ"></a>CachyOS 开启 BBRv3 与 FQ</h1><p>BBRv3 是 Google 开发的 TCP 拥塞控制算法的最新版本，配合 FQ（Fair Queueing）队列调度，可以显著提升网络传输性能。</p><hr><h2 id="1-加载-BBRv3-模块"><a href="#1-加载-BBRv3-模块" class="headerlink" title="1. 加载 BBRv3 模块"></a>1. 加载 BBRv3 模块</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> modprobe tcp_bbr3</span><br></pre></td></tr></table></figure><hr><h2 id="2-开机自动加载模块"><a href="#2-开机自动加载模块" class="headerlink" title="2. 开机自动加载模块"></a>2. 开机自动加载模块</h2><p>创建配置文件：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> vim /etc/modules-load.d/bbr3.conf</span><br></pre></td></tr></table></figure><p>写入以下内容：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">tcp_bbr3</span><br></pre></td></tr></table></figure><hr><h2 id="3-配置-sysctl-参数"><a href="#3-配置-sysctl-参数" class="headerlink" title="3. 配置 sysctl 参数"></a>3. 配置 sysctl 参数</h2><p>创建网络优化配置：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> vim /etc/sysctl.d/99-network-tweaks.conf</span><br></pre></td></tr></table></figure><p>写入以下内容：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">net.core.default_qdisc=fq</span><br><span class="line">net.ipv4.tcp_congestion_control=bbr3</span><br></pre></td></tr></table></figure><hr><h2 id="4-立即生效"><a href="#4-立即生效" class="headerlink" title="4. 立即生效"></a>4. 立即生效</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> sysctl --system</span><br></pre></td></tr></table></figure><hr><h2 id="5-验证配置"><a href="#5-验证配置" class="headerlink" title="5. 验证配置"></a>5. 验证配置</h2><h3 id="检查拥塞控制算法"><a href="#检查拥塞控制算法" class="headerlink" title="检查拥塞控制算法"></a>检查拥塞控制算法</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sysctl net.ipv4.tcp_congestion_control</span><br></pre></td></tr></table></figure><p>应输出：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">net.ipv4.tcp_congestion_control = bbr3</span><br></pre></td></tr></table></figure><h3 id="检查队列调度"><a href="#检查队列调度" class="headerlink" title="检查队列调度"></a>检查队列调度</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sysctl net.core.default_qdisc</span><br></pre></td></tr></table></figure><p>应输出：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">net.core.default_qdisc = fq</span><br></pre></td></tr></table></figure><h3 id="检查模块是否已加载"><a href="#检查模块是否已加载" class="headerlink" title="检查模块是否已加载"></a>检查模块是否已加载</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">lsmod | grep bbr3</span><br></pre></td></tr></table></figure><p>应看到 <code>tcp_bbr3</code> 相关模块。</p>]]>
    </content>
    <id>https://www.773747.xyz/2026/07/02/cachyos-bbrv3-fq/</id>
    <link href="https://www.773747.xyz/2026/07/02/cachyos-bbrv3-fq/"/>
    <published>2026-07-02T10:00:00.000Z</published>
    <summary>CachyOS 开启 BBRv3 与 FQ 拥塞控制教程：加载 tcp_bbr3 模块、开机自动加载、配置 sysctl 网络优化参数，显著提升 TCP 传输性能。</summary>
    <title>CachyOS 开启 BBRv3 与 FQ</title>
    <updated>2026-07-02T10:00:00.000Z</updated>
  </entry>
  <entry>
    <author>
      <name>镜花水月</name>
    </author>
    <category term="IPV6" scheme="https://www.773747.xyz/tags/IPV6/"/>
    <category term="openwrt" scheme="https://www.773747.xyz/tags/openwrt/"/>
    <content>
      <![CDATA[<h1 id="OpenWrt-下-IPv6-配置"><a href="#OpenWrt-下-IPv6-配置" class="headerlink" title="OpenWrt 下 IPv6 配置"></a>OpenWrt 下 IPv6 配置</h1><h2 id="1-PPPoE-拨号接口设置"><a href="#1-PPPoE-拨号接口设置" class="headerlink" title="1. PPPoE 拨号接口设置"></a>1. PPPoE 拨号接口设置</h2><p>进入 OpenWrt 后台 <strong>「网络 → 接口」</strong>，编辑 <code>wan</code> 接口（通常为此名称），修改以下选项：</p><ul><li><strong>获取 IPv6 地址</strong>：<code>自动</code></li><li><strong>委托 IPv6 前缀</strong>：✅ 勾选</li></ul><p><code>wan</code> 口的 <strong>「DHCP 服务器 → IPv6 设置」</strong> 项：</p><ul><li>指定的主接口：❌ 不勾选</li><li>RA 服务：<code>禁用</code></li><li>DHCPv6 服务：<code>禁用</code></li><li>NDP 代理：<code>禁用</code></li></ul><blockquote><p>📌 <strong>说明</strong><br>保存并应用后，通常会多出一个名为 <code>wan_6</code> 的虚拟动态接口。因为大多数运营商通过 DHCPv6 下发地址，而我们之前选择了「自动」，OpenWrt 识别到后会自动新建一个客户端。若运营商支持，此时应能看到获取的前缀（PD）：</p></blockquote><p><img src="/2025/06/11/openwrt-pppoe-ipv6/pppoe_wan.png" alt="PPPoE WAN 接口状态"></p><blockquote><p>⚠️ <strong>注意</strong><br>如果只有 <code>fe80::</code> 开头的地址，说明尚未获取到 IPv6（该地址仅为自动生成的链路本地地址）。</p></blockquote><hr><h2 id="2-分配-IPv6-地址"><a href="#2-分配-IPv6-地址" class="headerlink" title="2. 分配 IPv6 地址"></a>2. 分配 IPv6 地址</h2><p>路由器获得一个网段后，需要为每个内网设备分配公网 IPv6 地址。<br>有两种方案（可单独使用，也可同时使用）：</p><ul><li><strong>SLAAC</strong>（无状态地址自动配置）</li><li><strong>DHCPv6</strong>（有状态）</li></ul><blockquote><p>本文仅介绍 <strong>SLAAC</strong> 方式。</p></blockquote><hr><h3 id="2-1-SLAAC-简介"><a href="#2-1-SLAAC-简介" class="headerlink" title="2.1 SLAAC 简介"></a>2.1 SLAAC 简介</h3><p>SLAAC 是无状态地址自动配置协议，无需专用的 DHCP 服务器维护状态，客户端自行生成、协商并通告地址。</p><p>✅ <strong>SLAAC 是唯一全平台支持的协议</strong><br>📄 <a href="https://issuetracker.google.com/issues/36949085?pli=1#comment374">Android 明确表示不支持有状态 DHCPv6</a><br>谷歌认为有状态协议对终端用户没有明显优点，还会带来隐私问题，属于 IPv4 时代的遗留习惯。</p><p>SLAAC 的核心是路由器定期发送 <strong>RA（路由通告）</strong>，其中包含前缀信息以及设备是否应尝试通过 DHCPv6 请求地址的标记。</p><hr><h3 id="2-2-配置纯-SLAAC"><a href="#2-2-配置纯-SLAAC" class="headerlink" title="2.2 配置纯 SLAAC"></a>2.2 配置纯 SLAAC</h3><p>进入 <strong>「LAN 口设置 → 高级设置」</strong>：</p><ul><li><strong>委托 IPv6 前缀</strong>：<code>自选</code>（决定下级设备能否获得前缀，不影响 IPv6 地址本身的分配。不懂可以勾选）</li><li><strong>IPv6 分配长度</strong>：<code>64</code> 或保持默认（启用委托前缀时，决定分配的前缀长度，划分多个子网时需要）</li><li><strong>IPv6 分配提示</strong>：保持默认（划分子网时可选项）</li><li><strong>IPv6 后缀</strong>：可填写 <code>::1</code>，则当前接口的 IPv6 地址类似 <code>240e:aaaa:bbbb:cccc::1</code></li></ul><h4 id="LAN-口的-DHCP-服务器-→-IPv6-设置"><a href="#LAN-口的-DHCP-服务器-→-IPv6-设置" class="headerlink" title="LAN 口的 DHCP 服务器 → IPv6 设置"></a>LAN 口的 DHCP 服务器 → IPv6 设置</h4><ul><li>指定的主接口：❌ 不勾选</li><li>RA 服务：<code>服务器模式</code></li><li>DHCPv6 服务：<code>禁用</code></li><li>本地 IPv6 DNS 服务器：✅ 勾选</li><li>NDP 代理：<code>禁用</code></li></ul><h4 id="IPv6-RA-设置"><a href="#IPv6-RA-设置" class="headerlink" title="IPv6 RA 设置"></a>IPv6 RA 设置</h4><ul><li>默认路由器：<code>自动</code></li><li>启用 SLAAC：✅ 勾选</li><li>RA 标记：<code>无</code>（因为我们根本没有 DHCPv6 服务器）</li></ul><hr><h3 id="2-3-验证结果"><a href="#2-3-验证结果" class="headerlink" title="2.3 验证结果"></a>2.3 验证结果</h3><p>保存并应用后，所有内网设备应都能生成公网 IPv6 地址。</p>]]>
    </content>
    <id>https://www.773747.xyz/2025/06/11/openwrt-pppoe-ipv6/</id>
    <link href="https://www.773747.xyz/2025/06/11/openwrt-pppoe-ipv6/"/>
    <published>2025-06-11T09:20:32.000Z</published>
    <summary>OpenWrt 配置 IPv6 完整教程：PPPoE 拨号接口设置、SLAAC 无状态地址自动配置、LAN 口 DHCP 服务器配置，让内网设备获取公网 IPv6 地址。</summary>
    <title>openwrt-PPPOE拨号配置IPV6</title>
    <updated>2025-06-11T09:20:32.000Z</updated>
  </entry>
</feed>
