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 :)