进阶教程之 OpenWrt 常用运维操作指南

随着越加深入的日常使用,会遇到一些新问题需要解决,免不了进行运维操作,这里汇总介绍 OpenWrt 系统下的常用运维操作技巧,助你快速解决最常见的使用问题。

遵纪守法

虽然软件、网络等技术产物是虚拟的,但最终是作用于现实生活中,与大众的日常生活息息相关,所以必然要接受各种法律法规的管控,各类技术人员首先需要学习并牢记当地的法律法规,以免误入歧途,玩火自焚。

在中国工作和生活的技术人员请学习如下法律法规:
《中华人民共和国网络安全法》《计算机信息网络国际联网安全保护管理办法》《计算机软件保护条例》《中华人民共和国计算机信息系统安全保护条例》

友情提醒

请不要把桌面系统的使用习惯带入到路由器的使用中,路由器系统被设计用于长期开机运行,其担当的是网络基础设施的角色,正常情况下并不需要过多的人工维护,无需“清理内存”、“定时重启”等操作。

如果发现运行一段时间后,总是会出现各种异常情况,请排查下列可能的因素:
1、已运行的各类软件是否有配置错误。
2、已运行的软件是否有 Bug(软件缺陷)。
3、路由器硬件是否可能有故障。
4、路由器的硬件性能,是否无法满足当前的应用需求,例如 CPU 性能、RAM 容量等是否不够用。

常见网络故障

网络不稳定

表现为客户端网络延迟波动太大,丢包率很高,这时可以使用 ping 命令测试局域网的网关,观察长时间的 ping 命令延迟是否稳定,通过网线连接时, ping 局域网的网关延迟最多不应超过10ms(无线不应超过100ms),如果延迟波动异常,则需要登录网关管理界面,查看是否负载过高,有无其它异常。

如果测试客户端到局域网的网关,网络延迟正常,且不丢包,则说明网络不稳的因素在网络运营商或网络服务器。
先确认网络服务器是否稳定,最后再联系网络运营商报修网络问题。

拓扑检查:检查各种网线是否连接正确,是否有错误的连接导致局域网出现“网络回路”。
网线检查:检查网线是否过于老化,有无破损,网线水晶头是否老化,并进行相应的维护操作。
无线检查:检查周围无线信号情况,根据实际情况判断是否应当调整无线设置。
客户端检查:检查客户端相关软硬件是否可能存在故障,并进行对应的维护操作。

网络大范围异常

表现为大量网络服务不可用,基本处于断网状态。首先排查网关路由器开启了哪些软件功能,是否存在对网络有影响的功能或规则,检查相关软件设置是否正常,尝试关闭所有可能影响网络的功能或规则,如果网络仍然不正常,这时一般是网络运营商的问题,需要拨打客服电话报修处理。

出现这种大范围断网的故障,除了运营商地区线路故障或检修外,一般是运营商检测到你的网络流量异常,专门执行了封锁策略所致。

可能导致被网络运营商主动封锁的行为:PCDN 业务、非法网络服务。

PCDN 全称 P2P CDN,即 P2P 内容分发网络,现在常见的各种“闲置带宽赚钱”的项目,专业术语称为 PCDN 业务,通过在家庭网络上运行指定的设备或程序,靠上传流量赚取积分,然后用积分换取现金奖励。

PCDN 容易被运营商封锁的原因,本质上是因为运营 PCDN 业务的公司,利用广大的家庭宽带用户,为其谋取了商业利益,但却没有给当地的网络运营商分配利益。

PCDN 业务运行的原理,运行 PCDN 程序的家庭宽带等于一个 CDN 节点,通过运营 PCDN 项目的公司进行总控,然后向外售卖CDN 服务,再分配少部分收益给运行 CDN 节点的用户。实际上分配给用户的利益,谈不上赚钱,能保证不亏本已是万幸,成本包括:电费、宽带费、设备损耗、房屋租金等。

正规的 CDN 服务,通常是在各地的网络运营商机房,购买服务器来搭建 CDN 网络,需要给网络运营商支付高昂的费用。

非法网络服务,即有关部门规定的,不允许在家用宽带上运行的各种网络服务,例如:搭建网站、搭建各类网络服务器、各种“挖矿”服务等。

无线路由器出现大量 SMPS 系统日志

部分情况下会出现无线路由器的系统日志被淹没,连续不断的出现如下日志提示:
daemon.notice hostapd: phy1-ap0: STA-OPMODE-SMPS-MODE-CHANGED 00:00:00:00:00:00 off
daemon.notice hostapd: phy1-ap0: STA-OPMODE-SMPS-MODE-CHANGED 00:00:00:00:00:00 static

经验证,此日志与客户端无线网卡的 ”MIMO 节能模式“ 有关,通常更新客户端的操作系统或更新客户端的无线网卡驱动程序后,即可恢复正常,
如果仍然无法解决此问题,请手动修改客户端的无线网卡属性,在无线网卡的”属性“-”高级“选项卡中,找到 ”MIMO 节能模式“ ,
将其修改为 ”无 SMPS“ 或 ”动态 SMPS“。

SSH 与 SCP

OpenWrt 作为一款基于 Linux 的系统,同样在运维方面也支持常见的 SSH 与 SCP 管理方式,SSH 即远程命令行操作界面,SCP 则多用于配置文件管理。

SSH 登录

各类支持 SSH 登录的客户端均可用于管理 OpenWrt,这里推荐一款常用的 Windows 软件 putty

当然 OpenWrt 上也可以安装另一款软件,直接通过网页界面进行 SSH 管理。luci-i18n-ttyd-zh-cn

命令行方式管理 UCI 配置文件参数

OpenWrt 中很多启动脚本需要读取 /etc/config 目录下的 UCI 配置文件参数,有时可能界面不完善,或者网页界面不可访问,则可以通过默认的 UCI 命令进行管理。(也可以上传配置文件覆盖,或者通过 vi 命令进行编辑。)

