CCNP实验2-1:升级到无类路由协议

简介:
实验2-1:升级到无类路由协议

【实验目的】:
在本次实验中,你将安装路由信息协议第二版(RIPV2)。
在完成本次实验之后,你需要完成下列任务:
  • 连接到网络中所有的设备,并且对使用RIPV2布署完整的网络明确的概念。
  • 理解RIPV2的一些特性,如支持缺省路由,可变长度的子网掩码(VLSM)和路由聚合。
  • 理解VLSM怎么使网络更有效。
【实验拓扑】:
注意:图中x为所在机架编号,y为路由器编号。
【实验帮助】:
如果出现任何问题,可以向在值的辅导老师提出并请求提供帮助。
【命令列表】:
命令
描述
(config-router)#default-information originate
RIP来发布缺省路由
(config)#ip classless
激活路由器使用无类路由
(config)#ip route 0.0.0.0 0.0.0.0 172.31.x.3
创建一条静态缺省路由
(config-if)#ip summary-address rip 10.x.0.0 255.255.0.0
发布一条汇总路由。
(config-router)#network 172.31.0.0
指定RIP应该发布哪一些网络(有类)
(config-router)no auto-summary
在边界路由器上进行自动汇总。
(config #router rip
打开RIP路由协议
(config-router)#version 1
使用RIP v1
(config-router)#version 2
使用RIP v2
【任务一】:探索有类路由选择。
使用TELNET或者其他终端程序建立与路由器建立联接。记住在本实验中x是你的机架编号,y是你的路由器编号。
实验之前,请确保你的路由器配置与下列类似:
P1R1  P1R2
hostname P1R1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
no ip domain lookup
!
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
!
interface Serial0
ip address 172.31.1.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 172.31.1.3 111 broadcast
no frame-relay inverse-arp
!
interface Serial1
ip address 10.1.0.1 255.255.255.0
clockrate 64000
!
ip route 0.0.0.0 0.0.0.0 172.31.1.3
no ip http server
no ip classless
P1R3 P1R4
hostname P1R3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
ip subnet-zero
no ip domain lookup
!
interface Ethernet0
ip address 10.1.1.3 255.255.255.0
!
interface Serial0
ip address 10.1.3.3 255.255.255.0
shutdown
clockrate 64000
!
interface Serial1
no ip address
shutdown
!
no ip http server
ip classless
!
line con 0
exec-timeout 30 0
logging synchronous
line aux 0
line vty 0 4
login
实验过程:

第一步:在所有的路由器上配置使用RIP 版本1,并发布网络(10.0.0.0)和,在帧中继边界路由器上, 同时发布B类网络172.31.0.0

第二步:使用命令version 1明确的指定使用RIPv1。缺省情况下,路由器发送和接收版本1和版本2的路由,设置路由器使用版本1以防止骨干路由器同时运行两种版本。

第三步:使用show ip protocols命令,验证路由器是仅仅运行版本1。你的路由器输入应该与下表类似:
P1R1#sh ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 24 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive version 1
Interface Send Recv Triggered RIP Key-chain
Ethernet0 1 1
Serial0 1 1
Serial1 1 1
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
172.31.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.0.2 120 00:00:19
172.31.1.3 120 00:00:25
Distance: (default is 120)

第四步:在内部路由器PxR4上,使用ping命令测试内部路由器与TFTP服务器之间连接的正确性。为什么PING TFTP服务器是不成功的,你的显示应该是下列类似
P2R4#ping 10.254.0.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.254.0.254, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
P2R4#

第五步:有类路由选择的行为是寻找未知的路由在直连的有类网络(在这个例子中是10.0.0.0和并不考虑更为详细的路由。有类路由协议,例如RIP v1,在路由更新中并不交换子网掩码,只是简单的发布整个有类网络。在边界路由器和BBR1之间的路由散布跨过了172.31.0.0网络。因此,所有三个路由器汇总了这个子网并在彼此之间广告网络10.0.0.0。每一个路由器都认为自己有了路由到达这个网,并忽略这个广告。你可以通过命令debug ip rip命令来进行验证。这个内部路由器因此并不能到达核心,因为它的路由表中没有这个子网。请在内部路由器上显示路由表验证这个问题,尝试寻找网络10.254.0.0

第六步:为了使内部路由器能够到达核心网络,边界路由器上将通过RIP散布缺省路由到内部路由器。首先,在边界路由器上添加一条缺省静态路由,并在RIP配置模式下使用default-information orginate命令。

第七步:检查内部路由器的路由表。现在这里有路径了吗?记住,RIP的收敛是很慢的。即使这是一个很小的网络,在缺省路由出现在你的内部路由器之前,你也需要等待一些时间。为了强制RIP协议收敛,,你可以使用clear ip route *命令。收敛收后的路由表应该与下图类似:
P1R4#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.1.2.2 to network 0.0.0.0
R 172.31.0.0/16 [120/1] via 10.1.2.2, 00:00:20, Ethernet0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.2.0 is directly connected, Ethernet0
R 10.1.0.0 [120/1] via 10.1.2.2, 00:00:20, Ethernet0
R* 0.0.0.0/0 [120/8] via 10.1.2.2, 00:00:20, Ethernet0

第八步:现在我们再使用PING命令来测试TFTP服务器与内部路由器之间的连接。这个PINGTFTP服务器还是不成功的,为什么? 你的显示应该与下列类似:
P2R4#ping 10.254.0.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.254.0.254, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
P2R4#

【任务二】:探索无类的转发
现在内部路由器仍然PING不通TFTP服务器的原因是有类路由的特性,就像刚才我们所讨论的,寻找一个直连的有类网络(在这个例子中是10.0.0.0)中的一个未知的路由,并没有考虑到缺省路由。有类路由协议的特性引起了这个问题,那下面我们来发现无类路由的行为。
实验过程:

第一步:内部路由器不能到达TFTP服务器,是因为边界路由器使用了no ip classless命令。有类路由的行为只是在直连的有类网络(在这个例子中是10.0.0.0)以内查找未知的路由并且他不会考虑更为详细的路由条目。

第二步:激活IP classless在每一个路由器上,使路由器执行无类中行为

第三步:测试内部路由器和TFTP服务器之间连接的正确性。

第四步:尽管更改了路由器的行为,但是RIP v1还是一个有类路由协议并且还是在跨越帧中继网络时进行自动汇总。这个路由器BBR1将没有路由返回10.x.1.0/2410.x.2.0/24子网。为了弥补这点,使用RIP无类版本,RIP v2。另外,在边界路由器上关启自动汇总。

第五步:等待一会,然后测试内部路由器与TFTP服务器的连通性。你的测试结果应该和下列类似:
P2R4#ping 10.254.0.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.254.0.254, timeout is 2 seconds:
!!!!!
Success rate is 0 percent (0/5)
P2R4#
【任务三】:优化无类路由,增加无类路由的扩展性
实验过程:

第一步:从内部路由器,使用TELNET连接到BBR1(172.31.x.3)。所有的你的路由器所有的网络都应该列表在BBR1的路由表中,你的显示应该和下列类似:
BBR1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
Gateway of last resort is not set
172.31.0.0/24 is subnetted, 1 subnets
C 172.31.1.0 is directly connected, Serial0
S 192.168.11.0/24 [1/0] via 172.31.1.2
10.0.0.0/24 is subnetted, 3 subnets
R 10.1.2.0 [120/1] via 172.31.1.2, 00:00:08, Serial0
R 10.1.1.0 [120/1] via 172.31.1.1, 00:00:08, Serial0
R 10.1.0.0 [120/1] via 172.31.1.1, 00:00:07, Serial0
[120/1] via 172.31.1.2, 00:00:07, Serial0
C 10.254.0.0 is directly connected, Ethernet0
S 192.168.1.0/24 [1/0] via 172.31.1.1
BBR1#

第二步:随着网络的变大,一个大的路由表并不有效的,因为他需要更多内部来存储他们。如果第一条路由都在路由表里,那么任何路由事件(如:抖动)必须是散布到整个网络中。路由汇总限制更新数据包和最小化路由器的路由表。使用ip summary-address rip命令配置边界路由器去声明一个汇总路由10.x.0.0 255.255.0.0BBR1。你需要在哪里输入适当的命令呢?

第三步:再一次查看BBR1的路由表。记住,RIP是慢的收敛的。你可能需要等待一些时间。即使这里是一个小网络。在汇总路由出现在BBR1之前,你可能看到许多路由,但是最终的显示应该与下列类似:
BBR1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
Gateway of last resort is not set
172.31.0.0/24 is subnetted, 1 subnets
C 172.31.1.0 is directly connected, Serial0
S 192.168.11.0/24 [1/0] via 172.31.1.2
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R 10.1.0.0/16 [120/1] via 172.31.1.2, 00:00:02, Serial0
[120/1] via 172.31.1.1, 00:00:02, Serial0
C 10.254.0.0/24 is directly connected, Ethernet0
S 192.168.1.0/24 [1/0] via 172.31.1.1
BBR1#

第四步:使用show ip protocols命令检查RIP的详细操作。你的显示结果应该与下列类似:
P1R2#sh ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 26 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Ethernet0 2 2
Serial0 2 2
Serial1 2 2
Automatic network summarization is not in effect
Address Summarization:
10.1.0.0/16 for Serial0
Maximum path: 4
Routing for Networks:
10.0.0.0
172.31.0.0
Routing Information Sources:
Gateway Distance Last Update
10.1.0.1 120 00:06:35
10.1.2.4 120 00:05:16
172.31.1.3
*Mar 1 01:15:07.475: %SYS-5-CONFIG_I: Configured from console by console
120 00:00:22
Distance: (default is 120)
P1R2#
【实验验证】:
成功完成整个实验,你需要完成下列任务:
  • 你能够配置RIPv2和有并且对使用RIPV2布署完整的网络有明确的概念。
  • 理解RIP v2支持缺省路由,VLSM和路由汇总
  • 理解VLSM怎么使网络更有效。
 
    本文转自hexianguo 51CTO博客,原文链接: http://blog.51cto.com/xghe110/69059 ,如需转载请自行联系原作者



相关文章
|
11月前
|
网络虚拟化
Cisco——HSRP实验案例一
Cisco——HSRP实验案例一
|
网络协议 Shell 数据安全/隐私保护
|
数据安全/隐私保护 网络虚拟化 网络架构
|
网络协议 数据库
|
网络协议 网络架构
|
网络架构 算法 网络协议