Saturday, August 16, 2008

IPv6 - Point to Point Tunneling

WINDOWS XP
IPv6 - Point to Point on WIndows XP can be configured like this :
Install IPv6 Interface (do it on command prompt):
# netsh <enter>
# netsh> interface ipv6 <enter>
# netsh interface ipv6> install <enter>
Set the tunneling:

Create the tunnel interface:
netsh interface ipv6 add v6v4tunnel "Interface" <host-ipv4> <endpoint-ipv4>
Add IPv6 address:
netsh interface ipv6 add address "Interface" <tunnel-ipv6host>
Put IPv6 default route on the tunnel router:
netsh interface ipv6 add route ::/0 "Interface" <tunnel-ipv6endpoint>
Additional (it's used as anycast relay that's used for find the nearest router) :
netsh interface ipv6 6to4 set relay 192.88.99.1

For Example:
Interface : "Local Area Connection"
host IPv4 : 192.168.1.1
host IPv6 : 2001:10:10::1
endpoint IPv4 : 192.168.1.2
host IPv6 : 2001:10:10::2

Configuration will be like this :
#netsh interface ipv6 add v6v4tunnel "Local Area Connection" 192.168.1.1 192.168.1.2
#netsh interface ipv6 add address "Local Area Connection" 2001:10:10::1
#netsh interface ipv6 add route ::/0 "Local Area Connection" 2001:10:10::1
#netsh interface ipv6 6to4 set relay 192.88.99.1

LINUX (GENERAL)
You need login as root to use command below.

Create the tunnel interface:
# /sbin/ip tunnel add <interface> mode sit ttl <ttldefault> remote <endpoint-ipv4> local <host-ipv4>
Activate or up the interface:
# /sbin/ip link set dev <interface> up
Add IPv6 address :
# /sbin/ip -6 addr add <tunnel-ipv6host>/<prefix> dev <interface>
Put IPv6 default route on the tunnel router:
# /sbin/ip -6 route add <prefixtoroute> via <tunnel-ipv6endpoint> dev <interface> metric 1
For Example:
Interface : "Local Area Connection"
host IPv4 : 192.168.1.1
host IPv6 : 2001:10:10::1
endpoint IPv4 : 192.168.1.2
host IPv6 : 2001:10:10::2
Configuration will be like this :
# /sbin/ip tunnel add sit1 mode sit ttl 255 remote 192.168.1.2 local 192.168.1.1
# /sbin/ip link set dev sit1 up
# /sbin/ip -6 addr add 2001:10:10::1/64 dev sit1
# /sbin/ip -6 route add 2001:10:10::/64 via 2001:10:10::2 dev sit1 metric 1

DEBIAN / UBUNTU (LINUX)
You need login as root to edit the file.
you can use any editor, such as vi, vim, pico, nano, mcedit, gedit, etc.
open file /etc/network/interfaces
# vi /etc/network/interfaces
Add configuration below
auto <interface>
iface <interface> inet6 v4tunnel
address <tunnel-ipv6host>
netmask <prefix>
endpoint <endpoint-ipv4>
local <host-ipv4>
ttl <ttldefault>
up ip link set dev <interface>
up ip -6 route add <prefixroute> via <tunnel-ipv6endpoint> dev <interface>
For Example:
auto sit0
iface sit0 inet6 v4tunnel
address 2001:10:10::1
netmask 64
endpoint 192.168.1.2
local 192.168.1.1
ttl 255
up ip link set dev sit0
up ip -6 route add 2001:10:10::/64 via 2001:10:10::2 dev sit0

I hope this will be useful for you.
Thank you.

^_^

2 comments:

Anonymous said...

I every time used to read piece of writing in news papers but
now as I am a user of net therefore from now I am using
net for articles, thanks to web.

my website understanding quotes

Anonymous said...

Simply desire to say your article is as amazing.
The clarity on your post is simply excellent and that i could think you are knowledgeable in
this subject. Well with your permission let me to snatch your feed
to stay updated with forthcoming post. Thank you one million
and please carry on the gratifying work.

Feel free to visit my site kahlil gibran quotes