前回 で速度改善したものの、最後の図だと 2019-10 以前はもっと速かった。
月ooo円の VPS に gifトンネル を掘ってみたところ、以前以上に改善した。(一時間毎の谷は speedtest の実行が重なってた)
JPNE の MAP-E だと、まだQoSされているということかな。
一応設定は。
# VPS側
> ifconfig gif0 create
> ifconfig gif0 inet6 tunnel $vps_ipv6 $client_ipv6 mtu 1460
> ifconfig gif0 alias $vps_ipv4/24 $client_ipv4
> grep nat /etc/pf.conf
nat on $ext_if from $vps_ipv4/16 to any -> ($ext_if)
# クライアント側
> ifconfig gif0 create
> ifconfig gif0 inet6 tunnel $client_ipv6 $vps_ipv6 mtu 1460
> ifconfig gif0 alias $client_ipv4/24 $vps_ipv4
> route add default $vps_ipv4
DNS などの設定は dhcp6c を使っても、使わなくても。
MAP-E だけど、大量のコネクションを張るプロセスが動いていると、Webブラウザの操作も支障が出るほどモタついた。。。
ルータ(WSR-1166DHPL) によるのか分からないけど。
ポートセービングIPマスカレード 対応のルータなら改善するのかな?
MAP-E詳細 P94 に下のようにあるのだけど、同一接続先は多くはないし、該当していないと思うんだけどな。。。
誤解されがちな点として、ポートの枯渇が発生するのは、「同一宛先IPv4アドレスかつ同一宛先ポートに対して多数の通信を行った場合のみ」です。MAP-EにおいてIPv4 NATで変換される通信セッションは、5タプルと呼ばれる5つの要素(通信プロトコル、宛先IPv4アドレス、送信元IPv4アドレス、宛先ポート、送信元ポート)によって識別されます。送信元ポート以外の4つの要素がすべて同じ状態で、送信元ポートの差異によってしか識別できない通信が極端に多くなってしまった状態が、MAP-Eにおける「ポートの枯渇」です。
仮にタプルが同一だとすると 16×15=240ポート が上限ということか。
おまけ client -> vps 間の iperf
ルータ:WSR-1166DHPL より 直付け のほうが若干速い。
# ルータ:WSR-1166DHPL ########################################################
# /usr/local/bin/iperf3 -c $vps_ip6
Connecting to host $vps_ip6, port 5201
[ 5] local $client_ip6 port 63214 connected to $vps_ip6 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 8.07 MBytes 67.7 Mbits/sec 0 154 KBytes
[ 5] 1.00-2.00 sec 9.26 MBytes 77.7 Mbits/sec 0 223 KBytes
[ 5] 2.00-3.00 sec 9.10 MBytes 76.3 Mbits/sec 1 1.39 KBytes
[ 5] 3.00-4.00 sec 9.15 MBytes 76.9 Mbits/sec 1 211 KBytes
[ 5] 4.00-5.00 sec 9.18 MBytes 77.0 Mbits/sec 0 266 KBytes
[ 5] 5.00-6.00 sec 9.25 MBytes 77.6 Mbits/sec 0 311 KBytes
[ 5] 6.00-7.00 sec 9.27 MBytes 77.8 Mbits/sec 0 352 KBytes
[ 5] 7.00-8.00 sec 9.05 MBytes 75.9 Mbits/sec 2 236 KBytes
[ 5] 8.00-9.00 sec 9.17 MBytes 77.0 Mbits/sec 2 172 KBytes
[ 5] 9.00-10.00 sec 9.11 MBytes 76.3 Mbits/sec 1 1.39 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 90.6 MBytes 76.0 Mbits/sec 7 sender
[ 5] 0.00-10.02 sec 89.9 MBytes 75.3 Mbits/sec receiver
iperf Done.
# /usr/local/bin/iperf3 -c $vps_ip4
Connecting to host $vps_ip4, port 5201
[ 5] local $client_ip4 port 63316 connected to $vps_ip4 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 6.52 MBytes 54.7 Mbits/sec 12 68.8 KBytes
[ 5] 1.00-2.00 sec 8.61 MBytes 72.2 Mbits/sec 0 170 KBytes
[ 5] 2.00-3.00 sec 8.30 MBytes 69.6 Mbits/sec 2 125 KBytes
[ 5] 3.00-4.00 sec 8.40 MBytes 70.5 Mbits/sec 16 112 KBytes
[ 5] 4.00-5.00 sec 8.38 MBytes 70.3 Mbits/sec 16 64.8 KBytes
[ 5] 5.00-6.00 sec 8.53 MBytes 71.5 Mbits/sec 4 141 KBytes
[ 5] 6.00-7.00 sec 8.41 MBytes 70.5 Mbits/sec 5 75.9 KBytes
[ 5] 7.00-8.00 sec 8.42 MBytes 70.6 Mbits/sec 5 56.4 KBytes
[ 5] 8.00-9.00 sec 8.49 MBytes 71.2 Mbits/sec 1 116 KBytes
[ 5] 9.00-10.00 sec 8.46 MBytes 71.0 Mbits/sec 5 92.4 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 82.5 MBytes 69.2 Mbits/sec 66 sender
[ 5] 0.00-10.01 sec 82.3 MBytes 69.0 Mbits/sec receiver
iperf Done.
# /usr/local/bin/iperf3 -c $vps_ip4_tinc
Connecting to host $vps_ip4_tinc, port 5201
[ 5] local $client_ip4_tinc port 15841 connected to $vps_ip4_tinc port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 1.82 MBytes 15.3 Mbits/sec 0 65.8 KBytes
[ 5] 1.00-2.00 sec 5.81 MBytes 48.7 Mbits/sec 3 110 KBytes
[ 5] 2.00-3.00 sec 8.02 MBytes 67.3 Mbits/sec 17 61.5 KBytes
[ 5] 3.00-4.00 sec 7.01 MBytes 58.8 Mbits/sec 22 137 KBytes
[ 5] 4.00-5.00 sec 8.25 MBytes 69.2 Mbits/sec 1 101 KBytes
[ 5] 5.00-6.00 sec 3.78 MBytes 31.7 Mbits/sec 17 11.8 KBytes
[ 5] 6.00-7.00 sec 1.95 MBytes 16.4 Mbits/sec 10 9.14 KBytes
[ 5] 7.00-8.00 sec 1.35 MBytes 11.3 Mbits/sec 5 19.6 KBytes
[ 5] 8.00-9.00 sec 2.15 MBytes 18.0 Mbits/sec 7 39.4 KBytes
[ 5] 9.00-10.00 sec 2.47 MBytes 20.7 Mbits/sec 9 19.7 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 42.6 MBytes 35.7 Mbits/sec 91 sender
[ 5] 0.00-10.01 sec 42.2 MBytes 35.4 Mbits/sec receiver
iperf Done.
# 直付け #####################################################################
# /usr/local/bin/iperf3 -c $vps_ip6
Connecting to host $vps_ip6, port 5201
[ 5] local $client_ip6 port 18121 connected to $vps_ip6 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 8.53 MBytes 71.5 Mbits/sec 0 164 KBytes
[ 5] 1.00-2.00 sec 9.49 MBytes 79.6 Mbits/sec 0 231 KBytes
[ 5] 2.00-3.00 sec 9.47 MBytes 79.4 Mbits/sec 0 284 KBytes
[ 5] 3.00-4.00 sec 9.45 MBytes 79.3 Mbits/sec 0 329 KBytes
[ 5] 4.00-5.00 sec 9.47 MBytes 79.5 Mbits/sec 0 366 KBytes
[ 5] 5.00-6.00 sec 9.40 MBytes 78.9 Mbits/sec 0 402 KBytes
[ 5] 6.00-7.00 sec 9.39 MBytes 78.7 Mbits/sec 0 434 KBytes
[ 5] 7.00-8.00 sec 9.37 MBytes 78.6 Mbits/sec 0 465 KBytes
[ 5] 8.00-9.00 sec 9.37 MBytes 78.6 Mbits/sec 0 493 KBytes
[ 5] 9.00-10.00 sec 9.36 MBytes 78.6 Mbits/sec 0 520 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 93.3 MBytes 78.3 Mbits/sec 0 sender
[ 5] 0.00-10.05 sec 93.0 MBytes 77.6 Mbits/sec receiver
iperf Done.
# /usr/local/bin/iperf3 -c $vps_ip4
Connecting to host $vps_ip4, port 5201
[ 5] local $client_ip4 port 18107 connected to $vps_ip4 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 7.76 MBytes 65.1 Mbits/sec 0 148 KBytes
[ 5] 1.00-2.00 sec 8.82 MBytes 74.0 Mbits/sec 1 167 KBytes
[ 5] 2.00-3.00 sec 8.77 MBytes 73.5 Mbits/sec 2 152 KBytes
[ 5] 3.00-4.00 sec 8.82 MBytes 74.0 Mbits/sec 0 219 KBytes
[ 5] 4.00-5.00 sec 8.78 MBytes 73.7 Mbits/sec 0 270 KBytes
[ 5] 5.00-6.00 sec 8.76 MBytes 73.5 Mbits/sec 39 96.4 KBytes
[ 5] 6.00-7.00 sec 8.78 MBytes 73.7 Mbits/sec 0 185 KBytes
[ 5] 7.00-8.00 sec 8.79 MBytes 73.7 Mbits/sec 0 243 KBytes
[ 5] 8.00-9.00 sec 8.78 MBytes 73.7 Mbits/sec 61 145 KBytes
[ 5] 9.00-10.00 sec 8.79 MBytes 73.7 Mbits/sec 0 214 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 86.9 MBytes 72.9 Mbits/sec 103 sender
[ 5] 0.00-10.02 sec 86.7 MBytes 72.5 Mbits/sec receiver
iperf Done.
おまけ dhcp6c
# dhcp6c -d -f -D -i ue0
Mar/28/2020 16:35:13: extracted an existing DUID from /var/db/dhcp6c_duid: XX
Mar/28/2020 16:35:13: reset a timer on ue0, state=INIT, timeo=0, retrans=891
Mar/28/2020 16:35:14: Sending Information Request
Mar/28/2020 16:35:14: a new XID (xxxxxx) is generated
Mar/28/2020 16:35:14: set client ID (len 14)
Mar/28/2020 16:35:14: set elapsed time (len 2)
Mar/28/2020 16:35:14: send information request to XX
Mar/28/2020 16:35:14: reset a timer on ue0, state=INFOREQ, timeo=0, retrans=991
Mar/28/2020 16:35:14: receive reply from XX on ue0
Mar/28/2020 16:35:14: get DHCP option server ID, len 10
Mar/28/2020 16:35:14: DUID: XX
Mar/28/2020 16:35:14: get DHCP option client ID, len 14
Mar/28/2020 16:35:14: DUID: XX
Mar/28/2020 16:35:14: get DHCP option DNS, len 32
Mar/28/2020 16:35:14: get DHCP option domain search list, len 25
Mar/28/2020 16:35:14: get DHCP option NTP server, len 32
Mar/28/2020 16:35:14: dhcp6c Received INFOREQ
Mar/28/2020 16:35:14: nameserver[0] XX
nameserver[0] XX
Mar/28/2020 16:35:14: nameserver[1] XX
nameserver[1] XX
Mar/28/2020 16:35:14: Domain search list[0] flets-east.jp.
Domain search list[0] flets-east.jp.
Mar/28/2020 16:35:14: Domain search list[1] iptvf.jp.
Domain search list[1] iptvf.jp.
Mar/28/2020 16:35:14: NTP server[0] XX
NTP server[0] XX
Mar/28/2020 16:35:14: NTP server[1] XX
NTP server[1] XX
Mar/28/2020 16:35:14: removing an event on ue0, state=INFOREQ
Mar/28/2020 16:35:14: got an expected reply, sleeping.
Mar/28/2020 16:35:14: exiting