动态路由协议包括距离向量路由协议和链路状态路由协议。RIP(路由信息协议)是使用最广泛的距离向量路由协议。RIP是为小型网络设计的。

RIP用两种数据包传输更新:更新和请求,每个有RIP功能的路由器默认情况下每个30s利用UDP 520端口向与它直连的邻居广播(RIP v1)或组播(RIP v2)路由更新。

为了避免路由环路,RIP采用水平分割,毒性逆转,定义最大跳数,闪式更新,抑制计时方法。

RIP协议的特点:

1.距离向量路由协议

2.使用跳数(hop count)作为度量值

3.默认路由更新周期30s

4.管理距离120

5.支持触发更新

6.最大跳数15

7.支持等价路径,默认4,最大6条

8.使用udp520端口进行路由更新

 

实验:RIP v1基本配置

实验目的:启动rip v1 路由进程;启动参与接口并通告网络;理解路由表含义:查看和调试相关信息

实验拓扑:

RIP - 壁虎 - Me~~study house!
 
实验步骤:
R1:
enable
conf t
no ip domain-lookup
line cons 0
logging synchronous
no exec-t
exit
int lo 0
ip add 1.1.1.1 255.255.255.0
no shut
int s1/0
ip add 192.168.12.1 255.255.255.0
clock rate 64000
no shut
exit
router rip
version 1
net 192.168.12.0
net 1.0.0.0
 
R2
enable
conf t
no ip domain-lookup
line cons 0
logging synchronous
no exec-t
exit
int s1/0
ip add 192.168.12.2 255.255.255.0
no shut
int s1/1
ip add 192.168.23.2 255.255.255.0
clock rate 64000
no shut
exit
router rip
version 1
net 192.168.12.0
net 192.168.23.0
 
R3
enable
conf t
no ip domain-lookup
line cons 0
logging synchronous
no exec-t
exit
int s1/1
ip add 192.168.23.3 255.255.255.0
no shut
int s1/2
clock rate 64000
ip add 192.168.34.3 255.255.255.0
no shut
exit
router rip
version 1
net 192.168.23.0
net 192.168.34.0
 
R4
enable
conf t
no ip domain-lookup
line cons 0
logging synchronous
no exec-t
exit
int s1/2
ip add 192.168.34.4 255.255.255.0
no shut
int lo 0
ip add 4.4.4.4 255.255.255.0
no shut
exit
router rip
version 1
net 4.0.0.0
net 192.168.34.0
 
 实验配置完成,各网段能互访!
下面来看看R1的路由表,如图:
RIP - 壁虎 - Me~~study house!
 
R    4.0.0.0/8 [120/3] via 192.168.12.2, 00:00:07, Serial1/0    //R表示通过RIP协议学习来的;4.0.0.0/8目的网段;【120/3】管理距离120,度量值3即跳数;192.168.12.2下一条地址;距离下次更新还有23s(30-7);接收该路由条目的本地接口
 
 
clear ip route *
debug ip rip  //查看RIP路由协议动态更新过程
 
 
RIP命令汇总: RIP - 壁虎 - Me~~study house!
 
RIP - 壁虎 - Me~~study house!