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 Tunnel02 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/02 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 Tunnel02 R1(config-if)#ipv6 ospf 1 area 03 R1(config)#int Lo04 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/02 R2(config-if)#ip address 201.2.3.2 255.255.255.2523 R2(config)#interface FastEthernet0/14 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 Tunnel02 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/12 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 Tunnel02 R3(config-if)#ipv6 ospf 1 area 03 R3(config)#int Lo04 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 route02 03 IPv6 Routing Table - 6 entries04 05 Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP06 U - Per-user Static route, M - MIPv607 I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary08 O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 209 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 210 D - EIGRP, EX - EIGRP external11 C FEC0::/65 [0/0]12 via ::, Loopback013 L FEC0::1/128 [0/0]14 15 via ::, Loopback016 O FEC0:F000::1/128 [110/11111]17 via FE80::CA03:402, Tunnel018 19 (Notice how this OSPF route is received via Tunnel0. Success!)20 21 C FED0::/126 [0/022 via ::, Tunnel023 L FED0::1/128 [0/0]24 via ::, Tunnel025 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 brief02 03 FastEthernet0/0 [up/up]04 FE80::214:F2FF:FE01:643805 FEC0::106 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:643811 F564::1
show ipv6 tunnel
Show tunnels that are configured for IPv6
Example:
1 R1#show ipv6 tunnel2 3 Tun Route LastInp Packets Description4 0 - 00:00:01 2125 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::12 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 002 03 Tunnel0 is up, line protocol is up04 Hardware is Tunnel05 MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,06 reliability 255/255, txload 1/255, rxload 1/25507 Encapsulation TUNNEL, loopback not set08 Keepalive not set09 Tunnel source 201.2.3.1 (FastEthernet0/0), destination 202.3.4.210 11 (You can see our source and destinations are completely IPv4 based here)12 13 Tunnel protocol/transport IPv6/IP14 15 (You can see that we specified that we will be encapsulating our IPv6 packets within IPv4 Packets here!)16 17 Tunnel TTL 25518 Fast tunneling enabled19 Tunnel transmit bandwidth 8000 (kbps)20 Tunnel receive bandwidth 8000 (kbps)21 Last input 00:00:05, output 00:00:09, output hang never22 Last clearing of "show interface" counters never23 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 2024 Queueing strategy: fifo25 Output queue: 0/0 (size/max)26 5 minute input rate 0 bits/sec, 0 packets/sec27 5 minute output rate 0 bits/sec, 0 packets/sec28 203 packets input, 24672 bytes, 0 no buffer29 Received 0 broadcasts, 0 runts, 0 giants, 0 throttles30 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort31 210 packets output, 21388 bytes, 0 underruns32 0 output errors, 0 collisions, 0 interface resets33 0 output buffer failures, 0 output buffers swapped out
Solutions
R1
01 hostname R102 !03 ipv6 unicast-routing04 !05 interface Loopback006 no ip address07 ipv6 address FEC0::1/6508 ipv6 ospf 1 area 009 !10 interface Tunnel011 no ip address12 ipv6 address FED0::1/12613 ipv6 ospf 1 area 014 tunnel source FastEthernet0/015 tunnel destination 202.3.4.216 tunnel mode ipv6ip17 !18 interface FastEthernet0/019 ip address 201.2.3.1 255.255.255.25220 duplex auto21 speed auto22 !23 ip route 0.0.0.0 0.0.0.0 201.2.3.224 !25 ipv6 router ospf 126 router-id 1.1.1.127 log-adjacency-changes28 !29 end
R2
01 hostname R202 !03 interface FastEthernet0/004 ip address 201.2.3.2 255.255.255.25205 duplex auto06 speed auto07 !08 interface FastEthernet0/109 ip address 202.3.4.1 255.255.255.25210 duplex auto11 speed auto12 !13 end
R3
01 hostname R302 !03 ipv6 unicast-routing04 !05 interface Loopback006 no ip address07 ipv6 address FEC0:F000::1/6508 ipv6 ospf 1 area 009 !10 interface Tunnel011 no ip address12 ipv6 address FED0::2/12613 ipv6 ospf 1 area 014 tunnel source FastEthernet0/115 tunnel destination 201.2.3.116 tunnel mode ipv6ip17 !18 interface FastEthernet0/119 ip address 202.3.4.2 255.255.255.25220 duplex auto21 speed auto22 !23 ip route 0.0.0.0 0.0.0.0 202.3.4.124 !25 ipv6 router ospf 126 router-id 3.3.3.327 log-adjacency-changes28 !29 end
Copyright © 2008 dch-it.com. All Rights Reserved.
