2011/04/30

Tunnelling ipv4 over ipv6


Teredo Tunneling in Windows

Teredo is a tunnelling technology invented to solve the problem of IPV4 network address translation (NAT). NAT does not work well with tunnelling technologies. Since a large number of users on the Internet sit behind a router with a private IP address, developers had to come up with a solution to do this. NAT does not allow forwarding of many types of payload within the IPV4 header. Since IPv6 is the payload of the IPv4 header this is bound to cause problems. 6to4 tunnelling supports NAT as long as the router is running 6to4 and NAT in the same router.An IPv6 network will no longer need NAT, but since it is very widely deployed Teredo is a temporary solution to this problem. Teredo works on UDP. Since Teredo was developed to support NAT it has to possess unique global IPv4 addresses. This technique is host-to-host based, which means it is only concerned with end-to-end connections. The global IPv6 prefix for Teredo is 2001:0000:/32. The address contains both the Teredo server and client address. To route IPv6 packets using Teredo, a client needs to send a packet to a Teredo server. The Teredo server then forwards the pack to a Teredo relay, the packet is then sent to the destination node. The 16 bit flag field holds information on the type of NAT that is needed to bypass.
 So once the teredo client is set on your WindowsXP box, you get the power of ipv6 on your box.
First check the teredo availability as follows:-
  • Install IPv6 with the netsh interface ipv6 install command. Windows Firewall protects the user's computer from unsolicited incoming IPv6 traffic in the same way as IPv4 traffic.
  • Enable Teredo with the netsh interface ipv6 set teredo client command.
Firing up the Teredo client is very simple,just follow the steps:-


  • Go to Start > Run
  • Type cmd click OK
  • At the command prompt type netsh and press enter
  • At the netsh prompt type set teredo client <server address or IPv4 IP> and press enter
  • Windows should respond with ok.
  • Type commit and press enter.
  • Type exit and press enter.
  • Close the command prompt. 
Now check your teredo setup by opening a browser and entering the URL: ipv6.google.com. If it works you have configured Teredo correctly and you can now browse pages and use resources irrespective of whether the server has an IPv4 or IPv6 address.
Currently the flavours of Microsoft Windows that support Teredo/ipv6 tunneling are
Several implementations of Teredo are currently available:
  • Windows XP SP2 includes a client and host-specific relay (also in the Advanced Networking Pack for Service Pack 1).
  • Windows Server 2003 has a relay and server provided under the Microsoft Beta program.
  • Windows Vista and Windows 7 have built-in support for Teredo with an unspecified extension for symmetric NAT traversal.
Checkout following video links for more on teredo:
Tererdo part-1
win7 teredo
Teredo part-2 
Find out more on Youtube...

Miredo Tunneling in Linux

Miredo is a daemon program providing a Teredo tunnel service compatible with the "Teredo:Tunneling IPv6 over UDP through NATs" Internet proposed standard (RFC 4380). It can provide either Teredo client or Teredo relay functionality. 

Note: You require root privileges for installing miredo. 

Get to your command prompt and follow... 
# su -
# apt-get install miredo-server
# vim /etc/miredo-server.conf

-- fill in the correct bind address --

# vim /etc/default/miredo-server

-- uncomment START_MIREDO_SERVER=... --

# /etc/init.d/miredo-server restart

--
 
OR
First, compile and install Miredo. Refer to INSTALL for detailed instructions. 
Miredo can be installed the usual way:

# ./configure
# make
# su
# make install
 
Miredo has no particular required dependencies, besides the usual
C/C++ compilers and development libraries.

  A sample configuration file is automatically installed at
/usr/local/etc/miredo.conf - unless the file already existed (which
means you are probably reinstalling or upgrading Miredo).
Starting the program:
----------------------
  Before you start, please note that Miredo must be started by root,
and that it will detach and run in the background. If something goes
wrong, there are two ways two know what :
-read your system logs (typically /var/log/syslog),
-force Miredo to run in the foreground (thats meant for debugging) by
starting it with the --foreground command line parameter, and
  wait for about 20 seconds.

  You can now run miredo (as root!):
# /usr/local/sbin/miredo
 
It will need some time to initialize, particularly if you are behind
a restricted NAT, which is frequent. After about 20 seconds, you should
have access to the IPv6 Internet through Teredo, with a public Teredo
IPv6 address on the networking interface :

