Tuesday, April 26, 2011

configuring ipv6 tunnel under linux

Legend of variables:
$ipv4a = tunnel server's IPv4 IP
$ipv4b = user's IPv4 IP
$ipv6a = tunnel server's side of point-to-point /64 allocation
$ipv6b = user's side of point-to-point /64 allocation

Using ifconfig:

ifconfig sit0 up
ifconfig sit0 inet6 tunnel ::$ipv4a
ifconfig sit1 up
ifconfig sit1 inet6 add $ipv6b
route -A inet6 add ::/0 dev sit1

Using ip:

ip tunnel add he-ipv6 mode sit remote $ipv4a local $ipv4b ttl 255
ip link set he-ipv6 up
ip addr add $ipv6b dev he-ipv6
ip route add ::/0 dev he-ipv6

No comments:

Related Posts Plugin for WordPress, Blogger...