Configuring 6to4 Tunnels_Configuring 6to4 Tun

R1# show run
Building configuration...

Current configuration : 1898 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
no ip domain lookup
!
!
!
ipv6 unicast-routing

interface Loopback0
ip address 10.1.1.1 255.255.255.0
ipv6 address FEC0::1:1/112
ipv6 ospf 1 area 0
!
interface Loopback1
no ip address
!
interface Loopback2
no ip address
!
interface Loopback11
no ip address
ipv6 address 2002:AC10:C01:11::1/64
!
interface Loopback12
no ip address
ipv6 address 2002:AC10:C01:12::1/64
!
interface Tunnel0                               启动隧道tunnel 0
no ip address
no ip redirects
ipv6 address 2002:AC10:C01:1::1/64             配置ipv6地址
tunnel source Serial1/0                        隧道源端口s1/0
tunnel mode ipv6ip 6to4                        隧道启动 6to4
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
bandwidth 64
ip address 172.16.12.1 255.255.255.0
serial restart-delay 0
clock rate 64000

router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 10.1.1.1 0.0.0.0 area 0
network 172.16.12.1 0.0.0.0 area 0
!
!
no ip http server
no ip http secure-server
!
!
ipv6 route 2002::/16 Tunnel0                      配置静态路由
ipv6 route FEC0::3:0/112 2002:AC10:1703:1::3      配置静态路由
ipv6 router ospf 1
log-adjacency-changes

control-plane

gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end


R2#show run
Building configuration...

Current configuration : 1412 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
no ip domain lookup

interface Loopback0
ip address 10.1.2.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
bandwidth 64
ip address 172.16.12.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
bandwidth 64
ip address 172.16.23.2 255.255.255.0
serial restart-delay 0
clock rate 64000
!

router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 10.1.2.1 0.0.0.0 area 0
network 172.16.12.2 0.0.0.0 area 0
network 172.16.23.2 0.0.0.0 area 0
!
!
no ip http server
no ip http secure-server

control-plane

gatekeeper
shutdown  
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end

R3#show run  
Building configuration...

Current configuration : 1808 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
no ip domain lookup
!
!
!
ipv6 unicast-routing

interface Loopback0
ip address 10.1.3.1 255.255.255.0
ipv6 address FEC0::3:1/112
ipv6 ospf 1 area 0
!
interface Loopback31
no ip address
ipv6 address 2002:AC10:1703:31::1/64
!
interface Loopback32
no ip address
ipv6 address 2002:AC10:1703:32::1/64
!
interface Tunnel0                               启动隧道0
no ip address
no ip redirects
ipv6 address 2002:AC10:1703:1::3/64            配置ipv6地址
tunnel source Serial1/0                        隧道源端口
tunnel mode ipv6ip 6to4                        隧道启动 6to4
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
bandwidth 64
ip address 172.16.23.3 255.255.255.0
serial restart-delay 0
!

router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 10.1.3.1 0.0.0.0 area 0
network 172.16.23.3 0.0.0.0 area 0
!
!
no ip http server
no ip http secure-server
!
!
ipv6 route 2002::/16 Tunnel0                  配置静态路由
ipv6 route FEC0::1:0/112 2002:AC10:C01:1::1   配置静态路由
ipv6 router ospf 1
log-adjacency-changes

control-plane

gatekeeper
shutdown
!
!          
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end

R1# show ipv6 route
IPv6 Routing Table - 12 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, IS - ISIS summary
      O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
      ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   2002::/16 [1/0]
    via ::, Tunnel0
C   2002:AC10:C01:1::/64 [0/0]
    via ::, Tunnel0
L   2002:AC10:C01:1::1/128 [0/0]
    via ::, Tunnel0
C   2002:AC10:C01:11::/64 [0/0]
    via ::, Loopback11
L   2002:AC10:C01:11::1/128 [0/0]
    via ::, Loopback11
C   2002:AC10:C01:12::/64 [0/0]
    via ::, Loopback12
L   2002:AC10:C01:12::1/128 [0/0]
    via ::, Loopback12
L   FE80::/10 [0/0]
    via ::, Null0
C   FEC0::1:0/112 [0/0]
    via ::, Loopback0
L   FEC0::1:1/128 [0/0]
    via ::, Loopback0
S   FEC0::3:0/112 [1/0]
    via 2002:AC10:1703:1::3
L   FF00::/8 [0/0]
    via ::, Null0


R3# show ipv6 route
IPv6 Routing Table - 12 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, IS - ISIS summary
      O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
      ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   2002::/16 [1/0]
    via ::, Tunnel0
C   2002:AC10:1703:1::/64 [0/0]
    via ::, Tunnel0
L   2002:AC10:1703:1::3/128 [0/0]
    via ::, Tunnel0
C   2002:AC10:1703:31::/64 [0/0]
    via ::, Loopback31
L   2002:AC10:1703:31::1/128 [0/0]
    via ::, Loopback31
C   2002:AC10:1703:32::/64 [0/0]
    via ::, Loopback32
L   2002:AC10:1703:32::1/128 [0/0]
    via ::, Loopback32
L   FE80::/10 [0/0]
    via ::, Null0
S   FEC0::1:0/112 [1/0]
    via 2002:AC10:C01:1::1
C   FEC0::3:0/112 [0/0]
    via ::, Loopback0
L   FEC0::3:1/128 [0/0]
    via ::, Loopback0
L   FF00::/8 [0/0]
    via ::, Null0


R1#tclsh
R1(tcl)#foreach address {
+>(tcl)#10.1.1.1  
+>(tcl)#10.1.2.1  
+>(tcl)#10.1.3.1  
+>(tcl)#172.16.12.1  
+>(tcl)#172.16.12.2  
+>(tcl)#172.16.23.2  
+>(tcl)#172.16.23.3  
+>(tcl)#FEC0::1:1  
+>(tcl)#FEC0::3:1  
+>(tcl)#2002:AC10:C01:1::1  
+>(tcl)#2002:AC10:1703:1::3  
+>(tcl)#2002:AC10:1703:31::1  
+>(tcl)#2002:AC10:1703:32::1  
+>(tcl)#2002:AC10:0C01:11::1  
+>(tcl)#2002:AC10:0C01:12::1  
+>(tcl)#} {
+>(tcl)#ping $address }

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/36/128 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/39/100 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/44/80 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/30/60 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/36/96 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/38/68 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0::1:1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0::3:1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/39/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:AC10:C01:1::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/2/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:AC10:1703:1::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/57/68 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:AC10:1703:31::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/53/80 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:AC10:1703:32::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/33/88 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:AC10:C01:11::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/2/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:AC10:C01:12::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/4 ms