Tuesday 30 June 2015

IPv6 tunneling over IPv4 - Manual Tunnel

We know that IPv4 and IPv6 addresses are not compatible with each other. Let's say the existing infrastructure is running on IPv4. If we need to implement IPv6 on few of the hosts, we need to use some sort of a technique for IPv6 hosts to communicate with each other using existing IPv4 network. One of the ways we can achieve this is by using a tunneling method.

In this post we will see how we can implement "Manual Tunnel". 

As shown in the diagram below, we have R1, R2 and R3 connected with each other. 



All three routers are running EIGRP and there is an IPv4 reachability from R1 to R3.




I will configure a new loopback interface on R1 and R3 and assign IPv6 address.




Our aim is to establish connectivity between these two loopbacks using the existing IPv4 network.

We will now configure tunnel interface on R1. We will configure an IPv6 address on the interface and set the source and destination of the tunnel.



The tunnel source is the local interface. The destination is IPv4 address of R3. By default the tunnel mode is GRE so we have change it to "ipv6ip" (RFC 4213).

Let's apply similar config on R3.



We can test the connectivity between tunnel end points



Here is the packet capture of one of ICMP packets

 We can see that the outer IP header consists of IPv4 source and destination addresses. IPv6 header is encpasulated within IPv4 header.

Now on R1 and R3, we will enable RIPng on tunnel interface and loopback interface. 


R1 has now started receiving R3's loopback through RIPng.




We can also see that the connectivity has been established.



We have used tunnel mode "IPv6IP" (manual tunnel) in this example. The same can be achieved using tunnel mode "GRE".


The main difference is that GRE header is bigger in size and it can carry protocols other than IP e.g. if you want to carry IS-IS traffic and IPv6 over the tunnel then you will need protocol field of the GRE header to identify the traffic.

In our next post we will see how we can configure dynamic IPv6 6to4 tunnel.

No comments:

Post a Comment