# ifconfig teredo
teredo    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00...
          inet6 addr: 2001:0:8ac3:9ddd:0:7ffa:ad80:3464/32 Scope:...
          inet6 addr: fe80::5445:5245:444f/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP  MTU:1280  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:468 (468.0 b)  TX bytes:560 (560.0 b)

# ping6 -c 4 www.kame.net
PING www.kame.net(orange.kame.net) 56 data bytes
64 bytes from orange.kame.net: icmp_seq=1 ttl=50 time=558 ms
64 bytes from orange.kame.net: icmp_seq=2 ttl=50 time=585 ms
64 bytes from orange.kame.net: icmp_seq=3 ttl=50 time=562 ms
64 bytes from orange.kame.net: icmp_seq=4 ttl=50 time=552 ms

--- www.kame.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 552.830/564.865/585.031/12.218 ms

Monitoring:
------------
If you wish to monitor the Teredo tunnel, I suggest you use famous
network analyzer Wireshark (formerly Ethereal) which includes a Teredo
dissector.

Teredo relay and/or server:
----------------------------
Please refer to the sample configuration miredo.conf-dist for further
information. You can get a comprehensive reference of all possible
options in the manual pages provided with the package:
miredo(8) and miredo.conf(5)

# man 8 miredo
# man 5 miredo.conf
For other ways of setting up IPv4-in-IPv6 tunnels refer:
http://tldp.org/HOWTO/Linux+IPv6-HOWTO/x1366.html

For Teredo Tunnelling in MacOSx please refer: http://www.deepdarc.com/miredo-osx/

2011/04/29

What is ipv6??

So what is all this hype about ipv6??
IP, the Internet Protocol, is one of the pillars which supports the Internet. Almost 20 years old, first specified in a remarkably concise 45 pages in RFC 791, IP is the network-layer protocol for the Internet.
ipv6 a.k.a. IPng (Next Generation) is an upgraded version of ipv4.

IPv6 is designed to solve the problems of IPv4. It does so by creating a new version of the protocol which serves the function of IPv4, but without the same limitations of IPv4. IPv6 is not totally different from IPv4: what you have learned in IPv4 will be valuable when you deploy IPv6. The differences between IPv6 and IPv4 are in five major areas: addressing and routing, security, network address translation, administrative workload, and support for mobile devices. IPv6 also includes an important feature: a set of possible migration and transition plans from IPv4.

So What’s In It?
Even if you’ve never studied IPv6, you may know about its most famous feature: big addresses. IPv4 uses 32-bit addresses, and with the growth of the Internet, these have become a scarce and valuable commodity. Organizations have gone to great lengths to deal with the shortage and high cost of IPv4 addresses. The most visible change in IPv6 is that addresses balloon from 32-bits to 128-bits.
Feature
Change
Address Space Increase from 32-bit to 128-bit address space
Management Stateless autoconfiguration means no more need to configure IP addresses for end systems, even via DHCP
Performance Predictable header sizes and 64-bit header alignment mean better performance from routers and bridges/switches
Multicast/Multimedia Built-in features for multicast groups, management, and new "anycast" groups
Mobile IP Eliminate triangular routing and simplify deployment of mobile IP-based systems
Virtual Private Networks Built-in support for ESP/AH encrypted/authenticated virtual private network protocols; built-in support for QoS tagging

The address range is huge.While IPv4 allows 32 bits for an Internet Protocol address, and can therefore support 232 (4,294,967,296) addresses, IPv6 uses 128-bit addresses, so the new address space supports 2128 (approximately 340 undecillion or 3.4×1038) addresses. This expansion allows for many more devices and users on the internet as well as extra flexibility in allocating addresses and efficiency for routing traffic. It also eliminates the primary need for network address translation (NAT), which gained widespread deployment as an effort to alleviate IPv4 address exhaustion.

So now you its gonna be tough to remember the ip addresses. For e.g., the ipv4 was 32-bit & represented like 74.125.236.80  which now would be something like 2001:4860:0:1001::68(pretty hard to remember huhnn..).


          You can see ipv6.google.com is resolving to an IPv6 address.
For now,keep googling on ipv4.Will be back with some more on ipv6.