示例一:不小心去掉了 uhttpd 的启用选项,导致网页界面无法访问,则可以通过命令行方式修改 uhttpd 的 UCI 配置文件参数。

# 设置 UCI 配置文件 uhttpd 中的 main 节点下的 enabled 参数为 1
uci set uhttpd.main.enabled=1

# 提交配置文件,即保存文件。
uci commit uhttpd

# 重载 uhttpd 启动脚本,以重新读取 UCI 配置文件中的参数。
service uhttpd restart

示例二:为没有网页界面的 OpenWrt 配置 LAN 口和 WAN 口参数。

# 修改 LAN 口 IP 地址。
uci set network.lan.ipaddr=192.168.11.1

# 提交配置文件,即保存文件。
uci commit network

# 重载 network 启动脚本,以重新读取 UCI 配置文件中的参数。
service network restart

-------------------------------------------------------------------------------------

# 修改 WAN 口协议为 PPPoE
uci set network.wan.proto=pppoe

# 设置拨号账号。
uci set network.wan.username=12345678

# 设置拨号密码。
uci set network.wan.password=1111

# 设置自动获取 IPv6
uci set network.wan.ipv6=auto

# 提交配置文件,即保存文件。
uci commit network

# 重载 network 启动脚本,以重新读取 UCI 配置文件中的参数。
service network restart

更多 UCI 命令说明请访问 OpenWrt 官方文档:https://openwrt.org/docs/guide-user/base-system/uci

SSH 远程登录

系统默认的 SSH 配置仅允许局域网设备登录,如果你想远程登录 SSH,则需要做如下更改。

注意:如果你开放了远程 SSH 登录,请做好必要的安全防护,以免遭受网络攻击。

SSH 密钥登陆

为提高安全性,可以禁用密码方式的 SSH 登录,转为使用 SSH 密钥登录。

OpenWrt 默认使用的是 Dropbear 作为 SSH 服务器,支持各种常见的密钥类型,可使用已有的密钥文件,或重新生成。

如果要重新生成密钥,需要先安装软件包:openssh-keygen

1、SSH 登录路由器,执行命令(默认为 RSA 密钥):ssh-keygen
按步骤操作完毕后,密钥文件存放在 /root 目录下。

提示:推荐使用更安全的 DSA 密钥,命令:ssh-keygen -t dsa

可选操作:如果想对私钥文件进行密码保护,则按需输入密码即可。
设置了密码保护的私钥,在使用时需要输入这个密码才能连接服务器。

2、下载生成的密钥对文件备用。

3、将后缀名为 .pub 的公钥文件拖放到“系统”-“管理权”-“SSH 密钥”选项卡即可。

后缀名为 .key 的文件是私钥文件,用于各类 SSH 客户端登录服务器时进行验证。

4、然后修改 SSH 访问参数,取消勾选“密码验证”选项,以禁止密码登录 SSH。

备注:Dropbear 的密钥配置文件存放路径:/etc/dropbear/authorized_keys

也可按需安装软件包 openssh-server 替换默认的 Dropbear,
操作步骤为先将 Dropbear 的端口号修改为其它端口,再安装 openssh-server 并启动,然后再按需配置 openssh-server 的配置文件即可,openssh-server 配置用法和 Linux 系统相同。

SCP 文件管理

日常运维中时常需要进行各类系统文件管理,这时就可以用到系统自带的 SCP 服务,在 Windows 端推荐使用 WinSCP

它的界面与传统的 FTP 之类的文件管理器一样,可以很直观的进行文件管理操作,SCP 与普通文件管理器的区别在于,它可以直接修改文件的权限,这对于 Linux 类系统是非常方便的。

注意:SCP 仅用于进行简单的文件管理,不可作为常规的文件管理器,传输大文件会出错,且传输速率低。

如果你仅仅只需要进行简单的上传、重命名、删除等操作,可以直接使用系统集成的网页版文件管理器,在“系统”-“文件助手”

DHCP 管理

自动按顺序分配 IP

OpenWrt 使用 Dnsmasq 来提供 DHCP 服务,默认分配 IP 地址并不是像传统路由器那样按顺序分配,而是根据客户端 MAC 地址的哈希值来为客户端分配 IP 地址,虽然并没有按照数字顺序分配,但实际上每次分配到的 IP 都是一样的,在没有人为干涉的情况下,通常客户端 IP 地址将长期保持不变。

如果你希望 OpenWrt 按照传统路由器那样,按数字顺序分配 IP 地址,则启用“网络”-“DHCP/DNS”-“高级设置”中的“顺序分配 IP”选项即可。

静态租约

默认情况下,DHCP 服务会随机为局域网设备分配 IP,有时需要为局域网设备按指定要求配置固定的 IP 地址,这时就需要用到 DHCP 服务中的“静态租约”功能,以便通过路由器进行固定的 IP 分配,在“网络”-“DHCP/DNS”-“静态地址分配”中按需配置即可。

通告不同的 DNS

默认情况下,路由器通过 DHCP 为局域网设备分配 IP 时,通常会将自己的 IP 作为 DNS 服务器地址,如果你需要局域网设备直接使用其它的 DNS 地址,则可以使用 DHCP 服务下发其它 DNS 地址。在“网络”-“接口”-“LAN”-“DHCP 服务器”-“高级设置”中按需配置即可。

默认情况下,路由器通告自己为 DNS 服务器。

例如,想让局域网设备直接访问 DNS 服务器 119.29.29.29 和 223.5.5.5,则按下图配置即可。

然后局域网设备重新连接网络就可以自动获得新的 DNS 地址信息。

旁路网关模式(旁路由)

