FreeBSD 11 部署在具有外部 AAAA 地址的 vps 上,并且在具有外部 BBBB 地址的 mikrotik 和此服务器之间建立了一个 gre-tunnel:
root@XXXXXX ~ # ifconfig gre0
gre0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1392
options=80000<LINKSTATE>
tunnel inet A.A.A.A --> B.B.B.B
inet 10.100.0.1 --> 10.100.0.2 netmask 0xffffffff
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
groups: gre
root@XXXXXXX ~ # netstat -rn
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default X.X.X.X UGS xn0
10.100.0.1 link#4 UHS lo0
10.100.0.2 link#4 UH gre0
...
我在频道测试速度的时候,速度正常(从vps服务器控制台输出):
root@XXXXXX ~ # iperf -s 10.100.0.1
iperf: ignoring extra argument 10.100.0.1
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
[ 4] local 10.100.0.1 port 5001 connected with 10.100.0.2 port 21440
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 92.6 MBytes 77.5 Mbits/sec
但是如果我在 vps 外部接口上运行 iperf 并尝试测试通过隧道到外部接口的速度,那么它会下降很多(来自 vps 服务器控制台的输出):
root@DS869040 ~ # iperf -s A.A.A.A
iperf: ignoring extra argument -- A.A.A.A
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 4] local A.A.A.A port 5001 connected with 10.100.0.2 port 21751
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-107.2 sec 128 KBytes 9.78 Kbits/sec
我不使用防火墙。我也试过用vps CentOS 建个隧道——效果是一样的
问题出在标准快速通道连接规则中 Mikrotik 上的防火墙中