请教软路由相关问题

2017-08-27 22:09:40 +08:00
 unidentifiedme

主要需求是目前的 R6300v2 跑不满 200Mbps 的众所周知的某种服务,所以想考虑上软路由+NAS (不是强需求)。 考虑的解决方案是 ESXi 虚拟一个路由器和一个黑群晖,然后软路由连光猫,R6300v2 只作为 AP。

目前纠结在两种方案:

  1. 淘宝 N3700 (半)成品。优点是不用折腾,自带多个网卡,但是感觉扩展性略弱,并且是山寨主板(据称是工控板)。
  2. 自己 DIY N3150。华擎的 BGA 板子。优点是能硬解 HEVC,缺点是折腾和略贵。

方案 2,主要是多个 HEVC 硬解,我也有偶尔看 HEVC 的视频的需求,不过大部分时间也就是弄个 Plex 在 iPad 上看看。

主要是来这想问问玩过软路由的 dalao:

  1. 方案 1 靠谱么?感觉性价比很高的样子,但是比较担心山寨板子的质量。
  2. 有必要上个小的 SSD 作为系统盘嘛?
  3. 咨询了一下方案 1 的卖家,N3700 是可以满足 200Mbps 的 AES-256-CFB 加密的。N3150 应该也可以吧?

3150 方案主要参考这篇文章 https://saier.me/n3150-router/

9196 次点击
所在节点    路由器
36 条回复
0ZXYDDu796nVCFxq
2017-09-19 23:43:25 +08:00
@unidentifiedme 家里网络断了很久
CPU 同样是 N3700
Proxmox KVM
虚拟机双核,LEDE 17.1.2
SS 3.1.0


sh iperf-ss.sh 1G aes-128-gcm

------------------------------------------------------------
Server listening on TCP port 8388
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 8387
TCP window size: 2.50 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 35388 connected with 127.0.0.1 port 8387
[ 4] local 127.0.0.1 port 8388 connected with 127.0.0.1 port 43496
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-35.9 sec 1.00 GBytes 240 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-36.3 sec 1.00 GBytes 237 Mbits/sec




sh iperf-ss.sh 100M chacha20-ietf-poly1305

------------------------------------------------------------
Server listening on TCP port 8388
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 8387
TCP window size: 2.50 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 35364 connected with 127.0.0.1 port 8387
[ 4] local 127.0.0.1 port 8388 connected with 127.0.0.1 port 43472
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.7 sec 100 MBytes 315 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 3.1 sec 100 MBytes 274 Mbits/sec






sh iperf-ss.sh 100M aes-256-gcm
------------------------------------------------------------
Server listening on TCP port 8388
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 8387
TCP window size: 3.01 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 35370 connected with 127.0.0.1 port 8387
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 3.8 sec 100 MBytes 221 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 4] 0.0- 4.2 sec 100 MBytes 202 Mbits/sec
0ZXYDDu796nVCFxq
2017-09-19 23:53:41 +08:00
这种单机环境
Proxmox 比 ESXi 好太多了
unidentifiedme
2017-09-20 12:13:20 +08:00
@gstqc #22 雾草,我这就换掉 ESXi。没想到 ESXi 性能这么惨不忍睹
unidentifiedme
2017-09-20 16:19:25 +08:00
@gstqc #22 遇到了一点问题,我在 Proxmox 里面新建 VM 的时候,只能使用 ISO,我将 LEDE 的 IMG 用转换成 ISO。但是在 Proxmox 里面启动 VM 之后报错 “ Could not read from CDROM (code 0005)”

Google 没有结果,请问你是用什么工具将 IMG 转换到 ISO 的?
0ZXYDDu796nVCFxq
2017-09-20 16:43:07 +08:00
@unidentifiedme
下载 Debian 的 LiveCD,可以用 8.8 的 standard,没有 GUI
上传 iso 到 Proxmox,创建虚拟机,启动
然后在 Debian Live 里下载 LEDE,看你安装方式,combined-ext4.img.gz 或者 rootfs-ext4.img.gz generic-rootfs.tar.gz 都可以
然后把系统写到硬盘里,dd 或者手动分区 cp 文件,设置启动分区
最后重启虚拟机就行。
unidentifiedme
2017-09-20 17:02:01 +08:00
@gstqc #25 意思是随意先弄一个 Linux,然后在这个 Linux 里面用 dd img 到磁盘分区,然后换掉启动分区。这样么?
0ZXYDDu796nVCFxq
2017-09-20 17:41:55 +08:00
@unidentifiedme #26
对,不过建议用 livecd 启动到系统
这样不用安装一个 Linux 到硬盘那么麻烦

