Configuring 6to4 Tunnels

简介:

wKiom1NY0ynxPj1hAAETDMC3QfE053.jpg

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














本文转自zhang25yun51CTO博客,原文链接:http://blog.51cto.com/1585654/1402029,如需转载请自行联系原作者

相关文章
|
存储 关系型数据库 MySQL
轻松入门MySQL:优化复杂查询,使用临时表简化数据库查询流程(13)
轻松入门MySQL:优化复杂查询,使用临时表简化数据库查询流程(13)
432 0
|
11月前
|
数据采集 缓存 监控
代理IP在产品运营中的重要作用
在数字化时代,代理IP作为重要网络工具,通过突破地域限制、优化网络性能、保护数据安全、高效抓取市场数据、应对IP封锁及优化广告投放,助力企业实现业务增长和市场拓展。本文详细解析代理IP的作用与应用案例,为企业产品运营提供参考。
194 1
|
机器学习/深度学习 人工智能 自然语言处理
AI初探:人工智能的定义、历史与未来展望
【7月更文第15天】在科技飞速发展的今天,人工智能(Artificial Intelligence, AI)已经成为推动社会进步的关键力量,渗透到我们生活的方方面面,从智能家居到自动驾驶汽车,从精准医疗到智能金融,无不展现出其深远的影响。本文旨在为读者揭开人工智能的神秘面纱,从基本概念出发,回顾其发展历程,并探索未来的无限可能。
1840 2
|
Web App开发 弹性计算 运维
快速部署1Panel运维面板
1Panel是一款Linux服务器管理面板,提供Web界面进行主机监控、文件、数据库和容器管理。本文介绍如何通过计算巢快速部署1Panel面板。
快速部署1Panel运维面板
|
存储 C# 关系型数据库
“云端融合:WPF应用无缝对接Azure与AWS——从Blob存储到RDS数据库,全面解析跨平台云服务集成的最佳实践”
【8月更文挑战第31天】本文探讨了如何将Windows Presentation Foundation(WPF)应用与Microsoft Azure和Amazon Web Services(AWS)两大主流云平台无缝集成。通过具体示例代码展示了如何利用Azure Blob Storage存储非结构化数据、Azure Cosmos DB进行分布式数据库操作;同时介绍了如何借助Amazon S3实现大规模数据存储及通过Amazon RDS简化数据库管理。这不仅提升了WPF应用的可扩展性和可用性,还降低了基础设施成本。
344 0
|
开发框架 前端开发 JavaScript
【前端】前端的三大主流框架
【前端】前端的三大主流框架
776 3
|
SQL 存储 关系型数据库
MySQL8.0之执行计划
MySQL8.0.17 执行计划
2810 0
|
网络协议 网络架构
ipv6和ipv4的过渡方案
ipv6和ipv4的过渡方案
2916 0
|
存储 弹性计算 大数据
阿里云服务器是什么?优势、功能和应用场景详细介绍
阿里云服务器是什么?优势、功能和应用场景详细介绍,云服务器租用价格、云服务器使用场景及限制说明,阿里云服务器网分享云服务器ECS介绍、个人和企业免费试用、云服务器活动、云服务器ECS规格、优势、功能及应用场景详细说明
2288 0
|
JavaScript 前端开发 编译器
Typescript vs Javascript 这两种流行编程语言之间的主要区别
TypeScript 是 JavaScript 的一个超集,它添加了静态类型、类、接口和其他一些特性。下面是 TypeScript 和 JavaScript 之间的主要区别:
1073 0