You are on page 1of 4

Download PNETLab Platform

PNETLAB Store
PNETLab.com

IPv6 Automatic 6to4 Tunneling

Lab Topology:
Please use the following topology to complete this lab exercise:

https://user.pnetlab.com/store/labs/detail?id=16011293856921

Lab Objective:
The objective of this lab exercise is for you to learn and understand how can you configure IPv6
6to4 Tunneling

Task list:
Task 1: Configure the hostname and IP address for the interface for Routers as topo, Config
OSPF Routing in 3 Routers and check the reachability Routers.
Task 2: Configure interface tunnel in 2 Routers R1 and R3, specify that tunnel mode is IPv6
6to4.
Task 3: Config Static Routing between R1 and R3 via tunnel has been created in Task 2.
Task 4: Check the reachability between loopback of R1 and R3.

SOLUTION:
Task 1: Configure the hostname and IP address for the interface for Routers as topo, Config
OSPF Routing in 3 Routers and check the reachability Routers.

1
Download PNETLab Platform
PNETLAB Store
PNETLab.com

On R1
!
interface Loopback0
no ip address
ipv6 address 2001::1/128
!
interface Ethernet0/0
ip address 10.1.12.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
!
On R2
!
interface Ethernet0/0
ip address 10.1.12.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Ethernet0/1
ip address 10.1.23.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Ethernet0/2
no ip address
ip ospf network point-to-point
ip ospf 1 area 0
!
On R3
!
interface Loopback0
no ip address
ipv6 address 2001::3/128
!
interface Ethernet0/1
ip address 10.1.23.3 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
!
Verification:
R1#ping 10.1.23.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

2
Download PNETLab Platform
PNETLAB Store
PNETLab.com

Task 2: Configure interface tunnel in 2 Routers R1 and R3, specify that tunnel mode is IPv6
6to4.
On R1
!
interface Tunnel0
no ip address
no ip redirects
ipv6 address 2002:A01:C01::1/64
tunnel source Ethernet0/0
tunnel mode ipv6ip 6to4
!
On R3
!
interface Tunnel0
no ip address
no ip redirects
ipv6 address 2002:A01:1703::1/64
tunnel source Ethernet0/1
tunnel mode ipv6ip 6to4
!
//Please focus on the ipv6 address of tunnel at R1 and R3. Why could we determine the ipv6
address to config of tunnel? The answer is based on the working of 6to4 Tunnel. We don’t
configure the IPv4 end-point address ourselves (tunnel destination) but instead the IPv4 end-
point address (tunnel destination) will be wrapped in the IPv6 destination address.
The 2002::/16 range has been reserved to use for tunneling. This IPv6 address space is only for
tunneling and will never be used for IPv6 global unicast addresses. If we start with the 2002::/16
prefix we create a /48 prefix for each tunnel end-point. What we have to do is take the IPv4
address of the end-point (tunnel destination) and convert it into hexadecimal as bits 17 to 48.
The second step is that we can create subnets from /48 up to /64 prefixes for all the subnets
behind the end-point.

R1#show ipv6 general-prefix


IPv6 Prefix IPV6, acquired via 6to4
2002:A01:C01::/48 Valid lifetime infinite, preferred lifetime infinite

R3#show ipv6 general-prefix


IPv6 Prefix IPV6, acquired via 6to4
2002:A01:1703::/48 Valid lifetime infinite, preferred lifetime infinite

There is a neat trick on Cisco routers that can do the work for you. First you have to configure
an IPv4 address on an interface and then use the ipv6 general-prefix command. It will convert
the IPv4 address in hexadecimal and give you the correct IPv6 tunnel prefix with the show ipv6
general-prefix command.

3
Download PNETLab Platform
PNETLAB Store
PNETLab.com

So that’s why the 6to4 Tunneling doesn’t need to config tunnel destination. Please focus,
tunnel destination has been already wrapped on IPv6 address.

Task 3: Config Static Routing between R1 and R3 via tunnel has been created in Task 2.
Please remember : The downside of multipoint IPv6 tunnels is that they don’t support IPv6
IGPs. You have to use static routes or BGP.
On R1
!
ipv6 route 2001::3/128 2002:A01:1703::1
ipv6 route 2002::/16 Tunnel0
!
On R3
!
ipv6 route 2001::1/128 2002:A01:C01::1
ipv6 route 2002::/16 Tunnel0
!
// The first static route we need to tell our routers how to reach the loopback0 interface of the
other side. It points to the IPv6 address which has the IPv4 address in hex in it. The routers will
have to do recursive routing to find an entry for 2002:: which is why we need the second static
route. Since 2002::/16 is reserved for tunneling I’m creating a static that points directly to our
tunnel0 interface.
Task 4: Check the reachability between loopback of R1 and R3.
On R1
R1#ping 2001::3 source l0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::3, timeout is 2 seconds:
Packet sent with a source address of 2001::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

//So we will recognize that, we could reach to R3’s IPv6 Loopback at R1’s IPv6 Loopback.

You might also like