Vyattaからトンネルを作る
configure
edit interfaces tunnel tun0
set encapsulation sit
set local-‐‑‒ip EC2のプライベートアドレス
set remote-‐‑‒ip Server IPv4 Address
set address Client IPv6 Address
set description "HE.NET IPv6 Tunnel"
exit
set protocols static interface-‐‑‒route6 ::/0 next-‐‑‒hop-‐‑‒
interface tun0
commit
Simple Internet Transition (SIT)
IPv6をIPv4に乗せるためのもの
⽶米国東海岸ー東京リージョン間
1 ar1-‐‑‒2.tunnel.tserv13.ash1.ipv6.he.net (2001:470:7:b23::1) 4.608 ms 7.050
ms 9.707 ms
2 gige-‐‑‒g4-‐‑‒12.core1.ash1.he.net (2001:470:0:90::1) 16.986 ms 16.954 ms
16.916 ms
3 10gigabitethernet1-‐‑‒2.core1.atl1.he.net (2001:470:0:1b5::2) 22.150 ms
22.117 ms 22.078 ms
4 10gigabitethernet3-‐‑‒2.core1.dal1.he.net (2001:470:0:1b6::1) 42.314 ms
42.283 ms 42.246 ms
5 10gigabitethernet2-‐‑‒4.core1.phx2.he.net (2001:470:0:258::1) 69.700 ms
69.670 ms 69.637 ms
6 10gigabitethernet15-‐‑‒6.core1.lax2.he.net (2001:470:0:24a::2) 73.184 ms
67.488 ms 66.650 ms
7 10gigabitethernet3-‐‑‒2.core1.tyo1.he.net (2001:470:0:294::2) 162.600 ms
162.120 ms 162.333 ms
8 tserv1.tyo1.he.net (2001:470:0:118::2) 163.306 ms 163.431 ms 162.635
ms
9 ar1-‐‑‒1-‐‑‒pt.tunnel.tserv22.tyo1.ipv6.he.net (2001:470:23:12e::2) 166.556 ms
165.961 ms 166.215 ms
インスタンス内設定スクリプト(例例)
auto tun0
iface tun0 inet static
address 169.254.0.1
netmask 255.255.255.0
broadcast 169.254.0.255
up ifconfig tun0 multicast
pre-‐‑‒up ip tunnel add tun0 mode gre remote 10.3.8.119 local
10.3.8.118 ttl 255
pre-‐‑‒up echo 0 > /proc/sys/net/ipv4/icmp_̲echo_̲ignore_̲broadcasts
pre-‐‑‒up echo 1 > /proc/sys/net/ipv4/ip_̲forward
pre-‐‑‒up echo 0 > /proc/sys/net/ipv4/conf/all/rp_̲filter
up ip route add 224.0.0.0/4 dev tun0
up /etc/init.d/pimd restart
pointopoint 169.254.0.2
post-‐‑‒down iptunnel del tun0
20.
Multicastの疎通を試す
root@ip-‐‑‒10-‐‑‒3-‐‑‒8-‐‑‒119:/etc/network/interfaces.d# ping 224.0.0.1
PING 224.0.0.1 (224.0.0.1) 56(84) bytes of data.
64 bytes from 169.254.0.2: icmp_̲seq=1 ttl=64 time=0.035 ms
64 bytes from 169.254.0.1: icmp_̲seq=1 ttl=64 time=0.557 ms (DUP!)
64 bytes from 169.254.0.2: icmp_̲seq=2 ttl=64 time=0.033 ms
64 bytes from 169.254.0.1: icmp_̲seq=2 ttl=64 time=0.512 ms (DUP!)
Multicastの疎通を試す
root@ip-‐‑‒10-‐‑‒3-‐‑‒8-‐‑‒118:/etc/openvpn# ping 224.0.0.1
PING 224.0.0.1 (224.0.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.50: icmp_̲seq=1 ttl=64 time=0.041 ms
64 bytes from 10.8.0.4: icmp_̲seq=1 ttl=64 time=0.870 ms (DUP!)
64 bytes from 10.8.0.50: icmp_̲seq=2 ttl=64 time=0.062 ms
64 bytes from 10.8.0.4: icmp_̲seq=2 ttl=64 time=0.834 ms (DUP!)