Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

IPv6 6to4 Tunneling Configuration Example

 

 

 

 

Introduction

This document provides sample configuration of IPv6 6to4 tunneling in Cisco IOS routers. 6to4 Tunneling is one of the IPv6 translation mechanism which encapsulates the IPv6 packets into IPv4 which allows remote IPv6 networks to communicate across the IPv4 infrastructure(core network or Internet). The main difference between the manual tunnels and automatic 6to4 tunnels is that the tunnel is not point-to-point but it is point-to-multipoint.

 

In automatic 6to4 tunnels, the IPv4 infrastructure is treated as a  virtual nonbroadcast multiaccess (NBMA) link routers are not  configured as point-to-point. The IPv4 address embedded  in the IPv6 address is used to find the other end of the automatic  tunnel.

Requirements

 

Refer to Implementing IPv6 Addressing and Basic Connectivity for basic understanding on IPv6.

 

Background

 

In this example, router R1 and R2 are connected via Gigabit Ethernet G1/0. The routers R1 and R2 runs OSPFv3 in their internal network with routers R3 and R4 respectively. Note that internal routing protocols such as EIGRPv6 OSPFv3 cannot be used across the 6to4 tunnels since they use Link-Local address to form adjacencies. You can either use BGP which forms adjacencies using Global Unicast Address or Static routes as we use in this example.

 

Note: All configuration is tested on Cisco 7200 Series Router running on IOS Version  15.0(1)M Advance IP Services Image.

 

Topology Diagram

6to4tunneling.jpeg

 

 

 

Configuration

 

 

                   Router R1
                       Router R2
           Router R3 & R4

!
version 15.2
!
hostname R1
!
ipv6 unicast-routing
ipv6 cef
!
interface Tunnel0
no ip address
no ip redirects
ipv6 address 2002:C0A8:1E01::/48
tunnel source 192.168.30.1
tunnel mode ipv6ip 6to4
!
interface GigabitEthernet1/0
ip address 192.168.30.1 255.255.255.0
negotiation auto
!
interface FastEthernet2/0
no ip address
speed auto
duplex auto
ipv6 address 1000::2/64
ipv6 ospf 1 area 0
!

ipv6 route 2002:C0A8:1E02::/48 Tunnel0

ipv6 route 1010::/64 2002:C0A8:1E02::

!

ipv6 router ospf 1
router-id 1.1.1.1
redistribute static
!
!
end

 

 

 

 

 

 

 

 

!
version 15.2
!
hostname R2
!
ipv6 unicast-routing
ipv6 cef
!
interface Tunnel0
no ip address
no ip redirects
ipv6 address 2002:C0A8:1E02::/48
tunnel source 192.168.30.2
tunnel mode ipv6ip 6to4
!
interface GigabitEthernet1/0
ip address 192.168.30.2 255.255.255.0
negotiation auto
!
interface FastEthernet2/0
no ip address
speed auto
duplex auto
ipv6 address 1010::1/64
ipv6 ospf 1 area 0
!

ipv6 route 2002:C0A8:1E01::/48 Tunnel0

ipv6 route 1000::/64 2002:C0A8:1E01::

ipv6 router ospf 1
router-id 2.2.2.2
redistribute static
!
!
end

 

 

 

 

 

 

 

 

!
version 15.2

 

!
hostname R3
!
ipv6 unicast-routing

 

ipv6 cef
!interface FastEthernet1/0
no ip address
speed auto
duplex auto
ipv6 address 1000::1/64
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 3.3.3.3
!
!
end

 

!
version 15.2
!
hostname R4
!
ipv6 unicast-routing
ipv6 cef
!
!
interface FastEthernet1/0
  no ip address
  speed auto
  duplex auto
  ipv6 address 1010::2/64
  ipv6 ospf 1 area 0
!
!
ipv6 router ospf 1
  router-id 4.4.4.4
!
!
end

 

Note: Necessary Static routes are configured to achieve connectivity across 6to4 tunnel. First a static route is created for 2002:C0A8:1E02::/48 to be reachable via Tunnel Interface and then another static route for the internal /64 route which is to be routed via 6to4 tunnel interface.

