カウンター
- 198,011 アクセス
ぴくしぶ
最近の更新
かてごりぃ
投稿日
月 | 火 | 水 | 木 | 金 | 土 | 日 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
ちょっとした文章とかメモ書きとか。
インターネットを快適するにはルーターもいいやつを選びたいよね、と言う記事です。
在宅ワークを行うと、固定回線を日中に多く使うようになってしまいました。元々固定回線に使っていたルーターはBuffaloのWXR-1900HP3です。ただし、このルーターは数日に一回再起動をしないと無線が繋がらなくなる不具合があり、困っていました。
不具合の症状から見るに、このルーターはLinuxが動いてるのでメモリが足りなくなってOOM Killerが発動してるんじゃないかなと思っているところ。
流石になんとかしたいと言うことで、NVR510を導入してみました。前にヤマハの中古ルーターをいじっていたこともあって親切さ加減が進化していて感動です。
NVR510はヤマハが出している小規模オフィスのネットワークにも耐えうる製品です。市販のコンシューマー向けルーターではIPoE IPv6接続をしつつ、PPPoE IPv4接続も維持すると言う使い方ができる製品はなかなかないですが、このNVR510は設定を手で書いてやることでIPoEとPPPoE接続のセッションを同時に張れます。
NVR510の管理画面には簡単設定があり、IPoE接続でもPPPoE接続でもマウスぽちぽちで終わりじゃーい!と意気揚々と設定したらそんなことはなかった😅。
IPoEでの接続はMap-EやDS-Lite接続と色々種類があるらしく、プロバイダーが独自でVNEを構築している場合があるそう。
DS-Lite: https://www.geekpage.jp/blog/?id=2019-7-24-1
Map-E: https://aero-ship.net/2019/01/difference-bw-mape-dslite/#MAP-EV6
調べたところ、BiglobeのIPv6 OptionはMap-E接続で行われ、IPv6の設備はJPNEではなく自前で運用しているとのこと。
NVR510のIPoEの機能の説明を見ると、JPNE(日本ネットワークイネイブラー株式会社)以外のIPoE接続は自前で設定を書く必要があるらしい。
日本ネットワークイネイブラー株式会社が提供する「v6プラス」を利用してインターネット接続をする機能を提供します。
http://www.rtpro.yamaha.co.jp/RT/docs/v6plus/index.html
どうりで、IPoE接続を簡単接続から設定しても繋がらないわけです😇。
設定を書くと言ったが、全て手でやるとは言っていない。
NVR510のファームウェアのバージョンはRev.15.01.16 (Wed Mar 11 12:06:39 2020)です。
NVR510のコンソールにログインして
> show ipv6 address LAN1 scope-id 1 [up] Received: 121300 packets 20992758 octets Transmitted: 93152 packets 12673027 octets global [global IPv6 address] (lifetime: 604621/2591821)
の[global IPv6 Address]をhttp://ipv4.web.fc2.com/map-e.html でIPv6 プレフィックスかアドレスを入力:のフォームに入力すればCE IPv6 アドレス(ceipv6addr)、IPv4アドレス(outeripv4)、ポート番号(portrange)が埋まるはず。この出力する設定は光電話は使っていません。
# ref: http://ipv4.web.fc2.com/map-e.html # v6plus ref: https://api.enabler.ne.jp/6a4a89a8639b7546793041643f5da608/get_rules?callback=v6plus ceipv6addr = "[CE IPv6 Address]" eastbraddr = "2001:260:700:1::1:275" # for east-flets outeripv4 = "[Outer IPv4 address]" portranges = "[IPv4 port range]" ports = portranges.split(' ') config = <<-EOC # ---- IPv6 configuration ---- ipv6 routing on ipv6 prefix 1 ra-prefix@lan2::/64 description lan1 LAN ipv6 lan1 address ra-prefix@lan2::1/64 ipv6 lan1 rtadv send 1 o_flag=on ipv6 lan1 dhcp service server description lan2 "Biglobe FTTH IPoE" # CE IPv6 address #{ceipv6addr} ipv6 lan2 address #{ceipv6addr}/64 ipv6 lan2 mtu 1500 # ipv6 lan secure filter in part # ipv6 lan secure filter out part ipv6 lan2 dhcp service client ir=on # IPv4 related ip route default gateway tunnel 1 description tunnel MAP-E tunnel select 1 tunnel encapsulation ipip tunnel endpoint address #{ceipv6addr} #{eastbraddr} ip tunnel mtu 1460 ip tunnel nat descriptor 1010 1011 1012 1013 tunnel enable 1 # NAT table for IPv6 tunnel - 1 nat descriptor type 1010 masquerade nat descriptor address outer 1010 #{outeripv4} nat descriptor address inner 1010 auto # NAT table for IPv6 tunnel - 2 nat descriptor type 1011 masquerade nat descriptor address outer 1011 #{outeripv4} nat descriptor address inner 1011 auto # NAT table for IPv6 tunnel - 3 nat descriptor type 1012 masquerade nat descriptor address outer 1012 #{outeripv4} nat descriptor address inner 1012 auto # NAT table for IPv6 tunnel - 4 nat descriptor type 1013 masquerade nat descriptor address outer 1013 #{outeripv4} nat descriptor address inner 1013 auto nat descriptor masquerade port range 1010 #{ports[0..3].join(' ')} nat descriptor masquerade port range 1011 #{ports[4..7].join(' ')} nat descriptor masquerade port range 1012 #{ports[8..11].join(' ')} nat descriptor masquerade port range 1013 #{ports[12..15].join(' ')} # Some filtering configurations... EOC print config
このコードはGitHubにもおいてあります。
https://github.com/cosmo0920/dotfiles/blob/master/piece-of-biglobe-map-e-configuration/ipoe.rb
map-e.rbのようなファイルに保存してruby map-e.rbのように実行すると、標準出力に最終的なIPv6に関係する設定片が出力されます。
NVR510の設定ファイルは https://blog.hiros.info/2018/06/biglobeipv4-over-ipv6-rtx830.html を参考に作成しました。
速度が出て、回線が安定するようになったみたいです。