需求一:有时可能需要在局域网内部署多台路由器,分别安装不同的软件或防火墙规则,但同一个局域网内只允许有一个网关,其它路由器上的软件却必须在网关模式下才能有效,但是不想使用二级路由模式。

需求二:局域网内原本的网关路由(主路由)不能更换,需要增加路由器接入同一个局域网中,然后让部分上网设备通过这个新增的路由器上网。

这类需求可以通过 DHCP 服务来实现旁路网关模式,指的是将新增路由器作为普通的上网客户端接入局域网中,然后通过 DHCP 服务自动给上网设备按需分配不同的网关,以实现让部分上网设备使用旁路网关联网的目的。

注意:此方法只适用于使用 Dnsmasq 作为 DHCP 服务器的局域网,提供 DHCP 服务的路由器可以是主路由,也可以是旁路由。也可以直接手动配置上网客户端的 IP 参数来使用旁路由。

以 OpenWrt 路由器为例:
1、首先需要修改 LAN 口配置,设定一个局域网 IP ,并补齐网关地址和 DNS 地址。

提示:也可以直接将 lan 口协议修改为 DHCP,就像普通局域网客户端一样,由网关的 DHCP 服务进行管理。


2、如果由主路由提供 DHCP 服务,则应当关闭旁路由的 DHCP 服务。
注意:作为旁路网关使用时,不可完全停用 Dnsmasq,应勾选 LAN 接口-“DHCP 服务器”-“常规设置”-“忽略此接口”选项。

3、禁用 LAN 接口的 IPv6 服务,以避免局域网设备获得多个临时 IPv6 地址,详情参阅: okaa.io/index.php/2023/11/04/进阶教程之-openwrt-常用网络配置指南/

4、将旁路由接入局域网。(连接 LAN 口,然后重启一次旁路由。)


提示:“旁路网关”并不是什么特别深奥的功能,其本质上就是一台普通的上网设备,局域网其他设备通过“旁路网关”来上网而已,等同于一台局域网代理上网服务器,因功能上具备一些路由器特性,也被有些网友称为“旁路由”。

提示:如果主路由的网关 IP 与旁路由系统的默认 LAN 口 IP 一样,例如使用 OpenWrt-Life 固件,默认 LAN 口 IP 为 192.168.9.1,这种情况下直接在 “IPv4 网关” 输入 192.168.9.1 会提示错误,此时应当先修改 “IPv4 地址”(保存并应用),然后再补齐网关和 DNS 地址即可。

5、登录负责局域网 DHCP 服务的路由器,打开 “网络”-“DHCP/DNS”-“编辑配置”,按需配置 Dnsmasq 的参数即可,确认配置无误后,点击“保存并应用”按钮后即可生效。

如果局域网内的 DHCP 服务器不是 Dnsmasq,则可直接手动配置客户端 IP 来使用旁路网关上网。

通过 DHCP 服务自动分配不同的网关示例效果:

Dnsmaq 常用的附加选项

1设置子网掩码选项。
3设置网关地址选项。
6设置 DNS 服务器地址选项。
12设置域名选项。
15设置域名后缀选项。
33设置静态路由选项。该选项中包含一组有分类静态路由(即目的地址的掩码固定为自然掩码,不能划分子网),客户端收到该选项后,将在路由表中添加这些静态路由。如果存在 Option 121,则忽略该选项。
44设置 NetBios 服务器选项。
46设置 NetBios 节点类型选项。
50设置请求 IP 选项。
51设置 IP 地址租约时间选项。
52设置 Option 附加选项。
53设置 DHCP 消息类型。
54设置服务器标识。
55设置请求参数列表选项。客户端利用该选项指明需要从服务器获取哪些网络配置参数。该选项内容为客户端请求的参数对应的选项值。
58设置续约 T1 时间,一般是租期时间的 50%。
59设置续约 T2 时间。一般是租期时间的87.5%。
60设置厂商分类信息选项,用于标识 DHCP 客户端的类型和配置。
61设置客户端标识选项。
66设置 TFTP 服务器名选项,用来指定为客户端分配的 TFTP 服务器的域名。
67设置启动文件名选项,用来指定为客户端分配的启动文件名。
77设置用户类型标识。
121设置无分类路由选项。该选项中包含一组无分类静态路由(即目的地址的掩码为任意值,可以通过掩码来划分子网),客户端收到该选项后,将在路由表中添加这些静态路由。
148EasyDeploy 中 Commander 的 IP 地址。
149SFTP 和 FTPS 服务器的 IP 地址。
150设置 TFTP 服务器地址选项,指定为客户端分配的 TFTP 服务器的地址。

为旁路网关启用 SNAT

上面的旁路网关示例是基于 OpenWrt-Life 固件实现的,如果当前网络中的主网关(主路由)是其它系统,导致客户端使用旁路网关时无法正常上网,或者你觉得某些应用未达到预期效果,那么此时可以通过配置旁路网关的防火墙,启用防火墙的 SNAT 功能,以便旁路网关彻底代理客户端的所有流量。

打开 “网络”-“防火墙”-“NAT 规则”,参照如下示例添加所需规则。

局域网 IP 地址扩容

默认情况下局域网可用 IP 为 254 个,大多数情况下完全够用。
例如:192.168.9.1-192.168.9.254,注意:0 和 255 IP不能使用,0 代表这个网段,255 则是这个网段的默认广播地址。

有时默认的局域网 IP 地址数量会变得不够用,例如饭店、商场等人员密集场所,这时就需要扩容局域网 IP 地址数量。

根据实际需求,修改 LAN 口参数,配置合适的 “IPv4 地址” 和 “IPv4 子网掩码” 即可,主要依靠子网掩码来划分 IP 范围。

例如子网掩码:255.255.248.0(表示可用 IP 地址数量为 2046个)
以此为例,起始 IP 从 192.168.0.1 开始,至 192.168.7.254 结束,
可用 IP 地址范围: 192.168.0.1-192.168.0.255,192.168.1.0-192.168.1.255……192.168.7.0-192.168.7.254

