An automatic 6to4 tunnel allows isolated IPv6 domains to be connected over an IPv4 network to other isolated IPv6 networks. One of the key difference between automatic 6to4 tunnels vs manually configured tunnels is that the tunnel itself is not a Point-to-Point, but rather a Point-to-Multipoint tunnel. With automatic 6to4 tunnels, routers are not configured as Point-to-Point because they treat the IPv4 infrastructure as a virtual NBMA link. The IPv6 address is encapsulated within the IPv4 packet which is used to find the other end of the automatic tunnel. One of the major drawback of using Automatic 6to4 tunneling is it’s inability to be dynamically routed. This where IPv6 ISTAP is a more suitable solution. 

RFC 3056    

Full Mesh Equation

  • m = n ( n – 1 ) / 2

For example let’s say we have a total of 7 isolated IPv6 domains. How many total tunnels would be required in order to form a full mesh.?

  • m = 7 ( 7 – 1 ) / 2 = 21

Key Features

  • Reserved IPv6 Automatic 6to4 Tunnel address range: 2002::/16
  • Uses protocol 41 in place of the standard GRE protocol
  • When converting from IPv6 to IPv4 only bits 1748 are used
  • Does not support dynamic routing protocols

The following is the conversion from IPv4 to IPv6 on routers R2 – R5. I’ll take the actual IPv4 address of all four routers, and convert. The first step will be to convert the IPv4 decimal address to binary, and from there we will convert it to HEX. I’m simply doing this just doing so you can see the full decimal to hex conversion.

R2

  • 10.1.2.2/30
  • 0000 1100 0000 0001 0000 0010 0000 0010  
  •     0       A       0      1       0       2       0       2
  • 2002:0A01:0202::/128
  • 2002:A01:202::/128

R3

  • 10.1.3.2/30
  • 0000 1100 0000 0001 0000 0011 0000 0010
  •     0       A      0       1        0       3       0      2
  • 2002:0A01:0302::/128
  • 2002:A01:302::/128

R4

  • 10.1.4.2/30
  • 0000 1100 0000 0001 0000 0100 0000 0010
  •     0       A      0       1        0       4       0      2
  • 2002:0A01:0402::/128
  • 2002:A01:402::/128

R5

  • 10.1.5.2/30
  • 0000 1100 0000 0001 0000 0101 0000 0010
  •     0       A      0       1        0       5       0      2
  • 2002:0A01:0502::/128
  • 2002:A01:502::/128

Lets get started with the configuration of the Point-to-Point interfaces on Router R1. I’m not going to be using an IGP such are RIP, EIGRP, or OSPF for this example, so we will need to configure the necessary static routes on routers R2 – R5.

R1#configure terminal
R1(config)#interface s1/0
R1(config-if)#ip address 10.1.2.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#interfaces s1/1
R1(config-if)#ip address 10.1.3.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#interfaces s1/2
R1(config-if)#ip address 10.1.4.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#interface s1/3
R1(config-if)#ip address 10.1.5.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#end
R1#

Next lets move onto router R2 using the conversion table above for the IPv4 to IPv6 addresses. Will need to add the necessary static route for IPv6, along with IPv4.

R2#configure terminal
R2(config)#interface s1/0
R2(config-if)#ip address 10.1.2.2 255.255.255.252
R2(config-if)#no shutdow
R2(config-if)#interface tunnel 0
R2(config-if)#ipv6 address 2002:A01:202::/128
R2(config-if)#tunnel source 10.1.2.2
R2(config-if)#tunnel mode ipv6ip 6to4
R2(config-if)#exit
R2(config)#ipv6 route 2002::/16 tunnel0
R2(config)#ip route 0.0.0.0 0.0.0.0 10.1.2.1
R2(config)#end
R2#

Now lets do the same thing for router R3 – R5.

R3#configure terminal 
R3(config)#interface s1/0 
R3(config-if)#ip address 10.1.3.2 255.255.255.252 
R3(config-if)#no shutdown 
R3(config-if)#interface tunnel 0 
R3(config-if)#ipv6 address 2002:A01:302::/128 
R3(config-if)#tunnel source 10.1.3.2 
R3(config-if)#tunnel mode ipv6ip 6to4 
R3(config-if)#exit 
R3(config)#ipv6 route 2002::/16 tunnel0 
R3(config)#ip route 0.0.0.0 0.0.0.0 10.1.3.1 
R3(config)#end 
R3#

Moving on to router R4.

R4#configure terminal 
R4(config)#interface s1/0 
R4(config-if)#ip address 10.1.4.2 255.255.255.252 
R4(config-if)#no shutdown 
R4(config-if)#interface tunnel 0 
R4(config-if)#ipv6 address 2002:A01:402::/128 
R4(config-if)#tunnel source 10.1.4.2 
R4(config-if)#tunnel mode ipv6ip 6to4 
R4(config-if)#exit 
R4(config)#ipv6 route 2002::/16 tunnel0 
R4(config)#ip route 0.0.0.0 0.0.0.0 10.1.4.1 
R4(config)#end 
R4#

Last, but not least lets finish up with router R5 configuration.

R5#configure terminal 
R5(config)#interface s1/0 
R5(config-if)#ip address 10.1.5.2 255.255.255.252 
R5(config-if)#no shutdown 
R5(config-if)#interface tunnel 0 
R5(config-if)#ipv6 address 2002:A01:502::/128 
R5(config-if)#tunnel source 10.1.4.2 
R5(config-if)#tunnel mode ipv6ip 6to4 
R5(config-if)#exit 
R5(config)#ipv6 route 2002::/16 tunnel0 
R5(config)#ip route 0.0.0.0 0.0.0.0 10.1.5.1 
R5(config)#end 
R5#

At this point we should have full IPv6 connectivity between routers R2, R3, R4, and R5. From router R2 lets see if we can reach routers R3, R4, and R5 via IPv6.

R2#ping 2002:a01:302:: repeat 10
Type escape sequence to abort.
Sending 10, 100-byte ICMP Echos to 2002:A01:202::, timeout is 2 seconds:
!!!!!!!!!!
Success rate is 100 percent (10/10), round-trip min/avg/max = 56/59/60 ms
R2#ping 2002:a01:402:: repeat 10 
Type escape sequence to abort. 
Sending 10, 100-byte ICMP Echos to 2002:A01:202::, timeout is 2 seconds: 
!!!!!!!!!! 
Success rate is 100 percent (10/10), round-trip min/avg/max = 56/59/60 ms
R2#ping 2002:a01:502:: repeat 10
Type escape sequence to abort. 
Sending 10, 100-byte ICMP Echos to 2002:A01:202::, timeout is 2 seconds: 
!!!!!!!!!! 
Success rate is 100 percent (10/10), round-trip min/avg/max = 56/59/60 ms
R2#

I hope you found this post on Automatic 6to4 Tunneling helpful and informative. Be sure to let me know what you think by leaving suggestions, and feedback in the comments section below. You can find out more about these and other articles be checking out recent posts and archives. To learn more about me be sure to check out the About page. And as always thanks again for visiting The Packet.