免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2626 | 回复: 0

使用cisco路由器实现IPV6 tunnel [复制链接]

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
发表于 2008-05-21 08:51 |显示全部楼层

使用cisco路由器实现IPV6 tunnel
  说明:此案例使用两台cisco2500路由器,IOS (tm) 2500 Software (C2500-IS-L), Version 12.2(15)T9,利用ip v4主干加ipv6的6to4 tunnel结合ipv6静态路由,就能实现两个远程ipv6子网的互连互通.
  拓扑说明:使用两台路由器的e0接口互连仿真ipv4的
主干,使用loopback0仿真两个远程的ipv6子网,6to4tunnel必须在所有的ipv6子网使用标准的ipv6地址前缀(2002::/16)进行编址.
  在两个端点建立tunnel时,必须使用本地路由器的ipv4接口的ip地址结合2002前缀来对本路由器的tunnel接口做编址.例如R1的e0:192.168.1.1,则R1的tunnel接口的ipv6地址一定要包含此地址的16进制格式,即2002:C0A8:101:…,其中C0A8:101即为e0接口ip地址的16进制.
配置和测试结果如下:
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
在R1上测试直连的ipv6 tunnel接口:
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
在R1上测试到R3的ipv6 loopback0接口(非直连):
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


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_696694.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP