《实验四 路由器RIP实验.docx》由会员分享,可在线阅读,更多相关《实验四 路由器RIP实验.docx(4页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、实验四路由器RIP实验4.1 知识准备掌握ZSR的基本操作,了解RIP原理。4.2 实验目的掌握在ZSR路由器上配置rip所需的基本命令;掌握rip的基本原理。4.3 实验内容ZSR路由器的rip协议配置4.4 实验设备两台两台两根一根ZSRPC直连网线交叉网线4.5 网络拓扑4.6 配置步骤按照实验图连接好设备。R1:进入全局配置模式ZXR10_R 1 #configure terminalZXR 10_R 1 (config)#interface fei_l/l进入端 口 配置模式ZXR10_Rl(config-if)#ip adderss 192.168.1.1 255.255.255.
2、0 /将和 R2 连接的端 口配上 ipZXR10_R 1 (config-if)#exit退回全局配置模式ZXR10_R1 (config)#interface fei_0/l/进入端 口 配置模式ZXR10_Rl(config-if)#ip adderss 192.168.2.1 将和 PCI 连接的端口配上 ipZXR 10_R 1 (config-if)#exit退回全局配置模式ZXR 10_R 1 (config)#router rip进入 rip 路由配置模式ZXR 10_R 1 (config-router)#network 192.168.1.0 0.0.0.255 将和 R2
3、 连接的端 口加入 rip 协议中ZXR 10_R 1 (config-router)#network 192.168.2.0 0.0.0.255 将和 PCI 连接的端 口加入 rip 协议中R2:ZXR 10_R2#configure terminal进入全局配置模式ZXR 10_R2(config)#interface fei_l/l进入端 口 配置模式ZXR10_R2(config-if)#ip adderss 192.168.1.2 255.255.255.0 将和 R1 连接的端口配上 ipZXR 10_R2(config-if)#exit/退回全局配置模式ZXR 10_R2(co
4、nfig)#interface fei_0/l进入端 口 配置模式ZXR10_R2(config-if)#ip adderss 192.168.3.1 将和 PC2 连接的端口配上 ipZXR 10_R2(config-if)#exit退回全局配置模式ZXR 10_R2(config)#router rip进入 rip 路由配置模式ZXR 10_R2(config-router)#network 192.168.1.0 0.0.0.255 将和 R1 连接的端口加入 rip 协议中ZXR 10_R2(config-router)#network 192.168.3.0 0.0.0.255 /将
5、和 PC2 连接的端 口加入 rip 协议中4.7 验证方法ZXR10-Rl#show ip routeIPv4 Routing Table:Dest metric192.168.1.0 0192.168.1.1 0MaskGwInterfaceOwnerpnfei1/1directfei 1/1address255.255.255.255 192.168.2.1 fei_0/ldirect0address 00rip120测试网络互通性,应该是全网互通的。如果不是,请检查您的配置是否与上面的一致。 现在我们可以看看RIP是怎样发现路由的,在特权模式下打开RIP协议调试开关,有 如下信息在路由
6、器之间传递,它们完成了路由的交换,并形成新的路由。ZXR10-R1# debug ip rip all00:19:36: RIP: building update entries192.168.2.0/24 via 0.0.0.0, metric 1, tag 000:19:36: RIP: Update contains 1 routes00:19:36: RIP: sending v2 periodic update to 224.0.0.9 via fei_l/l (192.168.1.1)192.168.1.0/24 via 0.0.0.0, metric 1, tag 0192.16
7、8.3.0/24 via 0.0.0.0, metric 2, tag 0从上面的信息可以看到RIP协议版本为version 2,这是中兴ZSR路由器的默认版本。 水平分割默认是打开的。关闭水平分割后,可以查看和上面的debug信息有何不同? ZXR10-R1 (config-if)#no ip split-horizonZXR10-R1# debug ip rip all00:35:07: RIP: building update entries192.168.2.0/24 via 0.0.0.0, metric 1, tag 0192.168.3.0/24 via 0.0.0.0, met
8、ric 2, tag 000:35:07: RIP: Update contains 2 routes00:35:07: RIP: sending v2 periodic update to 224.0.0.9 via fei_l/l (192.168.1.1)192.168.1.0/24 via 0.0.0.0, metric 1, tag 0192.168.3.0/24 via 0.0.0.0, metric 2, tag 000:35:07: RIP: Update contains 2 routes00:35:07: RIP: sending v2 periodic update to
9、 224.0.0.9 via fei_0/l (192.168.2.1)在将RI和R2与PC互连的地址改为192. 168. 2. 1/25和192. 168. 2. 129/25后,关掉自 动聚合功能。观察在关掉自动汇聚前后路由表的变化。ZXR10_R 1 (config)#interface fei_0/lZXR10_R 1 (config)#router ripZXR10_R 1 (config-router)# no auto-summary 关闭自动汇聚ZXR10_Rl#show ip route关闭前IPv4 Routing Table:DestMaskGwInterfaceOwn
10、erpnmetric3.3.3.3255.255.255.255 loopback1address 00fei_l/ldirect 00fei_l/laddress 00fei_0/ldirect 00fei_0/laddress 00关闭后ZXR 10_R 1 #show ip routeIPv4 Routing Table:DestMaskGwInterfaceOwnerprimetricloopback1addressfei 1/1directfei 1/1addressfei 1/1rip120fei 0/1directfei 0/1address并在关闭和启动自然后改变协议版本ZXR 10-R1 (config-router)#version 1并使之生效,动聚合功能下显示路由表信息会发现都没有动态路由产生,知道为什么吗?因为 version 1不支持可变长 子网掩码,而与192.1682 129属于C类地址,自 然掩码为24位,属于同一网段的地址。人家可以自己做实验试一试。4.8TIPS对接设备的RIP版本要一致。多网段时注意自动汇聚的作用。