Tunneling IPv6 Through an Existing IPv4 Network

Problem

You want to connect two IPv6 networks through an existing IPv4 network that doesn't natively support IPv6.

Solution

The easiest way to pass IPv6 traffic through a section of IPv4 network that doesn't offer native IPv6 support is to create a simple GRE tunnel:

Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#interface Loopback1
Router1(config-if)#ip address 10.15.1.11 255.255.255.255
Router1(config-if)#exit
Router1(config)#interface Tunnel1
Router1(config-if)#ipv6 address BBBB:1::1/126
Router1(config-if)#ipv6 rip RIP_PROC enable
Router1(config-if)#tunnel source 10.15.1.11
Router1(config-if)#tunnel destination 172.16.11.9
Router1(config-if)#exit
Router1(config)#end
Router1#

And then you configure the device on the other end similarly:

Router9#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router9(config)#interface Loopback1
Router9(config-if)#ip address 172.16.11.9 255.255.255.255
Router9(config-if)#exit
Router9(config)#interface Tunnel1
Router9(config-if)#ipv6 address BBBB:1::2/126
Router9(config-if)#ipv6 rip RIP_PROC enable
Router9(config-if)#tunnel source 172.16.11.9
Router9(config-if)#tunnel destination 10.15.1.11
Router9(config-if)#exit
Router9(config)#end
Router9#

 

Discussion

This example is actually simpler than a lot of GRE tunnel configuration examples because the protocol used to support the tunnel end points is different from the protocol that will be passing through the tunnel. As a result, we can freely use whatever routing protocol we like to distribute the routing information about the tunnel source and destination addresses without worrying about recursive routing problems. For more information on recursive routing, please refer to Chapter 12.

Also, as we mention in Chapter 12, we have deliberately created loopback interfaces to support these tunnel source and destination addresses. This is because we want to make sure that these interfaces never become unavailable due to a link failure. If there is any network path to the tunnel destination, we want to keep the tunnel up.

In the example, we have configured the tunnel interfaces to pass IPv6 routing information using RIP. However, this was just for demonstration purposes. You could use whatever protocol is most convenient for this purpose.

Note that starting in IOS Version 12.3(7)T, Cisco modified the tunnel destination command to allow it to accept an IPv6 address. This makes it possible to construct GRE tunnels to carry IPv4 traffic through an existing IPv6 network in exactly the same way that we have tunneled IPv6 traffic through an existing IPv4 network in this recipe.

See Also

Chapter 12






Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net