IPv6 to IPv4 Tunnel: How to set up an IPv6 tunnel between two Cisco routers to route IPv6 packets through IPv4 network.

With the world, fast running out of IPv4 and countries like China far gone in IPv6 implementation, the probability of your organisation acquiring or going into a merger with another organisation whose network is built on IPv6 is quite high. As a network engineer, it is your responsibility when such happens, to find a way to route the newly acquired organisation’s IPv6 traffics through the very popular IPv4 internet. In this demonstration, I will share with us on how to configure your Cisco routers to accept IPv6 traffics and route them through IPv4 networks.

This demonstration was done using the Cisco Packet Tracer so that everyone can practice it. The topology shows two IPv6 networks connected to two directly cisco 2811 routers on an IPv4 network.

Objectives:

>> Implement an IPv6 tunnel between Router A and Router B
>> Route IPv6 traffics from both LANs across the IPv4 network so as to achieve inter-LAN communication.

Task:

Implement dual stack routing on both routers (meaning that each router will run both ipv4 and ipv6)
Implement ipv6ip tunnels on both routers Implement ipv6 routing on both routers

Implementation:

cisco 6to4 tunneling
6to4 tunneling
From the topology, the following will be achieved:

On RouterA:

f0/0 = 192.168.0.1 255.255.255.252 (connects to router B)
f0/1= 2001:db8:1:1::1/64 (connects to the LAN on routerA)
Tunnel 0 = 2001:db8:3:3::1/64 (ipv6 tunnel interface on routerA)

On RouterB:

f0/0 = 192.168.0.2 255.255.255.252 (connects to router A)
f0/1= 2001:db8:2:2::1/64 (connects to the LAN on routerB)
Tunnel 0 = 2001:db8:3:3::2/64 (ipv6 tunnel interface on routerB)

Configuration on RouterA:

RouterA(config)#ip unicast-routing
RouterA(config)#int f0/0
RouterA(config-if)#ip add 192.168.0.1 255.255.255.252 (connects to routerB)
RouterA(config-if)#no shut
RouterA(config-if)#int f0/1
RouterA(config-if)#ipv6 add 2001:db8:1:1::1/64 (connects to LAN)
RouterA(config-if)#no shut
RouterA(config-if)#int tunnel 0
RouterA(config-if)#ipv6 add 2001:db8:3:3::1/64 (tunnel IP)
RouterA(config-if)#tunnel source f0/0
RouterA(config-if)#tennel destination 192.168.0.2
RouterA(config-if)#tunnel mode ipv6ip

Configuration on RouterB

RouterB(config)#ip unicast-routing
RouterB(config)#int f0/0
RouterB(config-if)#ip add 192.168.0.2 255.255.255.252 (connects to routerA)
RouterB(config-if)#no shut
RouterB(config-if)#int f0/1
RouterB(config-if)#ipv6 add 2001:db8:2:2::1/64 (connects to LAN)
RouterB(config-if)#no shut
RouterB(config-if)#int tunnel 0
RouterB(config-if)#ipv6 add 2001:db8:3:3::2/64 (tunnel IP)
RouterB(config-if)#tunnel source f0/0
RouterB(config-if)#tennel destination 192.168.0.1
RouterB(config-if)#tunnel mode ipv6ip
At this stage, the tunnel is set up, what is left is to route through the tunnel using static routes. See below:

On RouterA:

RouterA(config)#ipv6 route 2001:db8:2:2::0/64 2001:db8:3:3::2

On RouterB:

RouterA(config)#ipv6 route 2001:db8:1:1::0/64 2001:db8:3:3::1

Key points:

The the tunnel source makes use of the ipv4 address assigned to interface f0/0 on the router on which it is being configured while the destination is the ipv4 address assigned to the connecting interface on the remote router. If you are doing this between two internet routers with public IPs, then the tunnel source should be the interface connecting to your ISP (with public IP) while the tunnel destination should be the public IP of the remote router.
The ipv6 static routes that were configured, route between both ipv6 networks, hence the network addresses in the route statements.
Computers attached to the switch on RouterA will take addresses from 2001:db8:1:1::2 while those attached to the switch on RouterB will take addresses starting from 2001:db8:2:2::2

Testing:

Pings from ipv6 hosts on the LAN attached to RouterA to those attached to RouterB and vice versa should be successful.

Output from a host attached to RouterB to a host on RouterA:

PC>ping 2001:db8:1:1::1
Pinging 2001:db8:1:1::1 with 32 bytes of data:
Reply from 2001:DB8:1:1::1: bytes=32 time=1ms TTL=254
Reply from 2001:DB8:1:1::1: bytes=32 time=0ms TTL=254
Reply from 2001:DB8:1:1::1: bytes=32 time=0ms TTL=254
Reply from 2001:DB8:1:1::1: bytes=32 time=0ms TTL=254
Ping statistics for 2001:DB8:1:1::1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

From a hosts on RouterA to a host on RouterA:

PC>ping 2001:db8:2:2::2
Pinging 2001:db8:2:2::2 with 32 bytes of data:
Reply from 2001:DB8:2:2::2: bytes=32 time=2ms TTL=126
Reply from 2001:DB8:2:2::2: bytes=32 time=0ms TTL=126
Reply from 2001:DB8:2:2::2: bytes=32 time=0ms TTL=126
Reply from 2001:DB8:2:2::2: bytes=32 time=0ms TTL=126
Ping statistics for 2001:DB8:2:2::2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in
milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 0ms
 A video on this is coming soon. Click the subscribe button to be among the first to see it.
Spread the love

Timigate

I believe that Africa will advance technologically if knowledge is shared among the living than out of greed, taken to the grave.

Leave a Reply

Your email address will not be published. Required fields are marked *