Thursday, June 2, 2011

IPv6 over IPv4 tunneling - IPv6to4

All were talking about IPv6 day and all the gaints were participating in IPv6 Day. Therefore I also want to feel the IPv6.

I created a tunnel with Hurricane and got an IPv6 address. However inorder to get this working we need to establish a tunnel to one of the Hurricane's Server.
My OS is Fedora 10 and I did following steps to enable IPv6 and IPv6to4 Tunnelling in my PC.

(If you also want to do, just execute following 4 lines in your Terminal as super user.

echo "NETWORKING_IPV6=yes" >> /etc/sysconfig/network
echo "IPV6_DEFAULTDEV=tun6to4">> /etc/sysconfig/network
echo "IPV6INIT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0
echo "IPV6TO4INIT=yes">> /etc/sysconfig/network-scripts/ifcfg-eth0

In addition to that I created following script :

/etc/sysconfig/network-scripts/ifcfg-sit1

and added following content,

OOTPROTO="none"
DEVICE="sit1"
IPV6INIT=yes
IPV6TUNNELIPV4=xx.xx.xx.xx
IPV6TUNNELIPV4LOCAL=yy.yy.yy.yy
IPV6ADDR="2001:xxx:x:xxx::x/64"
ONBOOT=yes

After this the tunnel was established and everything was working fine.

References :
http://fedoraproject.org/wiki/IPv6Guide
http://unix.stackexchange.com/questions/7720/how-do-i-set-up-an-ipv6-tunnel-in-fedora

2 comments:

K. Sethu | கா. சேது said...

Enlightening post.

//IPV6TUNNELIPV4=xx.xx.xx.xx
IPV6TUNNELIPV4LOCAL=yy.yy.yy.yy
IPV6ADDR="2001:xxx:x:xxx::x/64"//

One of the sites you referred to:

http://unix.stackexchange.com/questions/7720/how-do-i-set-up-an-ipv6-tunnel-in-fedora

mentions the following:

//For the remote tunnel endpoint (xx.xx.xx.xx), it can be found on the tunnelbroker.net site , and the local one (yy.yy.yy.yy) is just my internal (behind NAT) IPv4 address.//

1) I understood the local one (yy.yy.yy.yy) being internal (behind NAT) in my Linux box with ADSL via router as not the IP of the router but as that of the desktop I am operating (Fedora 15 with - during this session with 192.168.0.3 dished out by router's DHCP). Am I right or is it IP address of the router which is dynamic set by SLT's server?

2) As for yy.yy.yy.yy I visited tunnelbroker.net site but don't see any IP address mentioned for the purpose. Or do we have to sugn up for an user account with themn to get IP for tunne end point?

3) Then what are "xxx:x:xxx::x" seen as part of IPV6ADDR="2001:xxx:x:xxx::x/64"

TIA

~Sethu

பாவி said...

1.
Yes. It should be your Linux box address - yy.yy.yy.yy=192.168.0.3. Because the tunnel should be established end-to-end.

2.
xx.xx.xx.xx or yy.yy.yy.yy?

We need to sign up to establish the tunnel. After signing up, it will give us the xx.xx.xx.xx and other info.

3.
2001:xxx:x:xxx::x/64 is the IPv6 address we get when sign up. That will be the Global IPv6 address of our PC. Anyone can use that to reach us!

Hope I answered your questions :)

Sarves