6to4 is a transitional mechanism that allows you to transmit IPv6 packets over an IPv4 network and does not require the creation of two-way tunnels. This is usually used when the end user or site wants to get a connection to the IPv6 Internet , but cannot get it from the provider .
6to4 can be used as a separate node, or as a whole IPv6 network . At the same time, at least one “white” IPv4 address for the gateway is needed, up to 1 208 925 819 614 629 174 706 176 (2 80 ) IPv6 addresses or 65 536 (2 16 ) subnets / 64 are allocated for each IPv4 address.
Content
How 6to4 works
6to4 performs three functions:
- Allocates a block / 48 of the IPv6 address space to each node that has a global IPv4 address.
- Encapsulates IPv6 packets in IPv4 packets for transmission over an IPv4 network.
- Allows to transfer packets between 6to4 nodes and nodes with a direct connection to the IPv6 Internet .
Allocating a block of addresses
For each global IPv4 address, a 48-bit IPv6 address prefix is allocated. It can be created from an IPv4 address. The IPv4 address is placed behind the prefix 2002 :: / 16, but in hexadecimal . So the IPv6 prefix for the IPv4 address 192.0.2.4 will be equal to 2002: C000: 0204 :: / 48 .
Any IPv6 address that has the prefix 2002 :: / 16 is a 6to4 address.
Encapsulation
The 6to4 node inserts an IPv6 packet into an IPv4 packet with protocol type 41 (“IPv6 (encapsulation)”). Before sending a 6to4 packet, the node checks the destination address for belonging to the 6to4 network and, if this address corresponds to 6to4, then it extracts the IPv4 address from the 6to4 address and sends the packet to the received address.
Routing between 6to4 and other IPv6 networks
In order for 6to4 nodes to send packets to other IPv6 networks, 6to4 repeaters were created that are connected to both the IPv4 network and the IPv6 network. When a 6to4 node needs to send an IPv6 packet, it sends it to anycast address 192.88.99.1 . The repeater, receiving a 6to4 packet, retrieves the IPv6 packet and sends it over the IPv6 network. For IPv6 nodes, 6to4 nodes look like normal IPv6 nodes and the IPv6 packet will be transmitted to the nearest 6to4 relay announcing the 2002 :: / 16 network prefix.
Reverse DNS
If the site uses a static global IPv4 address, then it is possible to delegate a reverse DNS zone for the 48-bit address block received via 6to4. Registration of the reverse DNS zone is performed by the Number Resource Organization in the 2.0.0.2.ip6.arpa zone on the website 6to4.nro.net . The process is fully automated.
Setup
See also
- 6in4
- IPv6
- Teredo
- 6rd
- ISATAP
- Tunnel service
References
- B. Carpenter & K. Moore. Connection of IPv6 Domains via IPv4 Clouds . RFC 3056 , February 2001.
- R. Gilligan & E. Nordmark. Transition Mechanisms for IPv6 Hosts and Routers . RFC 2893 , August 2000.
- C. Huitema. An Anycast Prefix for 6to4 Relay Routers . RFC 3068 , June 2001.
- P. Savola & C. Patel. Security Considerations for 6to4 . RFC 3964 , December 2004.