1. 登录到 OpenWrt
ssh root@<OpenWrt_IP> # 替换 <OpenWrt_IP> 为你的设备 IP 地址
2. 打开网络配置文件
vi /etc/config/network
3. 进入后按 "i" 进入编辑模式,粘贴以下内容:
config device
option name 'eth1'
config device
option name 'eth2'
config device
option name 'eth3'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
list ports 'eth1'
list ports 'eth2'
list ports 'eth3'
4. 按 "Esc" 键退出编辑模式,然后输入以下命令保存并退出:
:wq # 保存并退出 vi 编辑器
5. 重启网络服务以应用配置:
/etc/init.d/network restart
6. 验证配置是否正确:
brctl show # 查看网桥配置
ip link show # 查看网卡状态
评论