设为首页收藏本站language 语言切换
查看: 2273|回复: 1
收起左侧

CCNP之IPv6技术-静态路由

[复制链接]
发表于 2009-12-17 10:50:49 | 显示全部楼层 |阅读模式
实验平台:Cisco 3725+NM4T串口模块+GT96100-FE快速以太网模块

  IOS:c3725-adventerprisek9-mz.124-9.T1.bin

  实验拓扑:如下图:

R1-R2-R3
R1配置:

  R1(config)#ipv6 unicast-routing //开启IPv6路由功能(不能少)

  R1(config)#int fa0/0

  R1(config-if)#ipv6 enable //在接口上开启IPv6,会自动生成一个链路本地地址以FE80开头

  R1(config-if)#ipv6 address 2000::1/16 //如果直接手动指定一个IPv6地址也会自动产生上述地址

  R1(config-if)#no shut

  R1(config)#int s1/0

  R1(config-if)#ipv6 address 2001::1/16

  R1(config-if)#no shut

  R1(config)#ipv6 route ::/0 2001::2 //默认路由

  R1(config)#do show ipv6 rou

  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, 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

  D - EIGRP, EX - EIGRP external

  S   ::/0 [1/0]     //跟的是下跳路由器的接口,发现默认管理距离是“1”和V4中一样

  via 2001::2

  --部分省略---

  R2配置:

  R2(config)#ipv6 unicast-routing

  R2(config)#int s1/0

  R2(config-if)#ipv6 address 2001::2/16

  R2(config-if)#no shut

  R2(config-if)#do p 2001::1 //能和对端R1通讯

  Type escape sequence to abort.

  Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:

  !!!!!

  Success rate is 100 percent (5/5), round-trip min/avg/max = 12/36/84 ms

  R2(config)#int s1/1

  R2(config-if)#ipv6 address 2002::1/16

  R2(config-if)#no shut

  R2(config)#ipv6 route 2000::/16 s1/0  //静态路由

  R2(config)#ipv6 route 2003::/16 s1/1  //R2不是末稍网络,所以不能用默认路由

  R2(config)#do show ipv rou

  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, 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

  D - EIGRP, EX - EIGRP external

S   2000::/16 [1/0]    //跟的是直连出口的名称,默认管理距离也是“1”V4中是“0”

  via ::, Serial1/0

  S   2003::/16 [1/0]

  via ::, Serial1/1

  --部分省略---

  R3配置:

  R3(config)#ipv6 unicast-routing

  R3(config)#int s1/0

  R3(config-if)#ipv add 2002::2/16

  R3(config-if)#no shut

  R3(config-if)#do ping 2002::1

  Type escape sequence to abort.

  Sending 5, 100-byte ICMP Echos to 2002::1, timeout is 2 seconds:

  !!!!!

  Success rate is 100 percent (5/5), round-trip min/avg/max = 16/44/80 ms

  R3(config-if)#int fa0/0

  R3(config-if)#ipv add 2003::1/16

  R3(config-if)#no shut

  R3(config)#ipv6 route ::/0 s1/0 20 //浮动默认路由

  R3(config)#do show ipv 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, 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

  D - EIGRP, EX - EIGRP external

  S   ::/0 [20/0]  //也可以人为指定管理距离

  via ::, Serial1/0

  --部分省略---

  R3#p 2000::1  //R3能成功ping通R1上的以太网口,证明整个网络是互通的

  Type escape sequence to abort.

  Sending 5, 100-byte ICMP Echos to 2000::1, timeout is 2 seconds:

  !!!!!
发表于 2013-8-19 01:05:04 | 显示全部楼层
沙发 2013-8-19 01:05:04 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-18 08:50 , Processed in 0.146801 second(s), 25 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表