实验17-1: IPv6 静态路由
Ø 实验目的
通过本实验可以掌握
(1)启用IPv6 流量转发
(2)配置IPv6 地址
(3)IPv6 静态路由配置和调试
(4)IPv6 默认路由配置和调试
Ø 拓扑结构
实验步骤
u 步骤1:配置路由器R1
R1(config)#ipv6 unicast-routing //启用IPv6 流量转发
R1(config)#interface Loopback0
R1(config-if)#ipv6 address 2006:AAAA::1/64 //配置IPv6 地址
R1(config)#interface Loopback1
R1(config-if)#ipv6 address 2006:BBBB::1/64
R1(config)#interface Serial1/0
R1(config-if)#ipv6 address 2007:CCCC::1/64
R1(config-if)#no shutdown
R1(config)#ipv6 route 2008:DDDD::/64 Serial1/0 //配置IPv6 静态路由
u 步骤2:配置路由器R2
R2(config)#ipv6 unicast-routing
R2(config)#interface Loopback0
R2(config-if)#ipv6 address 2008:DDDD::2/64
R2(config)#interface Serial1/0
R2(config-if)#ipv6 address 2007:CCCC::2/64
R2(config-if)#clockrate 128000
R2(config-if)#no shutdown
R2(config)#ipv6 route ::/0 Serial1/0 //配置IPv6 默认路由
Ø 实验调试
n show ipv6 interface
该命令用来查看IPv6 的接口信息。
R1#show ipv6 interface s1/0
Serial1/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::CE00:13FF:FEE8:0
FE80::C800:BFF:FE80:0
//本接口启用IPv6,本地链路地址自动配置
Global unicast address(es):
2007:CCCC::1, subnet is 2007:CCCC::/64
//全球聚合地址
Joined group address(es):
FF02::1
//表示本地链路上的所有节点和路由器
FF02::2
//表示本地链路上的所有路由器
FF02::1:FF00:1
//用于替换ARP 机制的被请求节点的多播地址
FF02::1:FFE8:0
//与单播地址2007:CCCC::1 相关的被请求节点多播地址
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
//启用ICMP 重定向
ND DAD is enabled, number of DAD attempts: 1
//邻居发现和重复地址检测启动
ND reachable time is 30000 milliseconds
//ND 可达时间
Hosts use stateless autoconfig for addresses
//使用无状态自动配置地址
n show ipv6 route
该命令用来查看IPv6 路由表。
R1#show ipv6 route
IPv6 Routing Table - 9 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
C 2006:AAAA::/64 [0/0]
via ::, Loopback0
L 2006:AAAA::1/128 [0/0]
via ::, Loopback0
C 2006:BBBB::/64 [0/0]
via ::, Loopback1
L 2006:BBBB::1/128 [0/0]
via ::, Loopback1
C 2007:CCCC::/64 [0/0]
via ::, Serial1/0
L 2007:CCCC::1/128 [0/0]
via ::, Serial1/0
S 2008:DDDD::/64 [1/0]
via ::, Serial1/0
L FE80::/10 [0/0]
via ::, Null0
R2#show 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, 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 ::/0 [1/0]
via ::, Serial1/0
C 2007:CCCC::/64 [0/0]
via ::, Serial1/0
L 2007:CCCC::2/128 [0/0]
via ::, Serial1/0
C 2008:DDDD::/64 [0/0]
via ::, Loopback0
L 2008:DDDD::2/128 [0/0]
via ::, Loopback0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
以上输出表明路由器R1 上有一条IPv6 的静态路由,R2 上有一条IPv6 的默认路由,IPv6中的默认路由是没有“*”的。
(3)ping
R2#ping ipv6 2006:AAAA::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2006:AAAA::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/62/76 ms
实验17-2: IPv6 RIPng
Ø 实验目的
通过本实验可以掌握
(1)启用IPv6 流量转发
(2)向RIPng 网络注入默认路由
(3) RIPng 配置和调试
Ø 拓扑结构
实验步骤
n 步骤1:配置路由器R1
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 router rip cisco
R1(config-rtr)#split-horizon
R1(config-rtr)#poison-reverse
R1(config)#interface Serial1/0
R1(config-if)#ipv6 address 2007:12::1/64
R1(config-if)#ipv6 rip cisco enable
R1(config-if)#clockrate 128000
R1(config-if)#no shutdown
R1(config)#interface Serial1/1
R1(config-if)#ipv6 address 2007:13::1/64
R1(config-if)#ipv6 rip cisco enable
R1(config-if)#no shutdown
n 步骤2:配置路由器R2
R2(config)#ipv6 unicast-routing
R2(config)#ipv6 router rip cisco
R2(config-rtr)#split-horizon
R2(config-rtr)#poison-reverse
R2(config)#interface Serial1/0
R2(config-if)#ipv6 address 2007:12::2/64
R2(config-if)#ipv6 rip cisco enable
R2(config-if)#no shutdown
R2(config)#interface Serial1/1
R2(config-if)#ipv6 address 2007:24::2/64
R2(config-if)#ipv6 rip cisco enable
R2(config-if)#clock rate 128000
R2(config-if)#no shutdown
n 步骤3:配置路由器R3
R3(config)#ipv6 unicast-routing
R3(config)#ipv6 router rip cisco
R3(config-rtr)#split-horizon
R3(config-rtr)#poison-reverse
R3(config)#interface Loopback0
R3(config-if)#ipv6 address 2008:3333::3/64
R3(config-if)#ipv6 rip cisco enable
R3(config)#interface Serial1/1
R3(config-if)#ipv6 address 2007:13::3/64
R3(config-if)#ipv6 rip cisco enable
R3(config-if)#no shutdown
n 步骤4:配置路由器R4
R4(config)#ipv6 unicast-routing
R4(config)#ipv6 router rip cisco //启动IPv6 RIPng 进程
R4(config-rtr)#split-horizon //启用水平分割
R4(config-rtr)#poison-reverse //启用毒化反转
R4(config)#interface Loopback0
R4(config-if)#ipv6 address 2008:4444::4/64
R4(config-if)#ipv6 rip cisco enable //在接口上启用RIPng
R4(config)#interface Serial1/1
R4(config-if)#ipv6 address 2007:24::4/64
R4(config-if)#ipv6 rip cisco enable
R4(config-if)#ipv6 rip cisco default-information originate
//向IPv6 RIPng 区域注入一条默认路由(::/0)
R4(config-if)#no shutdown
R4(config)#ipv6 route ::/0 Loopback0 //配置默认路由
【提示】
“ipv6 rip cisco default-information only ”命令也可以向IPv6 RIPng 区域注入
一条默认路由,但是该命令只从该接口发送默认的IPv6 路由,而该接口其它的IPv6 的RIPng路由都被抑制。
Ø 实验调试
(1)show ipv6 route
R2#show ipv6 route
IPv6 Routing Table - 10 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
R ::/0 [120/2]
via FE80::CE03:11FF:FE9C:0, Serial1/1
R 2006:3333::/64 [120/3]
via FE80::CE00:11FF:FE9C:0, Serial1/0
C 2007:12::/64 [0/0]
via ::, Serial1/0
L 2007:12::2/128 [0/0]
via ::, Serial1/0
R 2007:13::/64 [120/2]
via FE80::CE00:11FF:FE9C:0, Serial1/0
C 2007:24::/64 [0/0]
via ::, Serial1/1
L 2007:24::2/128 [0/0]
via ::, Serial1/1
R 2008:4444::/64 [120/2]
via FE80::CE03:11FF:FE9C:0, Serial1/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
以上输出表明R4 确实向IPv6 RIPng 网络注入一条IPv6 的默认路由,同时收到3 条
IPv6 RIPng 路由条目,而且所有IPv6 RIPng 路由条目的下一跳地址均为邻居路由器接口的“link-local”地址。可以通过“show ipv6 rip next-hops”命令查看RIPng 的下一跳地址。
R2#show ipv6 rip next-hops
RIP process "cisco", Next Hops
FE80::CE00:11FF:FE9C:0/Serial1/0 [3 paths]
FE80::CE03:11FF:FE9C:0/Serial1/1 [3 paths]
(2)show ip protocols
R2#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "rip cisco"
Interfaces:
Serial1/1
Serial1/0
Redistribution:
None
以上输出表明启动的IPv6 RIPng 进程为cisco,同时在Serial1/1 和Serial1/0
接口上起用RIPng。
n show ipv6 rip database
该命令用来查看RIPng 的数据库。
R2#show ipv6 rip database
RIP process "cisco", local RIB
2006:3333::/64, metric 3, installed
Serial1/0/FE80::CE00:11FF:FE9C:0, expires in 171 secs
2007:12::/64, metric 2
Serial1/0/FE80::CE00:11FF:FE9C:0, expires in 171 secs
2007:13::/64, metric 2, installed
Serial1/0/FE80::CE00:11FF:FE9C:0, expires in 171 secs
2007:24::/64, metric 2
Serial1/1/FE80::CE03:11FF:FE9C:0, expires in 167 secs
2008:4444::/64, metric 2, installed
Serial1/1/FE80::CE03:11FF:FE9C:0, expires in 167 secs
::/0, metric 2, installed
Serial1/1/FE80::CE03:11FF:FE9C:0, expires in 167 secs
以上输出显示了R2 的RIPng 的数据库。
n debug ipv6 rip
该命令用来动态查看RIPng 的更新。
R2#debug ipv6 rip
RIP Routing Protocol debugging is on
*Mar 1 01:00:47.251: RIPng: response received from FE80::CE03:11FF:FE9C:0 on Serial1/1 for cisco
*Mar 1 01:00:47.255: src=FE80::CE03:11FF:FE9C:0 (Serial1/1)
*Mar 1 01:00:47.259: dst=FF02::9
*Mar 1 01:00:47.259: sport=521, dport=521, length=132
*Mar 1 01:00:47.263: command=2, version=1, mbz=0, #rte=6
*Mar 1 01:00:47.263: tag=0, metric=1, prefix=2008:4444::/64
*Mar 1 01:00:47.267: tag=0, metric=1, prefix=2007:24::/64
*Mar 1 01:00:47.267: tag=0, metric=16, prefix=2007:12::/64
*Mar 1 01:00:47.271: tag=0, metric=16, prefix=2007:13::/64
*Mar 1 01:00:47.271: tag=0, metric=16, prefix=2006:3333::/64
*Mar 1 01:00:47.275: tag=0, metric=1, prefix=::/0
*Mar 1 01:00:50.455: RIPng: response received from FE80::CE00:11FF:FE9C:0 on Serial1/0 for cisco
*Mar 1 01:00:50.459: src=FE80::CE00:11FF:FE9C:0 (Serial1/0)
*Mar 1 01:00:50.463: dst=FF02::9
*Mar 1 01:00:50.463: sport=521, dport=521, length=132
*Mar 1 01:00:50.467: command=2, version=1, mbz=0, #rte=6
*Mar 1 01:00:50.467: tag=0, metric=1, prefix=2007:12::/64
*Mar 1 01:00:50.471: tag=0, metric=1, prefix=2007:13::/64
*Mar 1 01:00:50.471: tag=0, metric=2, prefix=2006:3333::/64
*Mar 1 01:00:50.475: tag=0, metric=16, prefix=2007:24::/64
*Mar 1 01:00:50.475: tag=0, metric=16, prefix=2008:4444::/64
*Mar 1 01:00:50.479: tag=0, metric=16, prefix=::/0
*Mar 1 01:00:53.435: RIPng: Sending multicast update on Serial1/1 for cisco
*Mar 1 01:00:53.439: src=FE80::CE01:11FF:FE9C:0
*Mar 1 01:00:53.439: dst=FF02::9 (Serial1/1)
*Mar 1 01:00:53.443: sport=521, dport=521, length=132
*Mar 1 01:00:53.447: command=2, version=1, mbz=0, #rte=6
*Mar 1 01:00:53.447: tag=0, metric=1, prefix=2007:12::/64
*Mar 1 01:00:53.451: tag=0, metric=1, prefix=2007:24::/64
*Mar 1 01:00:53.451: tag=0, metric=2, prefix=2007:13::/64
*Mar 1 01:00:53.455: tag=0, metric=3, prefix=2006:3333::/64
*Mar 1 01:00:53.455: tag=0, metric=16, prefix=2008:4444::/64
*Mar 1 01:00:53.459: tag=0, metric=16, prefix=::/0
*Mar 1 01:00:53.463: RIPng: Sending multicast update on Serial1/0 for cisco
*Mar 1 01:00:53.463: src=FE80::CE01:11FF:FE9C:0
*Mar 1 01:00:53.467: dst=FF02::9 (Serial1/0)
*Mar 1 01:00:53.467: sport=521, dport=521, length=132
*Mar 1 01:00:53.471: command=2, version=1, mbz=0, #rte=6
*Mar 1 01:00:53.471: tag=0, metric=1, prefix=2007:12::/64
*Mar 1 01:00:53.475: tag=0, metric=1, prefix=2007:24::/64
*Mar 1 01:00:53.475: tag=0, metric=16, prefix=2007:13::/64
*Mar 1 01:00:53.479: tag=0, metric=16, prefix=2006:3333::/64
*Mar 1 01:00:53.483: tag=0, metric=2, prefix=2008:4444::/64
*Mar 1 01:00:53.483: tag=0, metric=2, prefix=::/0
以上输出显示路由器R2 发送和接收RIPng 的信息