Get On IPv6 Right Now
From Sfvlug
(Difference between revisions)
| Line 1: | Line 1: | ||
| + | Identify your IPv6 prefix. | ||
| + | |||
<pre> | <pre> | ||
echo $IPV4ADDR | awk -F. '{ printf("2002:%x%02x:%x%02x\ | echo $IPV4ADDR | awk -F. '{ printf("2002:%x%02x:%x%02x\ | ||
", $1, $2, $3, $4) }' | ", $1, $2, $3, $4) }' | ||
</pre> | </pre> | ||
| + | |||
| + | Configure your IPv6-to-IPv4 tunnel device. | ||
<pre> | <pre> | ||
| Line 11: | Line 15: | ||
ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1 | ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1 | ||
</pre> | </pre> | ||
| + | |||
| + | If you want to act as an IPv6 gateway, enable forwarding and add an IPv6 subnet to your internal interface. | ||
<pre> | <pre> | ||
| Line 16: | Line 22: | ||
ip -6 addr add $IPV6PRE:1::1/64 dev br-lan | ip -6 addr add $IPV6PRE:1::1/64 dev br-lan | ||
</pre> | </pre> | ||
| + | |||
| + | If you want to enable automatic address configuration, create a radvd.conf file like this. | ||
<pre> | <pre> | ||
| Line 26: | Line 34: | ||
}; | }; | ||
</pre> | </pre> | ||
| + | |||
| + | And start radvd (use -C /path/to/radvd.conf if necessary). | ||
Revision as of 17:27, 24 August 2009
Identify your IPv6 prefix.
echo $IPV4ADDR | awk -F. '{ printf("2002:%x%02x:%x%02x\
", $1, $2, $3, $4) }'
Configure your IPv6-to-IPv4 tunnel device.
iptables -I INPUT -p 41 -i eth0.1 -j ACCEPT ip tunnel add tun6to4 mode sit ttl 64 remote any local $IPV4ADDR ip link set dev tun6to4 up ip -6 addr add $IPV6PRE::1 dev tun6to4 ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1
If you want to act as an IPv6 gateway, enable forwarding and add an IPv6 subnet to your internal interface.
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding ip -6 addr add $IPV6PRE:1::1/64 dev br-lan
If you want to enable automatic address configuration, create a radvd.conf file like this.
interface br-lan {
AdvSendAdvert on;
prefix $IPV6PRE:1::0/64 {
AdvOnLink on;
AdvAutonomous on;
};
};
And start radvd (use -C /path/to/radvd.conf if necessary).
