前提说明:我目前设置是这样的。一个主路由器,还有两个分支路由是桥接的。现在网段是192.168.30.1 我现在这个r2s 是接到这个桥接的路由器上 这个默认的网段是192.168.1.1 我现在需要改成192.168.30.1 这个段位 使得其他电脑设备可以访问。
# 1. 更新并安装桥接所需模块 opkg update opkg install kmod-br-netfilter echo "br_netfilter" >> /etc/modules.d/br_netfilter modprobe br_netfilter # 2. 把 eth0+eth1 桥接到 LAN,并设为 DHCP 客户端 uci set network.lan.proto='dhcp' uci set network.lan.ifname='eth0 eth1' uci set network.lan.type='bridge' uci delete network.lan.ipaddr uci delete network.lan.netmask uci delete network.lan.gateway uci delete network.lan.dns uci commit network /etc/init.d/network restart # 3. 关闭 R2S 自己的 DHCP Server uci set dhcp.lan.ignore='1' uci commit dhcp /etc/init.d/dnsmasq restart # 4. 停用防火墙(彻底透传二层流量) /etc/init.d/firewall stop /etc/init.d/firewall disable # 5. 最后检查 echo "桥接和 DHCP 客户端配置完成,请用 ip a 看一下 LAN 接口拿到的地址,然后在浏览器用这个新 IP 登录 LuCI。"
| 复制上面所有命令,SSH 登录后粘贴回车即可。 R2S 会自动从你的主路由(192.168.30.1)拿到一个 192.168.30.x 的地址,且下游所有设备也都在同一网段、可正常上网。 |
评论列表 (条)