注意:如果你要手动为客户端配置 IP,第一个 0 和最后一个 255 IP 地址是不能给上网设备用的。

注意:仅仅扩容 IP 地址数量是不够的,主路由需要更强的 CPU 和更大的 RAM 容量,建议配备高性能软路由,以此支持大规模上网设备。

如需更详细的 IP 计算辅助,推荐 “IP 计算器”:https://ipjisuanqi.com/

OpenWrt VLAN 配置说明

有时会需要为路由器配置 VLAN 接口,用于满足各类复杂的网络应用需求,尤其是在企业网络环境中,下面介绍在 OpenWrt 系统上的基础 VLAN 配置说明,以便运维人员快速上手。

以下图为例,演示相关 VLAN 配置参数填写规范。

VLAN 配置示例说明

LAN1 端口:用于 VLAN 1,作为 OpenWrt 路由器自身的局域网。

LAN2 端口:用于 VLAN 10,将外部的 VLAN10 网络接入 OpenWrt 路由器,且与自身的局域网互通。

LAN3 与 LAN4 端口:用于 VLAN20、21、22,将外部的 VLAN20 网络接入 OpenWrt 路由器,LAN3 端口也可连接二层交换机或电脑等,使得电脑和 OpenWrt 路由器均能接入 VLAN20 网络,而 VLAN 21、22只属于借道通过,不接入 OpenWrt 路由器。

VLAN 配置项说明:

未标记的出口:表示允许具有此 VLAN ID 号的数据包通过,但出站时移除 VLAN ID 号标记,同一个物理端口只允许一个 VLAN ID 号使用“未标记”,在各类企业路由系统中称之为 “Access 端口”,一般用于连接计算机等设备。

已标记的出口:表示允许具有此 VLAN ID 号的数据包通过,出站时仍然打上 VLAN ID 号标记,对端需要具备同样 VLAN ID 号的端口才能收到此数据包,在各类企业路由系统中称之为 “隧道接口”、“trunk 端口”。

不参与:表示此 VLAN ID 号的数据包不通过此端口,等同于禁用端口。

注意:VLAN ID 号如果使用 0 ,则表示不启用 VLAN 功能,常见于 VLAN 交换机上的默认值。
VLAN ID 编号可用范围:1-4094,特殊 VLAN ID 编号 4095 表示允许与所有 VLAN 通信。

DSA 交换机配置

21.02 版 OpenWrt 固件,大多数机型已使用 DSA 交换机驱动,打开“网络”-“接口”-“设备”选项卡来配置,配置选项与旧版界面基本一样,只是多了一个“主 VLAN ID”选项。

可使用默认的 br-lan 来配置 VLAN 接口,也可按需将网口从 br-lan 中剥离,再新建一个设备名称,然后再按需配置 VLAN 接口。

打开 “网桥 VLAN 过滤” 选项卡,按需配置,此处按照上面的 VLAN 示例图进行配置,配置完毕后点击保存。

注意:配置完 VLAN 接口后不要立即点击“保存并应用”按钮,应先修改局域网 LAN 口的设备并保存,确认无误后再点击“保存并应用”按钮以使修改生效,否则会导致 LAN 口失效。

在接口界面,可按需添加接口,绑定所需的 VLAN 接口,以使 OpenWrt 路由器接入对应的 VLAN 网络,防火墙区域可自行按需调整。

旧版交换机配置

21.02 版 OpenWrt 固件, 部分机型未适配 DSA 交换机驱动,这些机型使用旧版的交换机界面,参照如下示例配置。

打开“网络”-“交换机”界面,按需调整配置,默认的 VLAN 1 用于路由器自身的局域网,一般不用改动。

注意:使用旧版交换机界面的机型,LAN 口无需修改设备。

WAN 口 VLAN 配置(单口复用)

有时需要为 WAN 口配置多个 VLAN,例如家庭用户光猫单线复用实现上网与 IPTV 电视盒子共用,
WAN 口一般都是单端口,无法启用 “网桥 VLAN 过滤”,此时需要通过 “添加设备配置” 的方式来绑定 VLAN 端口。

NAT 转发加速

OpenWrt 系统默认情况下对上网数据包使用的是普通转发模式,即发往外网的数据包全部由 CPU 处理,一般路由器 CPU 性能较弱,可能无法跑满千兆带宽的速率,这时可以尝试启用 “NAT 转发加速” 功能,使用特定的转发加速机制来提升上网数据包转发效率,使得可以跑满带宽,并有效降低 CPU 负载。

打开 “网络”-“防火墙”-“路由/NAT 分载”,按需启用即可。

“软件流量分载” 是通用选项,任何机型都可以尝试启用。
“硬件流量分载” 只有部分机型有效,需要相关硬件支持。

注意:此功能可能会与部分软件不兼容,导致网络出现异常情况,请自行判断是否应该启用。

多核处理器还可以尝试启用 “网络”-“接口”-“全局网络选项”-“数据包引导” 功能,可能有助于进一步提高网络速度,也可能会起反作用,请自行判断是否应该启用。

命令行方式软件管理

首先你需要了解 OpenWrt 的软件包属性,OpenWrt软件安装文件后缀名为 “ipk” ,其本质上属于一个压缩包文件,里面包含可执行文件,安装脚本等信息,执行安装过程时,由系统内的 opkg 软件包管理系统,解析 ipk 安装包内的脚本信息,并执行相应的操作,最终完成安装。

OpenWrt 属于一款模块化的精简版 Linux 系统,所以它的软件包往往并不能单独使用,安装一个软件可能还需要安装其它的软件包(依赖)才能正常使用,类似于 Windows 上安装一些软件,还需要额外安装 C++、Directx 之类,好在软件列表内一般已经写好了依赖关系,安装一个 ipk 即可自动把需要的其它 ipk 连带着一起安装上,当然需要处于联网状态下才行。

