Friday, 10 July 2015

IPv6 tunneling over IPv4 - 6to4 Autotunnel

In the previous post, we looked at the IPv6 tunneling technique using IPv4 manual tunnels. We will now see how dynamic multipoint IPv6 tunnel works.

6to4 tunnels allow for the dynamic creation of IPv6 within IPv4 tunnels. Manual tunnel is normally used as point-to-point however 6to4 tunnels can be point-to-multipoint.

The 2002::/16 range has been reserved to use for tunneling. We will have to add the IPv4 address into this range to generate /48 prefix. i.e. if the IPv4 address of the border router is 192.168.1.1 then the 6to4 site address prefix becomes 2002:C0A8:101::/48 (Convert 192.168.1.1 to Hex which results in C0A8:0101)

We will work on the same topology we used in the previous post.






so R1, R2 and R3 have IPv4 reachability through EIGRP. Our aim is to establish connectivity between loopback interfaces configured with IPv6 addresses on R1 and R3.

In order to build 6to 4 tunnel between R1 and R3, we have to create tunnel interfaces on each of them and make sure we configure appropriate IPv6 address that coordinates with underlying IPv4 address.


On R1, the IPv4 address on the fastethernet0/0 interface is 10.1.12.1. We need to convert the decimal into hex which is A01:C01 so the IPv6 address is going to be 2002:A01:C01::/48. 

There is an easy way of generating the IPv6 prefix on IOS by using a specific command "ipv6 general-prefix".



Let's configure tunnel interface on R1


There is no tunnel destination as it will be dynamically determined by the embedded IPv4 address. We will also have to configure static route indicating that the tunnel will route all the 2002::/16 prefix.


Now let's do similar configuration on R3. 


 


From R1, we can now ping R3's tunnel interface.


This means that we can now configure static routes to reach loopback IPs by using tunnel IP addresses as the next hop.

The wireshark packet capture shows how destination IPv4 address gets derived from IPv6 address.
















Now on R1, we will configure a static route with destination as R3's loopback (2001:3333::3/128) with the next hop as R3's tunnel IP (2002:A01:1703::3).


Similarly on R3, we will configure a static route with destination as R1's loopback (2001:1111::1/128) with the next hop as R1's tunnel IP (2002:A01:C01::1).


We can now do end to end reachability test between Loopback interface of R1 and R3.


What if there are multiple network connected to R1 and R3 and configuring static routes is not a feasible option?

We cannot run an IGP between R1 and R3 as the tunnel interfaces are on different subnet! but we can still run BGP between between the routers and exchange routing information.






R1's routing table now shows the prefix 2001:3333::3/128 learned via BGP.


We can also verify the end to end connectivity between loopbacks.


More information on the various tunneling techniques can be found here 
http://www.cisco.com/c/en/us/td/docs/ios/ipv6/configuration/guide/12_4t/ipv6_12_4t_book/ip6-tunnel.html

No comments:

Post a Comment