Verify Commands

Ping

To verify the connectivity across the 6to4 tunnels, you can ping the internal networks of router R1 and R2. i.e. The routers R4 and R3 should be able to ping each other.

 

In router R3

 

Try ping router R4 (1010::2) from router R3

.

R3#ping 1010::2

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1010::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/156/240 ms

 

Similarly from Router R4, ping router R3 (1000::1)

 

R4#ping 1000::1

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1000::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/212/548 ms

 

Show ipv6 route

 

To display routing table information

 

R1#show ipv6 route
IPv6 Routing Table - default - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       D - EIGRP, EX - EIGRP external, ND - Neighbor Discovery
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
O   1000::1/128 [110/1]
     via FE80::C807:8EFF:FEB4:1C, FastEthernet2/0
LC  1000::2/128 [0/0]
     via FastEthernet2/0, receive
S   1010::/64 [1/0]
     via 2002:C0A8:1E02::
C   2002:C0A8:1E01::/48 [0/0]
     via Tunnel0, directly connected
L   2002:C0A8:1E01::/128 [0/0]
     via Tunnel0, receive
S   2002:C0A8:1E02::/48 [1/0]
     via Tunnel0, directly connected
L   FF00::/8 [0/0]
     via Null0, receive

R2#show ipv6 route
IPv6 Routing Table - default - 7 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       D - EIGRP, EX - EIGRP external, ND - Neighbor Discovery
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   1000::/64 [1/0]
     via 2002:C0A8:1E01::
O   1010::1/128 [110/1]
     via FE80::C808:8EFF:FEB4:1C, FastEthernet2/0
LC  1010::2/128 [0/0]
     via FastEthernet2/0, receive
S   2002:C0A8:1E01::/48 [1/0]
     via Tunnel0, directly connected
C   2002:C0A8:1E02::/48 [0/0]
     via Tunnel0, directly connected
L   2002:C0A8:1E02::/128 [0/0]
     via Tunnel0, receive
L   FF00::/8 [0/0]
     via Null0, receive

 

You can see that the static routes are shown in the routing table and is received via Tunnel 0.

 

Show ipv6 interface tunnel 0

 

To display the detailed information of the interface, use this command

 

R1#show ipv6 interface tunnel 0
Tunnel0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::C0A8:1E01
  No Virtual link-local address(es):
  Global unicast address(es):
    2002:C0A8:1E01::, subnet is 2002:C0A8:1E01::/48
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::1:FF00:0
    FF02::1:FFA8:1E01
  MTU is 1480 bytes
  ICMP error messages limited to one every 100 milliseconds
  ICMP redirects are enabled
  ICMP unreachables are sent
  ND DAD is not supported
  ND reachable time is 30000 milliseconds (using 30000)
  Hosts use stateless autoconfig for addresses.

 

Traceroute

 

To trace the path of the packet for reaching the destination use this command.

 

R3#traceroute 1010::2

 

Type escape sequence to abort.
Tracing the route to 1010::2

 

  1 1000::2 144 msec 156 msec 28 msec
  2 2002:C0A8:1E02:: 184 msec 112 msec 120 msec

 

You can see that the router R3 reaches the network 1010:: via Tunnel interface

 

References

Routing Information Protocol
Version history
Revision #:
2 of 2
Last update:
‎08-29-2017 01:12 AM
Updated by:
 
Contributors
Comments

Is it possible to use the same logic for two hosts in IPV4 to communicate via IPv6 network.

In our case it is not possible to make hosts IPv6.

Thanks anyone in advance.

New Member

Hi Silvagami,

i was doing your configuration above, and in my own environment i used a different ipv6 address for my Tunnel0 using 2001::.. in my investigation things are not reachable end to end. ospf not learned vice versa. 

after some time digging 

i just want to add that the tunnel interface should used ipv6 address prefix of 2002::/16

the explanation is on below link.

http://packetlife.net/blog/2010/mar/15/6to4-ipv6-tunneling/

http://blog.ine.com/2009/09/09/ipv6-transition-mechanisms-part-3-6to4-tunnels/

thank you for the example you provided. learned alot.

regards