IPv6: A first overview [UPDATED]

I don’t remember when I heard of IPv6 the first time. Back then I tried to learn it a little bit but it was quite hard to get a working solution. When Benoit told me about a french ISP that provides native IPv6 connectivity, recently, I got attracted again by the technology. This time I spend much more time in understanding how IPv6 works and must admit that I really love the way it works. In IPv6 every machine get an unique IP address, that can be (under some circumstances that I’ll explain later) reached from every point of the world. Therefore it solves my NAT issues, so that I can access every machine in my local network from a remote host (if I would let the remote host through my firewall). As IPv6 allows autoconf, I don’t even have to configure my machines in the network, I just need to route the prefix and and announce the prefix. And: IPv6 is pretty easy to get.

Benefits

  • No NAT anymore. Just connect to your machine at home with it’s IPv6 address, so no more annoying port forwarding, redirecting, etc.
  • No DHCP setup (well at least if you trust autoconf, which frankly might not always be a good idea).
  • Use IPSec the easy way without getting NAT-traversal to work fine.
  • Use IPv6 enabled services. Sixxs.net hosts a IPv6 bittorrent tracker. and thepiratebay will hopefully get IPv6 soon Also thepiratebay.com now have native IPv6 connectivity. At least the opentracker now supports it.
  • And last but not least: believe me, if you tell people you are using IPv6, you get 100 nerd-credits. And for sure to show people off your IPv6 connection, your start site is ipv6.google.com
  • Sites that support IPv6: ipv6.google.com, ipv6.org, blog.fefe.de and many more.

IPv6 addresses
I think a good way to get started with IPv6 is understanding the new address scheme, which is different from the IPv4 scheme. Every address consist of 8 groups with 4 hexadecimal numbers per group. A group would be e.g.: 2ac0. So here is an IPv6 address:

2001:0:53aa:64c:1c36:f226:a08d:2013

Every address has a containing prefix-length, which is the first part to the address. The length of a prefix is determined by the /<BITCOUNT> suffix. E.g.:

2001:0:53aa:64c::/64

You usually get that prefix from your ISP (or a tunnelbroker). It is somewhat similar to the public IPv4 address you get assigned from your ISP. Nevertheless, as we are using IPv6, we don’t have just one fixed public IP, we have a complete subnetwork, described by the prefix. Therefore we have 2^(128-64)=2^64 bits left (the other 64 bits are taken by the prefix) to give them away to our private machines in our network. So a machine in our local network at home would have an IP address like:

2001:0:53aa:64c:1c36:f226:a08d:2013, 2001:0:53aa:64c:1c33:0:c0a3:1, etc.
Legend: Prefix, Host address.

And every of this IP address is reachable from the outside. The ISP knows that we own that prefix and routes the traffic to such a IP address to our router, which knows the IP addresses of the machines.

Getting started
Now if you want to get started with IPv6 there a few things that you have to consider.

  1. Does your ISP provide native IPv6?
  2. Do you want to route a complete subnet or just one machine?
  3. Do you have a public IPv4 address (no NAT) on your router and your router can route and announce an IPv6 prefix (like OpenWRT or something)?
  4. You are behind an NAT but you want to route a subnet?

So for 1. it’s pretty simple. Just get the router from your ISP, plug it in, run it, and be happy. 2. If have just one machine at home, so you don’t want to serve a complete subnetwork (which I consider as the most useful think of IPv6) then just install miredo and add a port forwarding rule on port 3545 to your machine. Start miredo and you will get an IPv6 address.

# apt-get install miredo
… add port forwarding rule on 3545 on the router to your maschine…
# /etc/init.d/miredo start
# ifconfig teredo
teredo Link encap:UNSPEC Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6-Adresse: fe80::ffff:ffff:ffff/64 Gültigkeitsbereich:Verbindung
inet6-Adresse: 2001:0:53aa:64c:1c36:f226:a08d:2013/32 Gültigkeitsbereich:Global
UP PUNKTZUPUNKT RUNNING NOARP MTU:1280 Metrik:1
RX packets:419 errors:0 dropped:0 overruns:0 frame:0
TX packets:448 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:500
RX bytes:382373 (382.3 KB) TX bytes:64613 (64.6 KB)

Please notice that miredo gives you a fixed IPv6 address, so you are not able to route a subnet, as you don’t have a prefix assigned to you.

If you have a router that can route IPv6 and has a public IPv4 IP address, just go and use 6to4. If you are on a Mac it has a good build-in support for 6to4.

If you want to host a subnet but you are behind a NAT, things get slightly more complicated. You need first a way to traverse your NAT and then you need a subnet. Traversing a NAT can be done with miredo, but miredo gives you a fixed IPv6 address, which is pretty useless if you want to route a subnet. A good approach would be sixxs.net. They offer free tunnels and subnets. So go, sign up and install aiccu which you can find in your software repositories. A good explanation how to setup aiccu (actually it’s pretty simple) can be found on the sixxs.net site.

If you are ready you can try your IPv6 connection by pinging the website of the Kame project, which did a great job in implementing a lot of the IPv6 tools used in the operating systems:

# ping6 www.kame.net
PING www.kame.net(orange.kame.net) 56 data bytes
64 bytes from orange.kame.net: icmp_seq=1 ttl=51 time=708 ms
64 bytes from orange.kame.net: icmp_seq=2 ttl=51 time=321 ms

Note that the IPv6 tools of traceroute and ping usually end with 6: traceroute6, ping6, etc.

More on IPv6 and how to setup an OpenWRT router to announce prefixes will be covered soon.


Internet Protocol version 6 (IPv6) is the next-generation Internet Layer protocol for packet-switched internetworks and the Internet. IPv4 is currently[update] the dominant Internet Protocol version, and was the first to receive widespread use. In December 1998, the Internet Engineering Task Force (IETF) designated IPv6 as the successor to version 4 by the publication of a Standards Track specification, RFC 2460.

Leave a Reply