注意:因为 OpenWrt 属于开源系统,不同的人编译的 ipk 文件,很可能其附带的依赖关系是不一样的。

除了可以使用界面管理软件,还可以直接使用命令行操作,下面就介绍最常用的命令行方式进行软件管理。

普通安装

OpenWrt 系统安装软件分为两步,第一步需要先更新软件列表,将包含软件包信息的索引文件下载到本地,这样才能执行后续的安装软件命令,建议每次安装之前都更新一次软件列表,以便获取最新的软件包索引。

# 更新软件包索引文件
opkg update

第二步执行安装软件命令,例如安装带中文界面的 samba4(以 OpenWrt-Life 固件为例)

opkg install luci-app-samba4

批量安装软件

想要一条命令就安装多个软件,例如安装建站三件套 mariadb、php8、nginx(以 OpenWrt-Life 固件为例)

opkg update
opkg install luci-app-mariadb luci-app-php8 luci-app-nginx

手动上传并安装

例如从其它途径下载了 ipk 安装包文件,首先需要将 ipk 文件上传到系统目录,一般推荐 tmp 目录,重启就自动清空。

cd /tmp
opkg install *.ipk

注意:如果你上传了多个 ipk 文件,且这些 ipk 文件需要按照顺序安装,则不要使用上述命令,应明确输入对应的文件名分别安装。

强制安装

例如你从网络下载了某个 ipk 安装包文件,但是它附带的依赖关系与你使用的 OpenWrt 系统不符,使用正常的安装命令则提示安装失败,但你确信此软件肯定能在当前系统正常运行,那么可以使用强制安装命令将其装入系统。

# 忽略依赖项失败,强制安装。
opkg install test.ipk --force-depends

# 不安装任何依赖包,只安装这个 ipk 文件。
opkg install test.ipk --nodeps

卸载软件

有安装就有卸载,OpenWrt 卸载软件也很简单,当然卸载时仍然会根据 ipk 文件的依赖关系进行处理,默认规则为卸载一个软件,相关联的软件也会被连带着卸载掉,如果其它关联的软件刚好被另外一个软件使用着,则不会被卸载。

opkg remove luci-app-samba4

启动脚本管理

有些软件的启动脚本可能不太规范,无法与界面配合,或暂时没有专用界面,则可以通过系统菜单来管理软件的启动脚本,例如停止、重启软件,或禁止开机自启动等,前往“系统”-“启动项”界面进行操作即可。

恢复出厂

路由器一般都有 Rest 按钮,在路由器已正常开机的状态下,按住 Rest 按钮10秒左右再松开,即可自动恢复出厂设置, 如果设备没有 Rest 按钮,也可以使用命令方式执行恢复出厂。

# 执行恢复出厂命令,会提示是否确认执行。
firstboot

# 重启系统
reboot

高级访客网络(子网隔离)

有时可能需要在同一个路由器上部署多个局域网段,用于进行子网隔离,以避免网络应用的互相干扰,或为了提高网络安全性。

以无线路由器创建访客网络为例,比如想让访客网络与原有的局域网进行彻底隔离,防止访客用户连接到原本的局域网。

第一步

修改无线网络接口配置,创建一个新的网络接口,例如:为无线网络分配新接口 wifi

仅勾选新建的接口,然后点击保存、保存并应用以使修改生效。(提示:输入字符后按回车键即可键入新网络名称。)

第二步

打开“网络”-“接口”,为新建的 wifi 接口按需配置其它参数。

  • 常规设置:将接口协议改为静态地址,为其分配一个新的局域网段 IP,并按需配置子网掩码。
  • 防火墙设置:新建一个防火墙区域名称。
  • DHCP 服务器:打开 DHCP 服务器。

然后点击保存并应用,以使修改生效。

第三步

打开“网络”-“防火墙”,为新建的防火墙区域配置规则。

  • 入站数据:改为拒绝,禁止此区域的接口访问网关(路由器)。
  • 转发:改为接受,即允许上网。(允许转发数据到其它防火墙区域)
  • 允许转发到目标区域:勾选 WAN 口,即允许上网。

然后点击保存并应用,以使修改生效。

第四步

打开“网络”-“防火墙”-“通信规则”,添加规则以放行 DNS 查询入站,否则新防火墙区域下的接口将无法上网。

添加规则以放行 DHCP 请求入站,否则客户端将无法自动获取 IP 地址。

至此已全部配置完毕,新建的访客网络已可以上网,与原局域网彻底隔离,且无法访问路由器,安全性得到极大的提升。

正确配置无线信道/无线频宽

对于无线路由器,主要依靠无线电信号进行工作,无线电频率属于公共物理资源,同一个区域内存在多个无线电信号时,必然会产生信号干扰,从而影响无线网络使用体验。因此有必要了解无线网络的工作频率,以进行正确的配置,尽量避免信号干扰导致的负面影响。

信道编号只是为了方便人们记忆用的代号,实际对应的是无线电频率,根据 802.11 标准将用于无线网络的无线电频率进行了划分。
信道只是一个标记值,无线路由器会根据选择的频宽,自动绑定所需的无线频率范围。

详情参见:https://en.wikipedia.org/wiki/List_of_WLAN_channels

2.4G 无线频率

信道频宽
1 (2412MHz)
2 (2417MHz)
3 (2422MHz)
4 (2427MHz)
5 (2432MHz)
6 (2437MHz)
7 (2442MHz)
8 (2447MHz)
9 (2452MHz)
10 (2457MHz)
11 (2462MHz)
12 (2467MHz)
13 (2472MHz)
14 (2484MHz)
20MHz
40MHz

