IPv6 tunneling over IPv4 Configuration

Since IPv4 and IPv6 are not compatible with each other we need some migration strategies. One technique that we can use is tunneling. Basically it means that we encapsulate IPv6 packets into IPv4 packets (or the other way around) so that it can be routed. In this lesson I’ll show you how to configure IPv6 static tunneling over an IPv4 network, there are two methods:

  • Manual tunnels
  • GRE (Generic Routing Encapsulation) tunnels

Both tunnel types are very similar with just minor differences. Both support IPv6 IGPs through the tunnel interface and forwarding of multicast traffic. The manual tunnels refer to RFC 4213 which defines how to encapsulate IPv6 packets in IPv4. GRE is a generic encapsulation type that rides on top of IPv4 and isn’t only for IPv6. It can carry many different protocols and if you ever configured an IPSEC VPN with IGPs running through it you had to use GRE.

Let’s continue by looking at some examples and how to configure the static point-to-point IPv6 tunnels.

ipv6 static tunneling

This is the topology we’ll be using. Three routers are running IPv4. R1 and R3 also run IPv6 and we want connectivity between them without adding IPv6 support on R2.

R1(config)#interface loopback 0
R1(config-if)#ipv6 address 2001::1/128
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address
R2(config)#interface fastEthernet 1/0
R2(config-if)#ip address
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address
R3(config)#interface loopback 0
R3(config-if)#ipv6 address 2001::3/128

First we’ll fix the IPv4 and IPv6 addresses on the interfaces. Next step is to create a tunnel interface between R1 and R3. They need to be able to reach each other through IPv4.

R1(config)#interface loopback 1
R1(config-if)#ip address
R1(config)#router eigrp 123
R1(config-router)#no auto-summary 
R2(config)#router eigrp 123
R2(config-router)#no auto-summary 
R3(config)#interface loopback 1
R3(config-if)#ip address
R3(config)#router eigrp 123
R3(config-router)#no auto-summary 

I’ll create a new loopback interface on R1 and R3. I’ll use these loopback interfaces to establish a tunnel interface between the two routers. I could also use physical interfaces but they can go down. Whenever a physical interface goes down our IGP (EIGRP in this example) could find another path (if there is another path).

R1(config)#interface tunnel 0
R1(config-if)#tunnel source loopback 1
R1(config-if)#tunnel destination
R1(config-if)#tunnel mode ipv6ip
R3(config)#interface tunnel 0
R3(config-if)#tunnel source loopback 1
R3(config-if)#tunnel destination
R3(config-if)#tunnel mode ipv6ip

This is how we configure a tunnel interface. By default a tunnel interface is always GRE so by using the tunnel mode ipv6ip command I changed it to a “manual” tunnel per RFC 4213. You can also configure the tunnel interface between the physical interfaces but I like to use loopback interfaces. This will make sure that when a physical interface fails your IGP will try to find another route to the loopback interface of your neighbor.

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 739 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

542 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: ,

Forum Replies

  1. If you need some help with this, it’s best to your topology and configs on the GNS3Vault forum. We can take a look there…

  2. Hello Mitchell

    Yes, it is possible to encapsulate IPv4 inside an IPv6 tunnel. What Rene has described in this lesson is colloquially referred to as 6in4. What you are referring to is 4in6 which is equally achievable.

    You can find out more information about such a tunnel from the following Cisco Documentation.

    I hope this has been helpful!


  3. The major differences:

    MCT - MTU is 1480, less overhead, supports only a single passenger protocol, mode is ipv6ip.

    GRE - MTU is 1476, more overhead, supports multiple passenger protocols, mode is gre.

  4. It has. Thank you very much for your reply!

  5. Hello Giovanni

    The General Prefix is a feature that is used to easily migrate a router’s IPv6 addresses from one general prefix to another. If you’re not sure what a general prefix is, then that sentence probably sounds cryptic. Take a look at this lesson to find out more about it and it should make sense.


    Now in this particular case, the general prefix feature is being used on an interface that is performing 6to4 tunneling. Specifically, what the command does is (according to Cisco):

    Defines a general pr

    ... Continue reading in our forum

20 more replies! Ask a question or join the discussion by visiting our Community Forum