查看“︁Photonicat 2 多出口与故障切换”︁的源代码
←
Photonicat 2 多出口与故障切换
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{| class="wikitable" |- ! 适用 / Applies to | Photonicat 2, photonicatWrt 26.04.x + pcat-manager-web 2026-06 及以后版本 / Photonicat 2, photonicatWrt 26.04.x with pcat-manager-web builds from 2026-06 onward |} Photonicat 2 同时拥有'''有线 WAN、WiFi 中继(Smart WAN)和 4G/5G 蜂窝'''三类出口。本页解释它们如何排定优先级、断线时如何自动切换、仪表盘指示灯的含义,以及排障方法。 The photonicat 2 has three egress classes at once: '''wired WAN, WiFi relay (Smart WAN), and 4G/5G cellular'''. This page explains how they're prioritized, how failover works, what the dashboard indicators mean, and how to debug it. == 中文说明 == === 优先级:路由 metric 链 === 故障切换完全由'''路由 metric'''(数值越小优先级越高)决定——所有出口可以同时在线,流量始终走 metric 最小的可用出口: {| class="wikitable" ! 出口 !! 接口 !! metric !! 说明 |- | 有线宽带 || wan (eth0 / pppoe-wan) || '''1'''(IPv6 别名 wan_6 随主接口) || 最高优先级 |- | WiFi 中继 (Smart WAN) || wan_wifi / wan_wifi_v6 || '''5 / 6''' || 次优先 |- | 5G 蜂窝 || wwan_5g / wwan_5g_v6 || '''10 / 11''' || 兜底 |- | LTE 蜂窝 || wwan_lte / wwan_lte_v6 || '''12 / 13''' || 兜底(LTE 模组) |} * '''插上网线''' → 有线立即接管(metric 1 最小)。 * '''拔掉网线''' → 有线路由消失,流量自动落到 WiFi 中继;WiFi 也没有 → 蜂窝。全程无需人工干预。 * '''WiFi 连上了但没有互联网'''(如未登录的酒店门户):Smart WAN 的联网探测会把 wan_wifi 的 metric '''临时调到蜂窝之后'''——上网流量走蜂窝,WiFi 链路保持连接供你登录;探测恢复后自动还原。详见 [[Photonicat 2 Smart WAN 智能上网]]。 === 与 pcat-manager 的关系 === 固件自带的 pcat-manager 默认只跟踪有线 wan(eth0):有线一断,pcat-manager 的策略会自动开启蜂窝网络,'''跳过 WiFi 中继''',破坏上面的 metric 切换链。因此启用 Smart WAN 时,管理程序会自动把 pcat-manager 的规则切换为系统默认;关闭 Smart WAN 时自动还原。 === 仪表盘指示 === * 首页拓扑图'''只点亮当前真正承载流量的出口'''(而不是"接口在线")——有线/WiFi 中继/蜂窝一目了然。 * 同时显示 WiFi 信号强度与当前网络模式;多出口在线时 WAN 图标为组合图标。 * LAN 绿点只在存在可用出口时点亮。 === 排障 === <pre> ip route show default # IPv4 默认路由及 metric(可能有多条,走 metric 最小者) ip -6 route show default # IPv6 同理 ip route get 1.1.1.1 # 当前实际选择的出口 ifstatus wan_wifi | head # Smart WAN 接口状态 logread | grep -i wifi_wan # Smart WAN 巡检/切换日志 </pre> * 流量走了蜂窝但 WiFi 明明在线 → 查 <code>ip route show default</code>:若 wan_wifi 的 metric 被调高,说明门户探测判定该 WiFi 无法上网。 * 切换后个别应用卡住 → 长连接(VPN、SSH)绑定旧出口地址是正常现象,重连即可。 == English == === Priority: the route-metric chain === Failover is driven purely by '''route metrics''' (lower wins). All uplinks can be up simultaneously; traffic always takes the lowest-metric available route: {| class="wikitable" ! Egress !! Interface !! Metric !! Role |- | Wired broadband || wan (eth0 / pppoe-wan) || '''1''' (IPv6 alias wan_6 follows) || top priority |- | WiFi relay (Smart WAN) || wan_wifi / wan_wifi_v6 || '''5 / 6''' || second |- | 5G cellular || wwan_5g / wwan_5g_v6 || '''10 / 11''' || fallback |- | LTE cellular || wwan_lte / wwan_lte_v6 || '''12 / 13''' || fallback (LTE modems) |} * '''Plug in ethernet''' → wired takes over instantly (metric 1). * '''Unplug it''' → the wired route vanishes; traffic falls to WiFi relay, then to cellular if no saved WiFi is reachable. No manual action. * '''WiFi associated but no internet''' (e.g. an unauthenticated hotel portal): Smart WAN's connectivity probe '''temporarily demotes''' wan_wifi below cellular — internet traffic uses cellular while the WiFi stays associated for you to log in; the metric is restored on recovery. See [[Photonicat 2 Smart WAN 智能上网|Smart WAN]]. === Interaction with pcat-manager === Stock pcat-manager only tracks the wired wan (eth0): when it drops, pcat-manager policies would enable cellular network, '''skipping WiFi relay''' and defeating the metric chain. So while Smart WAN is enabled, the manager automatically switches pcat-manager rules to default routing rule and restores them when Smart WAN is turned off. === Dashboard indicators === * The topology lights '''only the egress actually carrying traffic''' (not merely "interface up") — wired / WiFi relay / cellular at a glance. * WiFi signal strength and the current network mode are shown; WAN icons composite when several uplinks are up. * The LAN green dot requires a live egress. === Debugging === <pre> ip route show default # IPv4 default routes and metrics (lowest wins) ip -6 route show default # same for IPv6 ip route get 1.1.1.1 # which egress is actually selected right now ifstatus wan_wifi | head # Smart WAN interface state logread | grep -i wifi_wan # Smart WAN reconcile/failover logs </pre> * Traffic on cellular while WiFi looks fine → check <code>ip route show default</code>: a raised wan_wifi metric means the portal probe judged that WiFi offline. * An app hangs right after failover → long-lived connections (VPN, SSH) pinned to the old egress address must reconnect; that's expected. [[Photonicat 2 Smart WAN 智能上网]] | [[Photonicat 4G/5G 家庭网络备份]] | [[Photoincat 2 IPv6 PPPoE]]
返回
Photonicat 2 多出口与故障切换
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息