网上 N1 定制镜像很多,一是别人做的,也许很好,但不是独一份定制。二是安装新功能软件非常困难。基于此,找到一种方法,一是省事,二是可在线升级。如果,你有这个需求,往下看。
基于 OpenWRT 官方原版镜像制作纯净斐讯 N1 OpenWRT 镜像(其它 arm 的也可以,具体支持什么,查工具在线说明,工具不是我做的,我是拿来主义,也没有那个能力和精力,好用就可以),可在线安装软件包。
=镜像制作=
1 、git clone https://github.com/shenzt68/mknop.git 目录结构下: common/ device/ gen_openwrt LICENSE openwrt/ openwrt-19.07.8-armvirt-64-root.ext4.gz out/ README.md
2 、wget https://downloads.openwrt.org/releases/19.07.8/targets/armvirt/64/openwrt-19.07.8-armvirt-64-root.ext4.gz 将 openwrt-19.07.8-armvirt-64-root.ext4.gz 拷贝到上面 openwrt 目录
3 、执行 ./gen_openwrt -d
4 、在 mknop/out/phicomm-n1 目录里找到镜像,我的是 22.01.01-124122-phicomm-n1-5.4.73-aarch64-openwrt-firmware.img
6 、以 win32diskimager 写入镜像到 U 盘。DD 也可以,坑点,挑 U 盘。
7 、插入斐讯 N1 ,如此一个单臂 OpenWRT 路由做好了。
==OpenWRT 设置,基于 MACVLAN 的多端口模拟==
8 、进入 WEB 界面,设置 网络-接口-LAN-编辑-物理设置-桥接接口那个勾要去掉。就是 ETH0 不能桥接。
9 、设置 LAN 上网参数,达到路由器不拨号用 LAN 的参数正常上网目的。 10 、系统–software–update lists 11 、安装 kmod-macvlan
12 、系统-启动项-本地脚本输入 #设置 Eth0 子网卡(基于 MACVLAN ),注意,坑点,在网络接口-物理设置出,要取消 为指定接口创建桥接。就是说这个接口不能桥接。 ip link add veth1@eth0 link eth0 type macvlan mode bridge ifconfig veth1@eth0 hw ether 00000c010001 ip link set veth1@eth0 up
ip link add veth2@eth0 link eth0 type macvlan mode bridge ifconfig veth2@eth0 hw ether 00000c010002 ip link set veth2@eth0 up
ip link add veth3@eth0 link eth0 type macvlan mode bridge ifconfig veth3@eth0 hw ether 00000c010003 ip link set veth3@eth0 up
ip link add veth4@eth0 link eth0 type macvlan mode bridge ifconfig veth4@eth0 hw ether 00000c010004 ip link set veth4@eth0 up
12 、断电,重启,系统多了 4 个虚拟接口。veth1@eth0 ,veth2@eth0 ,veth3@eth0 ,veth4@eth0. 13 、网络-接口–添加新接口,设置为 WAN 即可。
网络结构:傻瓜交换机,端口 1 接光猫,端口 2 接斐讯 N1 ,端口 3 接电脑。
性能怎么样?实际上跟双口没有啥区别。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.