# How to configure IPv6 Automatic 6to4 Tunneling

**URL:** https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959
**Category:** Lessons Discussion
**Created:** [December 24, 2016, 6:43pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959 "2016-12-24T18:43:11Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 24, 2016, 6:43pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/1 "2016-12-24T18:43:11Z")

</div>

This topic is to discuss the following lesson:

> **[IPv6 Automatic 6to4 Tunneling](https://networklessons.com/ipv6/how-to-configure-ipv6-automatic-6to4-tunneling)**
>
> IPv6 Automatic 6to4 Tunneling automatically creates an IPv6 over IPv4 tunnel. I will show you how this works on Cisco IOS routers.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [May 14, 2013, 1:56pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/2 "2013-05-14T13:56:41Z")

</div>

Nice write-up. I think what would be cool is a follow-up blog entry on why the 6to4 automatic tunnels should NOT be used today in anything other than the lab networks. The 6to4 mechanism itself is pretty cool but it can create the problems if used for one’s real-world live traffic. Managed tunnels, if one has to use tunnels, are a much better approach.

---

<div class="post-metadata">

### Author: ![system](https://cdn-forum.networklessons.com/uploads/default/original/1X/1d2ef66728c7fbac8377748594345a3f474fce5f.png) [@system](https://forum.networklessons.com/u/system)
#### Post date: [April 18, 2014, 10:25am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/3 "2014-04-18T10:25:00Z")

</div>

Is it possible if we use dynamic routing protocol instead of static route for both of ipv6 segments ?

```auto
Futura(config)#ipv6 route 2001::3/128 2002:C0A8:1703::3   
Futura(config)#ipv6 route 2002::/16 tunnel 0

```

```auto
Destiny(config)#ipv6 route 2001::1/128 2002:C0A8:C01::1   
Destiny(config)#ipv6 route 2002::/16 tunnel 0

```

or we just use static route for ipv6 route 2002::/16 tunnel 0 as recursive routing whereas for segment ipv6 2001::YY/128 we use dynamic route.

Is it possible ? please advice me.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [May 1, 2014, 12:29pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/4 "2014-05-01T12:29:57Z")

</div>

Hi Andria,

For the automatic 6to4 tunneling we can’t use dynamic routing on the Tunnel interfaces. If you have a lot of IPv6 prefixes, it’s better to create some tunnels yourself and configure EIGRP or OSPFv3 on it.

Rene

---

<div class="post-metadata">

### Author: ![jolramospr](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@jolramospr](https://forum.networklessons.com/u/jolramospr)
#### Post date: [June 25, 2015, 4:12am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/5 "2015-06-25T04:12:44Z")

</div>

Great explanation and example!!!

I did the same scenario using BGP instead of static routing.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [June 25, 2015, 11:43am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/6 "2015-06-25T11:43:07Z")

</div>

Glad to hear you like it Jose! BGP will also work, I used the static routes for this example to keep it simple.

---

<div class="post-metadata">

### Author: ![dimitriou.ch](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@dimitriou.ch](https://forum.networklessons.com/u/dimitriou.ch)
#### Post date: [February 8, 2016, 12:59pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/7 "2016-02-08T12:59:21Z")

</div>

Hi Rene,

I’m doing the configuration, but when i tried to configure the static routes I’m getting this error:

```auto
R1(config)#ipv6 route 2001:1111:2222:5555::1/128 2002:101:101::1
% Not allowed to point static routes through yourself

```

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [February 9, 2016, 3:09pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/8 "2016-02-09T15:09:38Z")

</div>

Hi Charalambos,

The next hop should be the next hop of the remote router, not your own router. Otherwise you are telling the router that in order to reach a network it has to go to its own address…that’s not going to work 🙂

Directly connected networks are already in the routing table by default.

Rene

---

<div class="post-metadata">

### Author: ![Fabian\_Martinez1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/f/8797f3/32.png) [@Fabian\_Martinez1](https://forum.networklessons.com/u/Fabian_Martinez1)
#### Post date: [April 5, 2016, 1:42am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/9 "2016-04-05T01:42:37Z")

</div>

Hello,

Why did we change the prefix here?

`Futura#show ipv6 general-prefix
IPv6 Prefix MYPREFIX, acquired via 6to4
2002:C0A8:C01::/48&lt;--------------`

`Destiny#show ipv6 general-prefix
IPv6 Prefix MYPREFIX, acquired via 6to4
2002:C0A8:1703::/48&lt;------`

`Futura(config)#interface tunnel 0
Futura(config-if)#ipv6 address 2002:C0A8:C01::1/64 &lt;----------
Futura(config-if)#tunnel source fastEthernet 0/0
Futura(config-if)#tunnel mode ipv6ip 6to4`

`Destiny(config)#interface tunnel 0
Destiny(config-if)#ipv6 address 2002:C0A8:1703::3/64
Destiny(config-if)#tunnel source fastEthernet 0/0
Destiny(config-if)#tunnel mode ipv6ip 6to4`

Thanks

---

<div class="post-metadata">

### Author: ![andrew](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/andrew/32/645_2.png) [@andrew](https://forum.networklessons.com/u/andrew)
#### Post date: [April 5, 2016, 8:56pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/10 "2016-04-05T20:56:17Z")

</div>

Fabian,  
The IPv6 RFC has set aside the address space of 2002::/16 for Automatic 6to4 Tunneling. As you know, when you convert the 32-bit IPv4 address to hex to get the specific 6to4 prefix for the IPv4 address in question, you have a ::/48 bit address (16 + 32 = 48). This is where the first number is coming from (MYPREFIX).

It is common practice in IPv6 to use 64 bits for the network and 64 bits for the host address. This means that for any 2002:XXXX:XXXX::/48 address, you have 16 more bits you can use to create additional networks (65,000+ of them!) that would still be processed by the IPv4 hosts through which the 6to4 traffic is flowing. For example, you could use the following range:  
`2002:C0A8:1703:0000::/64 - 2002:C0A8:1703:FFFF::/64`

So in the Rene’s example, we are using the first /64 length network within the /48 network–namely 2002:C0A8:1703: **0000** ::/64 which can be written as just 2002:C0A8:1703::/64

---

<div class="post-metadata">

### Author: ![Fabian\_Martinez1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/f/8797f3/32.png) [@Fabian\_Martinez1](https://forum.networklessons.com/u/Fabian_Martinez1)
#### Post date: [April 6, 2016, 2:17am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/11 "2016-04-06T02:17:20Z")

</div>

Great, ok thanks.

Fabian

---

<div class="post-metadata">

### Author: ![roland.walker](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/roland.walker/32/1407_2.png) [@roland.walker](https://forum.networklessons.com/u/roland.walker)
#### Post date: [April 10, 2016, 11:11pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/12 "2016-04-10T23:11:59Z")

</div>

Hey Rene,

Great write up! Why does Cisco recommend using Automatic 6 to 4 tunneling over ISATAP for inter area routing? I mean, I see the name intra-site, but trying to get more clarity on why ISATAP would not/or could not be used for inter area.

Thank you

Roland

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [April 17, 2016, 9:45pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/13 "2016-04-17T21:45:41Z")

</div>

Hi Roland,

I think it’s because of the additional overhead that ISATAP has. I found a nice document that did some benchmarks for all tunneling protocols:

[http://www.ijidcs.org/issues/v2n2/ijidcs-18-149-156.pdf](http://www.ijidcs.org/issues/v2n2/ijidcs-18-149-156.pdf)

Take a look at their conclusion 🙂

Rene

---

<div class="post-metadata">

### Author: ![roland.walker](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/roland.walker/32/1407_2.png) [@roland.walker](https://forum.networklessons.com/u/roland.walker)
#### Post date: [April 18, 2016, 7:08am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/14 "2016-04-18T07:08:14Z")

</div>

Thank you Rene! I appreciate you digging in to find the answer. I was coming up short! Awesome as always 🙂

Roland

---

<div class="post-metadata">

### Author: ![dionisisk](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/dionisisk/32/453_2.png) [@dionisisk](https://forum.networklessons.com/u/dionisisk)
#### Post date: [June 27, 2016, 2:16pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/15 "2016-06-27T14:16:17Z")

</div>

Hi Rene ,

i think missed a piece of the puzzle for automatic 6to 4 tunneling . for tunnel source we are using tunnel source fastEthernet 0/0 command and for destination tunnel mode ipv6ip 6to4 to get the ip address from the ipv6 address 2002:C0A8:C01::1/64 . the hex part of ipv4 is C0A8:C01::1=192.168.12.1 which is the source ip of our interface .how can the tunnel is going up as we need the destination ip 192.168.23.3 à C0A8:170 of destiny router ;

```auto
Futura(config)#interface tunnel 0
Futura(config-if)#ipv6 address 2002:C0A8:C01::1/64
Futura(config-if)#tunnel source fastEthernet 0/0
Futura(config-if)#tunnel mode ipv6ip 6to4

```

thanks in advance

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [June 29, 2016, 11:11am UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/16 "2016-06-29T11:11:04Z")

</div>

Hi Dionisis,

The **tunnel mode ipv6ip 6to4** command tells the router to fetch the destination IPv4 address from the IPv6 address.

Router futura has these two static routes:

```auto
Futura(config)#ipv6 route 2001::3/128 2002:C0A8:1703::3   
Futura(config)#ipv6 route 2002::/16 tunnel 0

```

When we send a ping to 2001::3, it knows it has to fetch the IPv4 destination address from 2002:C0A8:1703::3 which is 192.168.23.3.

The same thing applies to Destiny for the other way around.

Rene

---

<div class="post-metadata">

### Author: ![dionisisk](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/dionisisk/32/453_2.png) [@dionisisk](https://forum.networklessons.com/u/dionisisk)
#### Post date: [June 29, 2016, 6:34pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/17 "2016-06-29T18:34:54Z")

</div>

HI Rene ,

Thanks a lot , this was very helpful for me

Dionisis

---

<div class="post-metadata">

### Author: ![voland84](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/v/3e96dc/32.png) [@voland84](https://forum.networklessons.com/u/voland84)
#### Post date: [August 1, 2016, 10:42pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/18 "2016-08-01T22:42:07Z")

</div>

Hello,

I have a question regarding the 6to4 implementation:  
Should it work if i use another prefix than 2002:?

I read couple of articles and in every place it’s written that 2002 is reserved for 6to4 implementation (like router knows how to extract 32 bit IPv4 address encoded in Hex format that goes after that prefix).

But in my lab i just used another prefix (just for testing): 1002: and the 6to4 stuff worked properly as well.

Can you please explain this behavior? Is it a correct and expected behavior or not?

Thanks,  
Vladimir

---

<div class="post-metadata">

### Author: ![andrew](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/andrew/32/645_2.png) [@andrew](https://forum.networklessons.com/u/andrew)
#### Post date: [August 1, 2016, 10:57pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/19 "2016-08-01T22:57:56Z")

</div>

This might have to do with the complexity (or lack thereof) for your lab. As you indicated, the 2002::/16 is a signal to IPv6 routers that they are supposed to convert the next 32 bits into an IPv4 address for routing over an IPv4 network. Without that signal, the IPv6 routers would not do this conversion, so they would have to have a native IPv6 route and path for delivery to the destination.

So to answer your question, this would be unexpected behavior unless you were in an environment so simple that 1002::/? could take place via some other native IPv6 capabilities.

---

<div class="post-metadata">

### Author: ![chihchengk](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@chihchengk](https://forum.networklessons.com/u/chihchengk)
#### Post date: [October 15, 2016, 5:05pm UTC](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959/20 "2016-10-15T17:05:05Z")

</div>

Hi Rene,

Thank you for the great write-up. I am just wondering that you mentioned ISATAP but you did not explain it or has any example.

BR,  
Collin

[Next page](https://forum.networklessons.com/t/how-to-configure-ipv6-automatic-6to4-tunneling/959.md?page=2)