2.4G 无线频率规范下,一个信道代表了 5MHz 的频宽,无线路由器配置中一般可选频宽为 20MHz 或 40MHz

选择 20MHz 频宽时,共需要占用 5个连续的信道,因为 2.4G 无线需要额外占用 2MHz 用于保护频带,
因此实际互不干扰的无线信道只有 1、6、11

当选择 40MHz 频宽时,共需要占用 9个连续的信道,因此必然会与其它无线信号重叠,互相干扰无法避免,只有在周围没有其它无线信号时,启用 40MHz 频宽才能发挥最佳效果。

5G 无线频率

信道频宽
36 (5180MHz)
40 (5200MHz)
44 (5220MHz)
48 (5240MHz)
52 (5260MHz)
56 (5280MHz)
60 (5300MHz)
64 (5320MHz)
149 (5745MHz)
153 (5765MHz)
157 (5785MHz)
161 (5805MHz)
165 (5825MHz)
20MHz
40MHz
80MHz
160MHz

5G 无线频率规范下,一个信道代表了 20MHz 的频宽,无线路由器配置中一般可选频宽为 20MHz、40MHz、80MHz、160MHz

选择 20MHz 频宽时,则只需占用一个信道,即同一区域内,无线信道不同就不会产生干扰。

选择 40MHz 频宽时,共需要占用 2个连续的信道。

选择 80MHz 频宽时,共需要占用 4个连续的信道。

选择 160MHz 频宽时,共需要占用 8个连续的信道,即只能选择 36-64,如果选择 149以上信道,会因为无法满足信道需求而导致无线网络无法工作。不同国家的无线电法规不同,实际可用信道与无线路由器中的国家参数有关。

注意:有些无线路由器会使用特殊的 160MHz 频宽,本质上是 80MHz + 80MHz 频宽组合而成,因此实际速率并不能与真正的 160MHz 频宽相同。

计划任务配置指南

打开“系统”-“计划任务”按需配置即可,使用标准的 crontab 参数规则,为方便理解请查看下方表格。

# 注意:本示例仅作为演示计划任务的用法,一般不建议使用定时重启。
# 路由系统被设计为长期开机使用,除非系统或软件不稳定,否则无需使用定时重启。

# 示例:每周一的 5点整执行系统重启命令。

0 5 * * 1 sleep 60 && touch /etc/banner && reboot
20231110-11
分钟小时星期描述
0-590-231-311-120-6参数范围。
*/10****每隔10分钟。
**/1***每隔1小时。
***/3**每隔3日。
30*/1***每隔1小时30分钟。
301***每天1点30分。
0015**每月15号的0点。
30225,12,25**每月5号、12号、25号的22点30分。
01411,6,12*在1月、6月、12月的1号14点整。
021**1-5每周一至周五的21点整。
08**0,6每周六和周日的8点整。

