IPv6 to IPv6 – Tunneling through IPv4

March 15th, 2009 by Daniel Herman Leave a reply »

Challenge Lab #3 – IPv6 to IPv6 – Tunneling through IPv4

(Note: Please complete Challenge Lab #2 – EIGRPv6 / OSPFv3 Redistribution prior to this if you are not already familiar with IPv6 terms and concepts.)

Overview:

A small business owner in your local town has contacted your consulting company request someone to change them to an entirely IPv6 network. Although you know that it is kind of pointless for a small shop to be spending money on the transition at this time, you are more than willing to let them write you as many checks as they want. One of the issues you will be facing is how to maintain connectivity between their two locations when you only have access to the IPv4 internet.

Technologies:

GRE:

GRE, or Generic Routing Encapsulation, is a technology developed by Cisco that creates a logical point-to-point link over already accessible networks. This technology is useful in order to run different kind of protocol stacks. For example, you can run IPSec/GRE tunnel between two sites in order to provide security. Another example which we will be utilizing here is the ability to connect two sites via IPv4 but pass IPv6 information through it.

IPv6 to IPv6 Tunnel Methods:

There are five different methods of tunneling IPv6 through an IPv4 backbone, and they are divided into two majors groups which are automatic and manual. The automatic tunnels still need IPv4 information, however it is generally pulled from another already configured address such as a BGP peer. ISPs may also run an overlay service that allows customers to connect and configure themselves which may provide ease of management in larger deployments. For this example, we will be using a manually configured IPv6 tunnel since this is for a small business and there will be very minimal management required.

.

Tasks:

**You may need to create two VLANs and some trunks depending on how you have your environment physically cabled**

.

R1:

  • Enable IPv6 unicast routing
  • Configure a default IPv4 static route via R2
  • Configure Tun0 with a mode of ipv6ip, a source of F0/0, and the destination address of the Tun0 on R3
  • Configure IPv6 OSPF Area 0 on Lo0 and Tun0
.

R2

  • Configure the two interfaces with basic IP addressing
.

R3

  • Enable IPv6 unicast routing
  • Configure a default IPv4 static route via R2
  • Configure Tun0 with a mode of ipv6ip, a source of F0/1, and the destination address of the Tun0 on R1
  • Configure IPv6 OSPF Area 0 on Lo0 and Tun0
.
.
.

Logical Topology

.
.

.
.

Walkthrough Below!

.
.
.
.
.

Walkthrough

.
.

R1

.

Since we will be running an IPv6 routing protocol, we need to enable IPv6 unicast routing.

.

1
R1(config)#ipv6 unicast-routing

.
.

Let’s configure a default static route via R2 so that we will have full IPv4 connectivity. You can run a routing protocol instead if you wish.

.

1
R1(config)#ip route 0.0.0.0 0.0.0.0 201.2.3.2

.
.

Let’s create Interface Tunnel0 that we will use to tunnel IPv6 over the IPv4 backbone and set the IPv6 address. A tunnel interface is a logical interface that communicates with another tunnel interface via connected physical interfaces.

.

1
R1(config)#interface Tunnel0
2
R1(config-if)#ipv6 address FED0::1/126

.
.

Now let’s change the tunnel mode to IPv6 using IPv4 encapsulation. What this command is doing is basically stating that the inner packet contains IPv6 data, and that inner packet is encapsulated within a packet utilizing IPv4 data.

.

1
R1(config-if)#tunnel mode ipv6ip

.
.

We are going to be using the source address from F0/0 since that is our connection to the internet, then we will use the public address of R3 as the tunnel destination.

.

1
R1(config-if)#tunnel source FastEthernet 0/0
2
R1(config-if)#tunnel destination 202.3.2.1

.
.

Now let’s just run IPv6 OSPF on our two IPv6 interfaces to showcase running a routing protocol over our new tunnel.

.

1
R1(config)#int Tunnel0
2
R1(config-if)#ipv6 ospf 1 area 0
3
R1(config)#int Lo0
4
R1(config-if)#ipv6 ospf 1 area 0

.
.

That’s all we need on R1.

.

R2

.
.

All we need to do on R2 is configure the two FastEthernet interfaces with IPv4 addresses to get basic connectivity, we don’t need to do anything else.

.

1
R2(config)#interface FastEthernet0/0
2
R2(config-if)#ip address 201.2.3.2 255.255.255.252
3
R2(config)#interface FastEthernet0/1
4
R2(config)#ip address 202.3.4.2 255.255.255.252

.
.

Now we’re done with R2.

.
.

R3

.

Since we will be running an IPv6 routing protocol, we need to enable IPv6 unicast routing.

.

1
R3(config)#ipv6 unicast-routing

.
.

Let’s configure a default static route via R2 so that we will have full IPv4 connectivity. You can run a routing protocol instead of you wish.

.

1
R3(config)#ip route 0.0.0.0 0.0.0.0 202.3.2.1

.
.

Let’s create Interface Tunnel0 that we will use to tunnel IPv6 over the IPv4 backbone and set the IPv6 address.

.

1
R3(config)#interface Tunnel0
2
R3(config-if)#ipv6 address FED0::2/126

.
.

Now let’s change the tunnel mode to IPv6 using IPv4 encapsulation

.

1
R3(config-if)#tunnel mode ipv6ip

.
.

We are going to be using the source address from F0/1 since that is our connection to the internet, then we will use the public address of R1 as the tunnel destination.

.

1
R3(config-if)#tunnel source FastEthernet 0/1
2
R3(config-if)#tunnel destination 201.2.3.1

.
.

Now let’s just run IPv6 OSPF on our two IPv6 interfaces to showcase running a routing protocol over our new tunnel.

.

1
R3(config)#int Tunnel0
2
R3(config-if)#ipv6 ospf 1 area 0
3
R3(config)#int Lo0
4
R3(config-if)#ipv6 ospf 1 area 0

.
.

That’s all we need on R3.

.
.

Testing and Debugging

.
.

show ipv6 route

Show the IPv6 routing table

Example:

.

01
R1#show ipv6 route
02
 
03
IPv6 Routing Table - 6 entries
04
 
05
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
06
       U - Per-user Static route, M - MIPv6
07
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
08
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
09
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
10
       D - EIGRP, EX - EIGRP external
11
C   FEC0::/65 [0/0]
12
     via ::, Loopback0
13
L   FEC0::1/128 [0/0]
14
 
15
     via ::, Loopback0
16
O   FEC0:F000::1/128 [110/11111]
17
     via FE80::CA03:402, Tunnel0
18
 
19
(Notice how this OSPF route is received via Tunnel0.  Success!)
20
 
21
C   FED0::/126 [0/0
22
     via ::, Tunnel0
23
L   FED0::1/128 [0/0]
24
     via ::, Tunnel0
25
L   FF00::/8 [0/0]
26
     via ::, Null0

.
.

show ipv6 interface brief

.

Show information whenever an IPv6 packet is sent or received

.

Example:

01
R1#show ipv6 interface brief
02
 
03
FastEthernet0/0            [up/up]
04
    FE80::214:F2FF:FE01:6438
05
    FEC0::1
06
FastEthernet0/1            [administratively down/down]
07
Serial0/0/0                [administratively down/down]
08
Serial0/0/1                [administratively down/down]
09
Loopback0                  [up/up]
10
    FE80::214:F2FF:FE01:6438
11
    F564::1

.
.

show ipv6 tunnel

.

Show tunnels that are configured for IPv6

Example:

1
R1#show ipv6 tunnel
2
 
3
Tun Route  LastInp              Packets Description
4
  0   -   00:00:01                  212
5
 
6
(You can see the number of the tunnel of the interface here, how many packets it has sent, and the last time it was used!)

.
.

ping ipv6

.

Send an ICMP request to the specified address

Example:

1
R1#ping FEC0:F000::1
2
 
3
Type escape sequence to abort.
4
 
5
Sending 5, 100-byte ICMP Echos to FEC0:F000::1, timeout is 2 seconds:
6
!!!!!
7
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms

.
.

show interface tunnel

.

Show information relating to the specified tunnel

Example:

01
R1#show interface tunnel 0
02
 
03
Tunnel0 is up, line protocol is up
04
  Hardware is Tunnel
05
  MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
06
     reliability 255/255, txload 1/255, rxload 1/255
07
  Encapsulation TUNNEL, loopback not set
08
  Keepalive not set
09
  Tunnel source 201.2.3.1 (FastEthernet0/0), destination 202.3.4.2
10
 
11
(You can see our source and destinations are completely IPv4 based here)
12
 
13
  Tunnel protocol/transport IPv6/IP
14
 
15
(You can see that we specified that we will be encapsulating our IPv6 packets within IPv4 Packets here!)
16
 
17
  Tunnel TTL 255
18
  Fast tunneling enabled
19
  Tunnel transmit bandwidth 8000 (kbps)
20
  Tunnel receive bandwidth 8000 (kbps)
21
  Last input 00:00:05, output 00:00:09, output hang never
22
  Last clearing of "show interface" counters never
23
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 20
24
  Queueing strategy: fifo
25
  Output queue: 0/0 (size/max)
26
  5 minute input rate 0 bits/sec, 0 packets/sec
27
  5 minute output rate 0 bits/sec, 0 packets/sec
28
     203 packets input, 24672 bytes, 0 no buffer
29
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
30
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
31
     210 packets output, 21388 bytes, 0 underruns
32
     0 output errors, 0 collisions, 0 interface resets
33
     0 output buffer failures, 0 output buffers swapped out

.
.
.
.
.
.
.
.
.
.
.
.


Solutions

.

R1

.
.

01
hostname R1
02
!
03
ipv6 unicast-routing
04
!
05
interface Loopback0
06
 no ip address
07
 ipv6 address FEC0::1/65
08
 ipv6 ospf 1 area 0
09
!
10
interface Tunnel0
11
 no ip address
12
 ipv6 address FED0::1/126
13
 ipv6 ospf 1 area 0
14
 tunnel source FastEthernet0/0
15
 tunnel destination 202.3.4.2
16
 tunnel mode ipv6ip
17
!
18
interface FastEthernet0/0
19
 ip address 201.2.3.1 255.255.255.252
20
 duplex auto
21
 speed auto
22
!
23
ip route 0.0.0.0 0.0.0.0 201.2.3.2
24
!
25
ipv6 router ospf 1
26
 router-id 1.1.1.1
27
 log-adjacency-changes
28
!
29
end

R2

.

01
hostname R2
02
!
03
interface FastEthernet0/0
04
 ip address 201.2.3.2 255.255.255.252
05
 duplex auto
06
 speed auto
07
!
08
interface FastEthernet0/1
09
 ip address 202.3.4.1 255.255.255.252
10
 duplex auto
11
 speed auto
12
!
13
end

.

R3

.

01
hostname R3
02
!
03
ipv6 unicast-routing
04
!
05
interface Loopback0
06
 no ip address
07
 ipv6 address FEC0:F000::1/65
08
 ipv6 ospf 1 area 0
09
!
10
interface Tunnel0
11
 no ip address
12
 ipv6 address FED0::2/126
13
 ipv6 ospf 1 area 0
14
 tunnel source FastEthernet0/1
15
 tunnel destination 201.2.3.1
16
 tunnel mode ipv6ip
17
!
18
interface FastEthernet0/1
19
 ip address 202.3.4.2 255.255.255.252
20
 duplex auto
21
 speed auto
22
!
23
ip route 0.0.0.0 0.0.0.0 202.3.4.1
24
!
25
ipv6 router ospf 1
26
 router-id 3.3.3.3
27
 log-adjacency-changes
28
!
29
end

Copyright © 2008 dch-it.com. All Rights Reserved.

Advertisement

Leave a Reply