- 追加された行はこの色です。
- 削除された行はこの色です。
* FreeBSD と GREトンネルを張る [#z85901c6]
* FreeBSD と GREトンネルを張る。 [#z85901c6]
FreeBSDとGREトンネルを使用し、IPv6アドレスを割り当てる方法について紹介します。
** IX2015側の設定 [#l49af9ab]
トンネルの設定をします。
interface Tunnel0.0
tunnel mode gre ip
tunnel destination 192.168.10.2
tunnel source 10.200.10.2
no ip address
ipv6 enable
ipv6 unnumbered FastEthernet0/0.0
no shutdown
正常に繋がったか次のコマンドで確認を行い、リンクアップを確認します。
show tunnel status
# 正常であれば次のようにReadyと帰ってきます。
Interface Tunnel0.0
Tunnel mode is gre ip
Tunnel is ready
次のコマンドでリンクローカルのIPアドレスを調べる
# show ipv6 address Tunnel1.0
Interface Tunnel1.0 is up, line protocol is up
Interface is unnumbered. Using address of FastEthernet0/0.0
Link-local address(es):
Scope zone is link512
fe80::****:****:abcd:abcd prefixlen 64
fe80::0 prefixlen 64 anycast
Multicast address(es):
ff02::1
ff02::2
ff02::1:ff00:0
ff02::1:abcd:abcd
# 正常に表示されない場合は、トンネルが無効(shutdown)になっている、
ipv6 enable になっていないといった事が考えられます。
IPv6でサービスを行いたいインターフェースの設定を行います。
# interface FastEthernet0/0.0
ipv6 enable
ipv6 address 2001:200:564:XXXX::1/64
no shutdown
** FreeBSD側の設定 [#lb5a6be5]
# ifconfig gre1000 destroy
# ifconfig gre1000 create tunnel 192.168.10.2 10.200.10.2 up
# route add -inet6 2001:200:564:XXXX::/64 fe80::****:****:****:****%gre1000
/* fe80:: 以降は、 IX2015 のリンクローカルアドレス */
rc.conf に記述し、再起動後確認を行います。
vi /etc/rc.conf
-----
cloned_interfaces="gre1000"
ipv6_network_interfaces="bge0 gre1000" <- gre1000 を追加
ifconfig_gre1004="tunnel 192.168.10.2 10.200.10.2 up"
ipv6_static_routes="gre1000"
ipv6_route_gre1000="2001:200:564:XXXX::/64 fe80::****:****:abcd:abcd%gre1000"
# fe80:: 以降は、 IX2015 のリンクローカルアドレス
gifN create ではなく、greN create を使います。
** 疎通確認 [#sbe5ea27]
IX2015(config)# ping6 fe80::230:13ff:XXXX:XXXX interface FastEthernet1/0.0
etc..(省略)
* FreeBSD と GIF(ipip)トンネルを張る [#z85901c6]
FreeBSD 側では、gif トンネルの設定を行い、IX2015側では、tunnel mode 6-over-4 を使えば可能です。
** IX2015側 [#q965777f]
# interface Tunnel0.0
tunnel mode 6-over-4
tunnel destination 192.168.10.2
tunnel source 10.200.10.2
no ip address
ipv6 enable
ipv6 unnumbered FastEthernet0/0.0
ipv6 mtu 1280
no shutdown
次のコマンドでリンクローカルのIPアドレスを調べる
# show ipv6 address Tunnel1.0
Interface Tunnel1.0 is up, line protocol is up
Interface is unnumbered. Using address of FastEthernet0/0.0
Link-local address(es):
Scope zone is link512
fe80::****:****:abcd:abcd prefixlen 64
fe80::0 prefixlen 64 anycast
Multicast address(es):
ff02::1
ff02::2
ff02::1:ff00:0
ff02::1:abcd:abcd
# 正常に表示されない場合は、トンネルが無効(shutdown)になっている、
ipv6 enable になっていないといった事が考えられます。
** FreeBSD側 [#s15b9967]
# ifconfig gif1000 destroy
# ifconfig gif1000 create tunnel 192.168.10.10.200.10.2 up
# ping6 fe80::****:****:abcd:abcd%gif1000
# route add -inet6 2001:200:564:XXXX::/64 fe80::****:****:abcd:abcd%gif1000
rc.conf に次のように追加します。
ipv6_network_interfaces="gif1000"
gif_interfaces="gif1000
ifconfig_gif1004="202.171.149.235 59.106.124.156"
ipv6_static_routes="gif1000"
ipv6_route_gif1000="2001:200:564:XXXX::/64 fe80::****:****:abcd:abcd%gif1000"