ネットワークの概要
WAN 側に NTT 光(ひかり電話はなし)、WAN 側接続(eth0)は、IPoE + DS-Lite および PPPoE で接続します。192.168.10.0/24 を LAN1(eth1)に割り当て、ここにホームサーバーを接続します。LAN1 は、PPPoE 接続です。LAN2(switch = eth2-eth4)側は IPoE + DS-Lite と接続し、インターネットの高速化を図っています。 スピードテストで測定すると、PPPoE は約 100Mbps〜300Mbps ですが、IPoE + DS-Lite と接続すると約 400Mbps〜600Mbps になるようです。
インターフェース設定の構成
eth0 の IPoE に IPv6 を設定します。しばらくすると、ルーターに IPv6 が構成されます。その IP に基づいて DS-Lite をセットアップします。ipv6-tunnel で、ipip6 をカプセル化に設定し、ルーターに割り当てられた ipv6 アドレスを local-ip に設定し、transix サービスの IP を remote-ip に設定します。 設定はこんな感じ。
interfaces {
ethernet eth0 {
description WAN(IPoE+DS-Lite)
duplex auto
firewall {
in {
ipv6-name WANv6_IN
}
local {
ipv6-name WANv6_LOCAL
}
}
ipv6 {
address {
autoconf
}
disable-forwarding
dup-addr-detect-transmits 1
}
speed auto
}
:
ipv6-tunnel v6tun0 {
description DSLite
encapsulation ipip6
firewall {
in {
name DSLite_IN
}
local {
name DSLite_LOCAL
}
}
local-ip 2409:xx:xx:xx:xx:xx:xx:xx
multicast disable
remote-ip 2404:8e00::feed:100 <-NTT-east
ttl 64
}
}
PPoE の設定を追加
PPPoE を eth0 に追加し、PPPoE の認証設定を行います。これで WAN 側(eth0)に IPoE+DS-Lite と PPPoE の接続が可能となりました。
interfaces {
ethernet eth0 {
description WAN(IPoE+DS-Lite+PPPoE)
:
pppoe 0 {
default-route auto
firewall {
in {
name PPPoE_IN
}
local {
name PPPoE_LOCAL
}
}
mtu 1454
name-server auto
password xxxx
user-id xxxx@xxxx
}
speed auto
}
:
}
ルーティングの設定
サーバーの静的ルートを LAN1 側へ PPoE ルート、LAN2-LAN4 へのクライアント IPoE + DS-Liete ルートを構成します。FireWall の変更機能と静的ルーティングを組み合わせて、パケット配信を制御します。
ファイアウォールの設定
firewall {
all-ping enable
broadcast-ping disable
:
modify LAN_PBR {
rule 10 {
action modify
description "LAN to PPPoE"
destination {
address !192.168.0.0/16
}
modify {
table 1
}
source {
address 192.168.10.0/24
}
}
rule 20 {
action modify
description "LAN to DSLite"
destination {
address !192.168.0.0/16
}
modify {
table 2
}
source {
address 192.168.1.0/24
}
}
}
}
静的ルーティングを設定します。
protocols {
static {
interface-route 0.0.0.0/0 {
next-hop-interface pppoe0 {
distance 200
}
next-hop-interface v6tun0 {
}
}
table 1 {
interface-route 0.0.0.0/0 {
next-hop-interface pppoe0 {
}
}
}
table 2 {
interface-route 0.0.0.0/0 {
next-hop-interface v6tun0 {
}
}
}
}
}
最後に、PPPoE の IP マスカレードをセットアップします。
service {
:
nat {
rule 5010 {
description "masquerade for PPPoE"
outbound-interface pppoe0
type masquerade
}
}
}
以上で EdgeRouter X での IPoE(DS-Lite)と PPPoE の設定が完了しました。