IPv6 –Tunnelling

image

There are many ways of transporting IPv6 over IPv4 networks, one of these methods is tunnelling, Tunnelling is simply encapsulating IPv6 packets within the tunnel so they appear as IPv4 packets on the tunnel ends

In this post we will see types of tunnels, GRE (Generic Routing Encapsulation) and IPv6 in IPv4 tunnels

GRE Tunnels can carry any type of traffic including IPv6

IPv6 in IPv4 Tunnels: are only designed to carry IPv6 traffic only

In the network that we have in this post, we have IPv4 network between R1, R2 and R3 and the three routers are running IPv6 on their LAN networks with R4, R5 and R6 respectively. within the IPv4 network we will run an IGP, I am using OSPF in this post but any other protocol can be used including static routes

Configurations

R1

ipv6 unicast-routing
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.123.1 255.255.255.0
 ip ospf 1 area 0

interface FastEthernet0/1
 ipv6 address FE80::1 link-local
 ipv6 ospf 1 area 0

R2


ipv6 unicast-routing
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.123.2 255.255.255.0
 ip ospf 1 area 0
!
interface FastEthernet0/1
 ipv6 address FE80::2 link-local
 ipv6 ospf 1 area 0

R3


ipv6 unicast-routing
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.1.123.3 255.255.255.0
 ip ospf 1 area 0
!
interface FastEthernet0/1
 ipv6 address FE80::3 link-local
 ipv6 ospf 1 area 0

R4


ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001:4:4::4/64
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 address FE80::4 link-local
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 4.4.4.4

R5


ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001:5:5::5/64
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 address FE80::5 link-local
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 5.5.5.5

R6


ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001:6:6::6/64
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 address FE80::6 link-local
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 6.6.6.6

Before configuring our tunnel interfaces, we should check our IGP within the IPv4 network and make sure that IP connectivity to the loopback interfaces

R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/BDR        00:00:32    10.1.123.2      FastEthernet0/0
3.3.3.3           1   FULL/DR          00:00:31     10.1.123.3      FastEthernet0/0

R2#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/DROTHER    00:00:36    10.1.123.1      FastEthernet0/0
3.3.3.3           1   FULL/DR                  00:00:38    10.1.123.3      FastEthernet0/0

OK, this looks good. The goal is to be able to transport our IPv6 traffic over the IPv4 network, for that we will use to static tunnels on R1

Tunnel 12: from R1- R2 and using GRE

Tunnel 13: from R1 – R3 and this tunnel will be using IPv6 IPv4

we will also configure dynamic routing protocol on this tunnels so we don’t have to use static routes

On R1

interface Tunnel12
 no ip address
 ipv6 address 2001:12:12::1/64
 ipv6 ospf 1 area 0
 tunnel source Loopback0
 tunnel destination 2.2.2.2
 tunnel mode gre ip
!
interface Tunnel13
 no ip address
 ipv6 address 2001:13:13::1/64
 ipv6 ospf 1 area 0
 tunnel source Loopback0
 tunnel destination 3.3.3.3
 tunnel mode ipv6ip

Note: tunnel mode gre ipv is the default mode in Cisco IOS, you will not see it in the running configuration

R2


interface Tunnel12
 no ip address
 ipv6 address 2001:12:12::2/64
 ipv6 ospf 1 area 0
 tunnel source Loopback0
 tunnel destination 1.1.1.1

and R3


interface Tunnel123
 no ip address
 ipv6 address 2001:12:12::2/64
 ipv6 ospf 1 area 0
 tunnel source Loopback0
 tunnel destination 1.1.1.1
 tunnel mode ipv6ip

As you see, we have created two tunnels on R1 connecting to both R2 and R3        The first tunnel is using gre encapsulation and second mode is using ipv6 overipv4 we are also running OSPFv3 over these tunnels to exchange the IPv6 between the 3 sites

Now let’s check the these tunnel interfaces on R1

R1#show interface tunnel 12         
Tunnel12 is up, line protocol is up
  Hardware is Tunnel
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 1.1.1.1 (Loopback0), destination 2.2.2.2
  Tunnel protocol/transport GRE/IP
   
   **rest of the output has been omitted**

R1#show interface tunnel 13
Tunnel13 is up, line protocol is up
  Hardware is Tunnel
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 1.1.1.1 (Loopback0), destination 3.3.3.3
  Tunnel protocol/transport IPv6/IP

   **rest of the output has been omitted**

Now let’s see if we are actually getting th routes updates through the tunnel interfaces

R1#show ipv6 route ospf | in O
       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   2001:4:4::4/128 [110/1]
O   2001:5:5::5/128 [110/11112]
O   2001:6:6::6/128 [110/11112]

R2#show ipv6 route ospf | in O
       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   2001:4:4::4/128 [110/11112]
O   2001:5:5::5/128 [110/1]
O   2001:6:6::6/128 [110/22223]
O   2001:13:13::/64 [110/22222]

R3#show ipv6 route ospf | in O
       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   2001:4:4::4/128 [110/11112]
O   2001:5:5::5/128 [110/22223]
O   2001:6:6::6/128 [110/1]
O   2001:12:12::/64 [110/22222]

All looks good, routes are exchanged through tunnel interfaces as we expect and we should have connectivity between the three sites

R3#ping 2001:4:4::4   

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:4:4::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/68/120 ms
R3#ping 2001:5:5::5

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

Comments

Popular posts from this blog

BPDU Filter vs BPDU Guard

BGP Weight Attribute

OSPF–Point To Multipoint Non-Broadcast