SoFunction
Updated on 2025-04-09

Implement IPV6 tunnel using cisco router

Note: In this case, two cisco2500 routers, IOS (tm) 2500 Software (C2500-IS-L), Version 12.2(15) T9, using the ip v4 backbone plus ipv6 6 6to4 tunnel combined with ipv6 static routing, the two remote ipv6 subnets can be interconnected and interconnected.

Topology description: Use the e0 interface of two routers to simulate the backbone of ipv4, and use loopback0 to simulate two remote ipv6 subnets. The 6to4tunnel must be addressed on all ipv6 subnets using the standard ipv6 address prefix (2002::/16).

When establishing tunnels between two endpoints, the IP address of the local router's ipv4 interface combined with the 2002 prefix must be used to address the tunnel interface of the router. For example, e0:192.168.1.1 of R1, the ipv6 address of the tunnel interface of R1 must contain the hexadecimal format of this address, that is, 2002:C0A8:101:..., where C0A8:101 is the hexadecimal address of the e0 interface.

The configuration and test results are as follows:
R1#sh run
hostname R1
ipv6 unicast-routing
interface Loopback0
no ip address
ipv6 address 2002:C0A8:101:1::1/64
interface Tunnel0
no ip address
no ip redirects
ipv6 address 2002:C0A8:101:13::1/64
tunnel source Ethernet0
tunnel mode ipv6ip 6to4
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
ipv6 route 2002::/16 Tunnel0

R1#sh ipv6 int brief
Ethernet0  [up/up]
unassigned
Loopback0  [up/up]
FE80::210:7BFF:FE36:491
2002:C0A8:101:1::1
Tunnel0 [up/up]
FE80::C0A8:101
2002:C0A8:101:13::1
Virtual-Access1 [up/up]
unassigned

R1#sh ipv6 route
IPv6 Routing Table - 8 entries
Codes: C - Connected, L - Local, S - Static, R -

RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS

interarea
O - OSPF intra, OI - OSPF inter, OE1 - OSPF

ext 1, OE2 - OSPF ext 2
S 2002::/16 [1/0]
via ::, Tunnel0
C 2002:C0A8:101:1::/64 [0/0]
via ::, Loopback0
L 2002:C0A8:101:1::1/128 [0/0]
via ::, Loopback0
C 2002:C0A8:101:13::/64 [0/0]
via ::, Tunnel0
L 2002:C0A8:101:13::1/128 [0/0]
via ::, Tunnel0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0

r3#sh run
hostname r3
ipv6 unicast-routing
interface Loopback0
 no ip address
 ipv6 address 2002:C0A8:103:3::3/64
interface Tunnel0
 no ip address
 no ip redirects
 ipv6 address 2002:C0A8:103:13::3/64
 tunnel source Ethernet0
 tunnel mode ipv6ip 6to4

interface Ethernet0
 ip address 192.168.1.3 255.255.255.0

ipv6 route 2002::/16 Tunnel0

r3#sh ipv6 int brief
Ethernet0  [up/up]
unassigned
Loopback0  [up/up]
FE80::200:CFF:FE0A:26BC
2002:C0A8:103:3::3
Serial0 [administratively

down/down]
unassigned
Serial1 [administratively

down/down]
unassigned
Tunnel0 [up/up]
FE80::C0A8:103
2002:C0A8:103:13::3
Virtual-Access1 [up/up]
unassigned
r3#sh ipv6 route
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R -

RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS

interarea
O - OSPF intra, OI - OSPF inter, OE1 - OSPF

ext 1, OE2 - OSPF ext 2
S 2002::/16 [1/0]
via ::, Tunnel0
C 2002:C0A8:103:3::/64 [0/0]
via ::, Loopback0
L 2002:C0A8:103:3::3/128 [0/0]
via ::, Loopback0
C 2002:C0A8:103:13::/64 [0/0]
via ::, Tunnel0
L 2002:C0A8:103:13::3/128 [0/0]
via ::, Tunnel0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0

Test the direct-connected ipv6 tunnel interface on R1:
R1#ping ipv6 2002:c0a8:103:13::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to

2002:C0A8:103:13::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip

min/avg/max = 8/10/16 ms


Test the ipv6 loopback0 interface to R3 on R1 (not direct connection):
R1#ping ipv6 2002:c0a8:103:3::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to

2002:C0A8:103:3::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip

min/avg/max = 8/12/16 ms

Article entry: csh     Editor in charge: csh