所有评论(6)

  1. cynthiabit911说道:

    This message is used to verify that this feed (feedId:71876279048465408) belongs to me (userId:71876206902708224). Join me in enjoying the next generation information browser https://follow.is.

  2. 说道:

    感谢 帮助到我操作了

  3. The identical is true for hanging weights, as
    the steadiness demands will require you to lower the weight.
    The above is true for shut grip incline and decline presses
    as well. In abstract, the first movers work in collaboration with
    the stabilizers to supply maximum force and well-coordinated motion. In phrases of the best
    power and hypertrophy growth, it is your primary movers that will obtain the best effect.
    Nevertheless, together, there’s a substantial effect on general
    higher physique power. Now, there are additionally some notable benefits
    of dumbbell bench press. With dumbbells, you merely can’t go as heavy because you have to convey them off the ground and into position.
    These three form cues will allow you to to carry extra weight,
    develop a stronger bench press, and construct bigger pectorals utilizing your dumbbells.

    Drive your toes into the ground for the whole length of
    the dumbbell press. This provides the overwhelming majority of the steadiness required to bench
    press heavy dumbbells. I even have a question in regards to the
    flat bench press vs a bench press with dumbells.
    The stability ball bench press increases core and rotator
    cuff activation. You’ll want to focus on keeping both the weights and your physique stable.
    Maintain one weight down on your chest and press the opposite
    weight as much as arms’ size.
    If the angle is greater than 45-degrees, the dumbbells will hit too excessive on their chest.

    If the angle is less than 45-degrees, the dumbbells will
    hit too long on their chest. When an athlete
    is getting prepared to perform a dumbbell bench
    press, they should know their grip power and points of contact.
    This train can become dangerous if the dumbbells are too heavy and surpass their grip
    energy.
    To carry out this train accurately, start by lying flat on a bench,
    toes planted on the ground for stability. Hold
    a dumbbell in each hand at chest stage together with your
    arms bent. Push the weights upward in a controlled movement till your arms are
    fully extended, then slowly decrease them back
    to the beginning place. When engaging within the flat dumbbell bench press, several muscles are known as into action. The pectoralis major is the first muscle worked, with the clavicular head being extra lively than in a standard bench press because of the angle of the press.

    The deltoids and triceps brachii play secondary roles,
    aiding with the press and lockout at the prime of the movement.
    Additionally, the core muscle tissue, including the rectus
    abdominis and obliques, are engaged to stabilize the
    physique all through the train.
    As with any train, altering the incline is a helpful method
    to swap up your coaching each few weeks and
    hit your muscular tissues in new challenging methods.
    Heavy lifting is ideal for building muscle, gaining energy,
    and enhancing your dumbbell bench press. You can even do dumbbell squeeze presses, alternating dumbbell bench presses, and single-arm dumbbell bench presses using a stability
    ball. To get essentially the most from this (or any other) exercise,
    you must do it properly. Doing the dumbbell bench press with incorrect type will
    make it less effective and will enhance your danger of injury.
    If you’re a true beginner, you then actually just want to
    stick to at least one bench press variation, and we might advocate
    that to be the flat barbell (or dumbbell) bench press.

    The Flat Dumbbell Bench Press is a elementary weightlifting train that targets the major muscular tissues of the higher body.
    Renowned for its effectiveness, this exercise is a staple in power and conditioning packages.
    The major focus of the flat dumbbell bench press is to engage the pectoral muscular
    tissues, but it additionally works the shoulders, triceps,
    and stabilizes the core. The versatility of the dumbbells permits for a pure vary of
    motion, making it an excellent alternative to the barbell bench press for those seeking to reinforce muscular steadiness and forestall
    harm.
    Progressively enhance the load you lift with dumbbells and
    incorporate bench press coaching with correct method
    to construct up your energy over time. Adjust the bench to a slight incline to focus
    on upper pecs with dumbbells. Doing a chest press on a flat bench positioned at 0-degrees targets the center of your pecs.

    With that mentioned, you’re usually stronger on the flat
    bench press than on an incline bench press. Not to mention,
    a flat bench press is one of the three workouts which may be utilized
    in numerous competitions, similar to powerlifting and strongman, to assess maximum energy.
    The main difference between a flat bench press and an incline bench
    press is that the incline bench press targets
    the upper chest and entrance deltoid to a greater extent.
    The flat bench press targets the upper, middle, and lower chest more evenly,
    making it better for overall chest development. The dumbbell press permits for
    a flexible approach, concentrating on stabilizer muscle
    tissue, providing unilateral training, and selling muscle symmetry.

    Add it to your routine, concentrate on development,
    and watch your strength and physique remodel over time.
    Dumbbells chest press and barbell bench press are two several types of exercises however most all the time
    you shall be able to raise extra on barbell bench
    press. This is as a outcome of you do not have two stabilize two totally
    different weights your body is working together to stabilize one weight which equals more stability and more behind the push.

    If your wrists bend back, grip the bar slightly lower
    in your palm. I can only go at bizarre hours where there isn’t any one on the free weights and if
    there is they’re terrible spotters (overassisters regardless of you pleading for them not to).

    That Match Good Friend is designed to share honest feedback and reviews on performance-focused shoes and for varied pieces of men’s apparel.
    Some name it having a ardour for nice gear, others name it an obsession. The most important factor
    might be that you simply feel your higher pecs
    working, no matter whether or not that occurs at 15° or 30°.
    On many adjustable coaching benches, a 30° inclination implies
    that you must use the primary or second setting above horizontal.
    One technique could be first to find 45° inclination (halfway
    between horizontal and vertical), after which select something slightly much less (two-thirds) than that.

    The flat dumbbell press is a robust and versatile exercise that must be a staple in any chest workout routine.
    It not solely enhances chest strength and muscle symmetry but additionally engages supporting muscle tissue for a well-rounded upper-body workout.
    By mastering proper kind, avoiding common mistakes, and incorporating advanced variations, you’ll
    find a way to continually problem your self and achieve spectacular outcomes.
    The dumbbell bench press or flat dumbbell press is arguably one of the popular
    gym workouts used for full chest growth. Fuse dumbbell presses with plyometric workouts,
    like push-ups, to enhance explosive power. Incorporate supersets, pairing
    bench presses with rows for balanced higher body coaching.

    Compound units with shoulder or tricep work can additional
    advance energy and mass positive aspects.
    With this variation, you use only one dumbbell and work every arm individually.

    As well as being an excellent chest exercise, this version additionally will increase core activation.
    You’ll have to brace your abs hard to maintain your body stable and straight.
    Incline presses goal the upper a part of the pecs whereas flat presses place more emphasis on the center portion. And, only for the record, decline presses goal the lower
    a part of your chest. All in all, you should use your finest judgement and see how you
    are feeling.
    Your chest or the pectoral region consists of four muscles- pectoralis major,
    pectoralis minor, subclavius, and serratus anterior.
    These muscles are answerable for rotating and flexing the higher limb and maintaining its vary of motion and adaptability.

    I really have seen people who bench press 300+ lbs however cannot
    even rise up 100lb dumbbells during their press.
    If you might be solely doing dumbbell presses you must positively combine in bench press sooner or later and still do your dumbbell presses.
    There is no exact conversion for dumbbells to barbell bench press nonetheless
    you can get a somewhat tough number to start out with and it
    might be enjoyable to try to predict your max just begin light to be
    safe. Learn additional as we focus on the method to make excessive
    positive aspects on your bench press coming from dumbbell presses.
    Hold the dumbbells with a parallel grip, palms facing forward.three.

    She was born in Colorado, raised in northern Michigan, and at present resides in Pennsylvania.
    Heather’s primary goal is to assist others obtain their well being and fitness targets
    by way of schooling, motivation, and inspiration. If
    you are competing in powerlifting, it’s a good idea to apply the bench
    press, squat, and deadlift on the identical day as a outcome of that’s what you’ll do on meet day.

    Right Here are 5 common reasons why you could find it troublesome to do the bench press using dumbbells,
    and why your weight requirements are below average.
    The weight standards on this post will help you decide what’s a respectable weight to be lifting based mostly on your gender, body weight, and coaching expertise.
    1– Lie on the floor along with your legs bent, ft flat
    on the floor. This train could be accomplished using a flat, incline, or decline bench as most well-liked.
    A good stretch at the bottom of each rep makes this train tougher and more productive.

    If you only practice the incline bench press,
    these decrease chest muscle fibers won’t get skilled as a
    lot, and thus not get strengthened. The flat bench dumbbell press presents a larger
    vary of motion and allows for independent movement
    of each arm, which might lead to improved muscle activation and symmetry.
    Some specialists recommend that for pure chest hypertrophy, dumbbell urgent may be superior
    to flat barbell urgent. Bench presses may be an efficient exercise for building up
    chest, arm, and shoulder muscles. They can watch your type and ensure you’re lifting the correct
    weight for your fitness level. The pectorals do the majority of
    the pressing, and athletes can make vital features in energy and bulk.

    Keep In Mind, your progress is earned rep by rep, so
    press on with confidence and dedication. Both are appropriate for
    newbies, however dumbbell presses may supply a larger range
    of motion and assist in balancing energy between arms.

    The incline dumbbell press could be modified in numerous methods
    or made more challenging to swimsuit particular person needs and fitness targets.
    The elbow tuck is a vital type cue that may help to blow up your bench press, whether or not you’re lifting dumbbells or a
    barbell.
    Make the exercise tougher by switching out your dumbbells for
    a set of kettlebells. Due to the uneven weight distribution of kettlebells (the “bell” portion weighs more
    than the handle of the equipment), it requires more stability and management to carry out the train appropriately.
    This train will help you develop the baseline power required for the motion while also starting to interact the stabilizing muscles
    of the shoulders without isolating each shoulder independently.

    Beginners ought to have the ability to do 1 rep
    using around 45% of their body weight (both dumbbells combined).

    Intermediates should have the power to lift approximately 90% of
    their physique weight, and advanced lifters approximately 130%.

    Nonetheless, we have a pair completely different variations for you, starting from the normal to the incline dumbbell
    press to the decline model. The normal grip is
    about 1.5x shoulder width and your elbows will be tucked
    at around 45-70˚. As A End Result Of of your body positioning, the bar will come down larger up on the chest with an incline bench press.
    So, quite than about nipple degree, it will be close to your higher chest.

    You should nonetheless deliver the bar down to the touch your chest in case you have the shoulder mobility to do so
    (if not, work on that).
    This is essentially the most fundamental variation of these three and
    it’s an excellent option for newbies starting to learn the bench press and
    lifters that need to construct their pecs in totality.
    The first and most foundational difference between the flat, incline, and decline bench presses is that each variation will entail a unique bench urgent at a different angle.
    When discussing which bench press variation is “best” or “better” we have to apply context to what we’re asking.
    For example, the flat, decline, and incline bench presses might
    be higher than one another depending on your objectives.

    A respectable dumbbell bench press for the common male beginner is around 45% of physique weight for
    a single repetition and each dumbbells mixed. Intermediates and
    superior lifters should be capable of raise round 90% and 130% (respectively) for 1 rep.

    As good because the dumbbell bench press is, when you do it over and over again, your muscles will quickly adapt, and it will stop being such a productive train.

    References:

    best steroid for strength and cutting

  4. Hack squat will also tremendously benefit posture, because it follows functional form in movement.

    But no worries, there are some variations
    you can do to imitate the motion and they’re very efficient.

    The hack squat is usually safe to carry out for most people, and it’s distinctive
    in that you’re at an angle in the course of the movement.
    There are advantages to this, which we’ll discuss, however it’s hard to go mistaken with the hack squat as it’s a viable alternative to the barbell squat.

    Like another product, hack squat gear come in numerous designs and sizes to
    match your needs and desire. A squat health club machine
    is designed to make your workouts more effective and pleasant.
    A Sissy machine recruits your quads to create a balance between the posterior and
    anterior muscles, isolating the quads without exerting an excessive amount of pressure in your knees.
    The nature of a sissy set of exercises improves your whole physique steadiness and strengthens the core.
    As a motion, leg presses create resistance for the gluteal muscles and permit users to correctly practice a targeted area in their lower bodies.

    You’ll be so busy respiration that you’ll forget about muscle contractions.
    If you finish up rushing through the reps, it’s probably because the
    burden on the machine is an excessive quantity of. A well-executed hack squat ensures the hamstrings are engaged, though not as major movers.
    Finding the right number of units and reps to
    get the most effective outcomes can take trial
    and error. Start with decrease sets and reps and lighter poundage and progressively
    improve the amount and intensity. Grasp the train form earlier than you go exhausting and
    heavy on this train.
    As you carry out the exercise, your abdominals,
    obliques, and decrease back muscle tissue engage to keep your torso upright and regular.
    This is especially important as you go deeper into the squat and preserve management over the movement.
    The presence of security lockouts is crucial for a leg press/hack squat machine.

    These lockouts enable you to halt the machine at various positions within the full vary of movement for each workout routines.

    The major muscle group activated in the course of the hack squat is the quadriceps, positioned at the front of your thighs.
    These four muscles—the vastus lateralis, vastus medialis, vastus intermedius, and rectus femoris—are answerable for extending your knee and straightening your leg.
    When you perform a hack squat, your quadriceps are beneath vital tension, especially as you push by way of the upward section of the motion.
    Thanks to the hack squat, the secrets of lower physique
    power at the moment are laid bare. Contrary to well-liked belief that a wide stance activates your glutes more,
    your glutes are activated more with narrow foot
    placement. This is as a end result of when your thigh bones are close together, your glutes are stretched out more.

    Which of these benefits is relevant is determined by the type of squat machine you choose.
    One potential deal-breaker here is the shoulder pads – you
    want correct spacing (or adjustability) and generous padding.
    The final step right here is pairing the maximum weight capability with the warranty phrases.

    If you’re on the lookout for a leverage squat machine, this Titan is the most effective
    value. 1 – You can change up the muscles worked by
    altering the place you load the plates. This 4-in-1 machine combo from Pressure USA is the
    highest decide of the hack squat category for three reasons – worth, versatility, and proper
    geometry. A counterbalanced Smith Machine signifies that
    you carry the precise weight of the plates you load onto it.
    Before we dive into the comparisons, let’s establish why
    leg exercises are essential.

    References:

    Where Can You Buy Anabolic Steroids (Code.Nwcomputermuseum.Org.Uk)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注