ConfigureVPS

6rd (Sakura.ne.jp & FreeBSD 8.x)

«  FreeBSD 8.2-RELEASE (Sakura.ne.jp VPS)   ::   Contents   ::   Virtual Box  »

6rd (Sakura.ne.jp & FreeBSD 8.x)

LastUpdated: $IsoDate$

1. get patch

commands:

> mkdir ~/tmp/
> cd ~/tmp/
> fetch http://people.allbsd.org/~hrs/FreeBSD/stf_6rd_20100923-1.diff

2. build 6rd

2.1. パッチをあてる

commands:

> cd /usr/src
> sudo patch -p0 < ~/tmp/stf_6rd_20100923-1.diff

(中略)
done

2.2. カーネルモジュールのコンパイル、インストール

commands:

> cd sys/modules/if_stf/
> sudo make
> sudo make install
> ls /boot/kernel/if_stf.ko

2.3. マニュアルのインストール

commands:

> cd /usr/src/share/man/
> sudo make
> sudo make install
> man stf

3. configure 6rd

3.1. IPv6アドレスの算出

commands:

> printf "2001:e41:%02x%02x:%02x%02x::1\n" `ifconfig -a | grep ' broadcast ' | awk '{print $2}' | sed 's/\./ /g'`

3.2. /etc/rc.confの編集

/etc/rc.conf:

# IPv6 network
ipv6_enable="YES"
cloned_interfaces="stf0"
ipv6_ifconfig_stf0="2001:e41:3b6a:babc::1/32"

# IPv6 routing
ipv6_defaultrouter="2001:e41:3dd3:e07d::1"

4. reboot

commands:

> sudo shutdown -r now

5. check 6rd

5.1. check interface & socket

commands:

> ifconfig stf0

stf0: flags=1<UP> metric 0 mtu 1280
      inet6 2001:e41:3b6a:457d::1 prefixlen 32
      nd6 options=3<PERFORMNUD,ACCEPT_RTADV>

> netstat -nr -f inet6 | grep default

default   2001:e41:3dd3:e07d::1      UGS    stf0

5.2. IPv6 reachability

commands:

> ping6 www.kame.net

PING6(56=40+8+8 bytes) 2001:e41:b630:2c35::1 --> 2001:200:dff:fff1:216:3eff:feb1:44d7
16 bytes from 2001:200:dff:fff1:216:3eff:feb1:44d7, icmp_seq=0 hlim=56 time=19.852 ms
16 bytes from 2001:200:dff:fff1:216:3eff:feb1:44d7, icmp_seq=1 hlim=56 time=19.299 ms
16 bytes from 2001:200:dff:fff1:216:3eff:feb1:44d7, icmp_seq=2 hlim=56 time=19.223 ms
^C

> traceroute6 www.kame.net

traceroute6 to orange.kame.net (2001:200:dff:fff1:216:3eff:feb1:44d7) from 2001:e41:b630:2c35::1, 64 hops max, 12 byte packets
 1  2001:e41:3dd3:e07d::1  8.481 ms  8.464 ms  8.381 ms
 2  2001:e40:100:215::1  9.151 ms  9.054 ms  9.025 ms
 3  2001:e40:100:133::1  9.061 ms  9.807 ms  8.868 ms
 4  2001:e40:100:131::2  9.298 ms  9.370 ms  9.943 ms
 5  2001:200:0:fe00::9c4:11  10.737 ms  12.424 ms  13.380 ms
 6  2001:200:0:1802:20c:dbff:fe1f:7200  8.909 ms  8.912 ms  10.308 ms
 7  ve42.foundry4.nezu.wide.ad.jp  9.161 ms  9.184 ms  9.422 ms
 8  cloud-net1.wide.ad.jp  9.381 ms  9.116 ms  9.098 ms
 9  2001:200:dff:fff1:216:3eff:feb1:44d7  19.084 ms  19.193 ms  18.990 ms

6. DNS (regist AAAA record)

under construction.

«  FreeBSD 8.2-RELEASE (Sakura.ne.jp VPS)   ::   Contents   ::   Virtual Box  »