3

I'm not sure if I get the idea of 6to4 mechanism.

The way I see it: if we have two IP v6 hosts that would like to communicate and all of the internet was IP v6, there would be no problem.

However, if there's an IPv4 network on the path from IPv6 host A to IPv6 host B, then apparently it's a problem 6to4 tries to solve. But what is this problem exactly? If I send a packet from IPv6 host A to IPv6 host B, then the only issue I can think of is that routers in IPv4 network don't udnerstand IPv6 addresses = no way to route the packet to host B properly. Anything else? I think 6to4 is not about allowing IPv6 hosts to 'talk' with IPv4 ones, which is what the article emphasised.

If the above is true, then we would like to somehow convert IPv6 address of host B to an IPv4 address the IPv4 routers can understand - then IPv4 routers will be able to route the packet to host B. But, for some reason, the wikipedia article I linked to says:

For example, the global IPv4 address 192.0.2.4 has the corresponding 6to4 prefix 2002:c000:0204::/48. This gives a prefix length of 48 bits, which leaves room for a 16-bit subnet field and 64 bit host addresses within the subnets.

I just don't get it. We want to convert IPv6 address to IPv4 one, but the quote says the opposite!

Ok, but even if we need that, the IPv6 address has 128 bits. The first 48 bits in the conversion above will be 2002:c000:0204::/48, and the rest is for subnet field and 64 bit host addresses within the subnets - what subnet field and what host addresses within what subnets? Could anyone explain what are the remaining 80 bits used for?

6

You are correct that 6to4 is for allowing IPv6 hosts (actually whole networks of IPv6 hosts) to talk to other IPv6 hosts. It does that by doing automatic tunnelling: putting the IPv6 packet into an IPv4 packet. This is done by a router that has both IPv4 and IPv6. That IPv4 packet can then be transmitted over the IPv4 internet (which doesn't know how to handle IPv6 at all) to another router that has both IPv4 and IPv6. The IPv4 wrapper is taken off, and the IPv6 packet can travel to its destination.

This is just basic tunnelling. What makes 6to4 so special? It is that the IPv4 address of the router is communicated inside the IPv6 prefix. For example: the address between 2002:c000:0204:0000:0000:0000:0000:0000 and 2002:c000:0204:ffff:ffff:ffff:ffff:ffff can be reached by wrapping (encapsulating) the IPv6 packet inside an IPv4 packet and sending that packet to IPv4 address 192.0.2.4 (c0=192, 00=0, 02=2, 04=4). That makes it possible for people whose provider doesn't give them IPv6 but does give them a public IPv4 address to get their own IPv6 addresses. With a /48 you can create 65536 subnets (which are a /64 each).

The problem occurs when communicating with systems that have 'normal' IPv6 addresses. Such addresses don't have an IPv4 address encoded in the IPv6 address and therefore the 6to4 router doesn't know which IPv4 address to send the packets to. So it has to send them to a 3rd-party relay that is connected to the normal IPv6 internet. The quality of such relays is very unpredictable, and therefore the connectivity to the normal IPv6 internet is often bad. Therefore such deployment of 6to4 is deprecated (see RFC7526).

If you want IPv6 access then first complain to your ISP. If they don't want to provide IPv6 then find a decent ISP that does. If you can't get IPv6 from an ISP then you should look at i.e. tunnelbroker.net. They provide free IPv6 tunnels with proper connectivity. It's not optimal, but it's much much better than unreliable 6to4.


Based on the chat discussion some extra information:

6to4 is an obsolete technology. It was meant to give IPv6 addresses and routeability to people whose ISP didn't provide proper IPv6. A quick overview:

  • you need a device with a public IPv4 address
  • From that IPv6 address you derive a /48 prefix to use with 6to4
  • so my address (37.77.56.75) would become 2002:254d:384b::/48
  • that prefix can then be used to provision my whole house/business/etc with IPv6
  • that is where you need subnetting
  • the device with the public IPv4 address is the gateway between my internal IPv6 network and the rest of the IPv6 world
  • and your LANs are numbered out of that 2002:....:....::/48 prefix

And that's it basically :)

The problem with 6to4 is that it needs 3rd-party relays on the internet to relay between the IPv4 internet (to which your 6to4 gateway is connected) and the real IPv6 internet. And you usually have no control over which relays are used for your outbound traffic, and you certainly never have control over which relays are used for your inbound traffic. This causes many many problems with reliability. Connectivity to some IPv6 sites may work, to others it may not, or performance is really unpredictable etc etc etc.

So it is therefore better use i.e. tunnelbroker.net. They provide proper tunnels straight to the real IPv6 internet :)

  • IPv4 address of the router is communicated inside the IPv6 prefix - address of what router? The one that is on the path between my IPv6 hosts and sits inside an IPv4 network? – user4205580 Dec 5 '15 at 8:17
  • The one that has a public IPv4 address and provides IPv6 connectivity to your network. You need to have one of those to use 6to4 :) – Sander Steffann Dec 5 '15 at 10:30
  • In other words, the one that connects IPv6 network and IPv4 network? – user4205580 Dec 5 '15 at 10:37
  • 1
    I think you mean the IPv6 islands on the left and right. Yes – Sander Steffann Dec 6 '15 at 13:00
  • 2
    Yes, that's what a prefix is :) – Sander Steffann Dec 6 '15 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.