Loading... ## 实训目的 · 回顾RIP协议基本原理和特点。 · 掌握RIPv2配置及其各个基本参数。 ## 实训背景 RIP(Routing Information Protocol,路由信息协议)是一种动态路由选择协议。它采用距离向量算法,是一种距离向量协议。只与自己直接连接的路由器交换信息,只学习15跳以内的路由信息。目前有RIPv1和RIPv2两种,区别如下: | 区别 | RIPv1 | RIPv2 | | ------------ | ----------------------------------- | ----------------------------------- | | 广播方式 | 广播报文,广播地址225.255.255.255 | 组播报文,组播地址224.0.0.9 | | 认证及汇总 | 没有认证,没有手工汇总 | 支持明文和MD5两种认证,可手工汇总 | | 更新周期 | 每30秒更新1次 | 触发更新 | | 标记 | 不能标记路由 | 可对路由做标记,用于过滤或策略 | RIP使用UDP协议交换路由信息,端口号为520。RIP应用于OSI网络7层模式中的网络层。 ## 实训拓扑 ![](https://wl.gta5pdx.cn/usr/uploads/2022/05/460971308.png) 实验所需设备: 环境:Cisco Packet Tracer 8.0 设备: 2台PC,2台2811路由器 ## 实训步骤 ###### 步骤1:基本配置。 R1: ``` Ruijie>enable Ruijie#config terminal Ruijie(config)#hostname R1 R1(config)# ``` R2: ``` Ruijie>enable Ruijie#config terminal Ruijie(config)#hostname R2 R2(config)# ``` ###### 步骤2:全网基本IP地址配置。 R1: ``` R1(config)#interface fastEthernet 0/0 R1(config-FastEthernet 0/0)#ip address 192.168.1.1 255.255.255.0 R1(config-FastEthernet 0/0)#no shutdown R1(config-FastEthernet 0/0)#exit R1(config)#interface fastEthernet 0/1 R1(config-FastEthernet 0/1)#ip address 192.168.2.1 255.255.255.0 R1(config-FastEthernet 0/1)#no shutdown R1(config-FastEthernet 0/1)#exit R1(config)# ``` R2: ``` R2(config)#interface fastEthernet 0/0 R2(config-if-FastEthernet 0/0)#ip address 192.168.1.2 255.255.255.0 R2(config-if-FastEthernet 0/0)#no shutdown R2(config-if-FastEthernet 0/0)#exit R2(config)#interface fastEthernet 0/1 R2(config-if-FastEthernet 0/1)#ip address 192.168.3.1 255.255.255.0 R2(config-if-FastEthernet 0/1)#no shutdown R2(config-if-FastEthernet 0/1)#exit R2(config)# ``` PC1: ![](https://wl.gta5pdx.cn/usr/uploads/2022/05/3609302980.png) PC2: ![](https://wl.gta5pdx.cn/usr/uploads/2022/05/4145669601.png) ###### 步骤3:全网路由启用rip,并把对应的接口通告到rip进程。 **注意:** · RIP有2个版version 1和version 2,version 2使用组播更新代替广播更新,且携带路由的掩码信息,建议使用RIPv2。 · RIP通过命令network通告网络时,只能通告主类网络,即使network写子网地址,也会通告该主类网络,属于该主类网络的所有接口,都会被通告进RIP进程。 · RIP默认会在主类网络边界做自动汇总,若有不连续网络,会导致路由学习异常,建议启用RIP协议后,关闭自动汇总,采用手工汇总的方式。 R1: ``` R1(config)#router rip R1(config-router)#version 2 R1(config-router)#no auto-summary R1(config-router)#network 192.168.1.0 R1(config-router)#network 192.168.2.0 R1(config-router)#end R1# ``` R2: ``` R2(config)#router rip R2(config-router)#version 2 R2(config-router)#no auto-summary R2(config-router)#network 192.168.1.0 R2(config-router)#network 192.168.3.0 R2(config-router)#end R2# ``` 步骤4:使用show ip route命令查看RIP协议。 ``` R1#show ip route ``` ![](https://wl.gta5pdx.cn/usr/uploads/2022/05/3299060096.png) 步骤5:使用Ping测试PC1与PC2是否互通。 ![](https://wl.gta5pdx.cn/usr/uploads/2022/05/1380825716.png) 最后修改:2022 年 05 月 22 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