下载 combined-ext4.img.gz
gzip -d combined-ext4.img.gz -c | dd of=/dev/sda
重启即可
unidentifiedme
2017-09-20 19:40:44 +08:00
@gstqc #27 我简直不敢相信我的眼睛,给了 2 个核,感觉是假的 N3700
难道是山寨主板的锅?(不支持一些 CPU 相关的功能?) KVM 的 CPU 配置的不对?(我的设置是默认的 kvm64 )

sh iperf.sh 100M aes-128-gcm
2017-09-20 11:36:25 INFO: initializing ciphers... aes-128-gcm
2017-09-20 11:36:25 INFO: listening at 127.0.0.1:8387
2017-09-20 11:36:25 INFO: running from root user
2017-09-20 11:36:25 INFO: initializing ciphers... aes-128-gcm
2017-09-20 11:36:25 INFO: tcp server listening at 127.0.0.1:8389
2017-09-20 11:36:25 INFO: running from root user
------------------------------------------------------------
Server listening on TCP port 8388
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 8387
TCP window size: 2.50 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 35600 connected with 127.0.0.1 port 8387
[ 4] local 127.0.0.1 port 8388 connected with 127.0.0.1 port 35170
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-22.2 sec 100 MBytes 37.8 Mbits/sec
Waiting for server threads to complete. Interrupt again to force quit.
2017-09-20 11:36:50 ERROR: send: Connection reset by peer
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-23.2 sec 94.5 MBytes 34.2 Mbits/sec
Test Finished
unidentifiedme
2017-09-20 19:52:22 +08:00
@gstqc #27 从 kvm64 换成 host 之后,性能有所提升,之前设置为 kvm64 的时候少了很多指令集。不过还是和你的测试结果有很大差距。
0ZXYDDu796nVCFxq
2017-09-20 20:05:26 +08:00
@unidentifiedme #29
我没有做任何设置,选 CPU 时就选 host,512M 内存,其他限制都是默认的
安装的二进制包是这个
https://bintray.com/aa65535/opkg/shadowsocks-libev/3.1.0#files/shadowsocks-libev%2F3.1.0%2FLEDE%2Fx86_64
unidentifiedme
2017-09-20 20:29:16 +08:00
@gstqc #30 你的机器是什么主板? Proxmox 是啥版本?我装的 5.0
感觉很神奇,搞不懂这个性能差距在哪里。
0ZXYDDu796nVCFxq
2017-09-20 20:56:47 +08:00
unidentifiedme
2017-09-20 21:20:27 +08:00
@gstqc #32 这可能真的是玄学,我的是这家的 V2+,甚至可能主板都是一毛一样的。。。只有网卡不一样,但是网卡根本不影响这个
0ZXYDDu796nVCFxq
2017-09-20 21:35:31 +08:00
@unidentifiedme #33 裸机或者容器跑一下试试
0ZXYDDu796nVCFxq
2017-09-20 21:47:09 +08:00
@unidentifiedme #33
我写了个脚本下载 lxc 容器镜像的
你可以下载容器,然后容器里安装二进制 ss,跑一下试试
RedHat 系和 Debian 都有官方仓库

https://gist.github.com/travislee8964/bbc25e5e74f17cfa428c3343c545c9ac

创建容器,启动,然后在 Proxmox 的 shelllxc-attach -n 100(容器 ID)进入容器即可
cdh1075
2017-11-03 10:12:28 +08:00
用 d525 便宜啊,也不需要什么 exsi 虚拟化,nas 直接跑在 d525 上,然后在上面开个 nat 和 dhcp 不就行了,或者装个 debian 更方便,也不用什么群辉了,nas 自己实现

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/386203

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX