实训目的
- 回顾RIP协议基本原理和特点。
- 掌握RIPv2配置及其各个基本参数。
实训背景
RIP(Routing Information Protocol,路由信息协议)是一种动态路由选择协议。它采用距离向量算法,是一种距离向量协议。只与自己直接连接的路由器交换信息,只学习15跳以内的路由信息。目前有RIPv1和RIPv2两种,区别如下:
路由器RIPv1配置-聚星云学院RIP使用UDP协议交换路由信息,端口号为520。RIP应用于OSI网络7层模式中的网络层。
实训拓扑
RIPv2-聚星云学院实验所需设备:
设备类型 | 设备型号 | 数量 |
---|---|---|
路由器 | RSR20 | 2 |
主机 | Windows 10 | 2 |
实训步骤
步骤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(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)#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)#exit
R1(config)#
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)#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)#exit
R2(config)#
PC1:
RIPv2-聚星云学院PC2:
RIPv2-聚星云学院步骤3:全网路由启用rip,并把对应的接口通告到rip进程。
注意:
- RIP有2个版本version 1和version 2,version 2使用组播更新代替广播更新,且携带路由的掩码信息,建议使用RIPv2。
- RIP通过命令network通告网络时,只能通告主类网络,即使network写子网地址,也会通告该主类网络,属于该主类网络的所有接口,都会被通告进RIP进程。
- RIP默认会在主类网络边界做自动汇总,若有不连续网络,会导致路由学习异常,建议启用RIP协议后,关闭自动汇总,采用手工汇总的方式。
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(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
RIPv2-聚星云学院
步骤5:使用Ping测试PC1与PC2是否互通。
RIPv2-聚星云学院
网友评论