《路由器关于RIP实验与协议》

RIP的特点
 
(1)仅和相邻的路由器交换信息。如果两个路由器之间的通信不经过另外一个路由器,那么这两个路由器是相邻的。RIP协议规定,不相邻的路由器之间不交换信息。
 
(2)路由器交换的信息是当前本路由器所知道的全部信息。即自己的路由表。
 
(3)按固定时间交换路由信息,如,每隔30秒,然后路由器根据收到的路由信息更新路由表。(也可进行相应配置使其触发更新)

路由信息协议(RIP) 是内部网关协议IGP中最先得到广泛使用的协议【RFC1058】。RIP是一种分布式的基于距离向量的路由选择协议,是因特网的标准协议,其最大优点就是实现简单,开销较小。
但RIP的缺点也较多。首先,其限制了网络的规模,能使用的最大距离为15(16表示不可达)。其次路由器交换的信息是路由器的完整路由表,因而随着网络规模的扩大,开销也就增加。最后,“坏消息传播得慢”,使更新过程的收敛时间过长。因此对于规模较大的网络就应当使用OSPF协议。然而目前在规模较小的网络中,使用RIP协议的仍占多数。

R1配置:
R1#
R1#conf t
R1(config)#router rip
R1(config-router)#version 2			//设置版本为2
R1(config-router)#network 1.1.1.0
R1(config-router)#network 2.2.2.0
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.4.0
R1(config-router)#exit
R1(config)#int f0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
R1(config)#int f1/0
R1(config-if)#ip add 192.168.4.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int
R1(config)#int l 1
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
R1(config)#int l 2
R1(config-if)#ip add 2.2.2.2 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
R2配置:

R2#conf t
R2(config)#router rip
R2(config-router)#version 2			//设置版本为2
R2(config-router)#no auto-summary
R2(config-router)#network 3.3.3.0
R2(config-router)#network 4.4.4.0
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
R2(config-router)#exit
R2(config)#int f0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int
R2(config)#int f1/0
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int l 1
R2(config-if)#ip add 3.3.3.3 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int l 2
R2(config-if)#ip add 4.4.4.4 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit

R2(config)#do ping 1.1.1.1			//测试ping 通1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/31/40 ms
R2(config)#do ping  2.2.2.2			//测试ping通2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/60 ms


R2(config)#do ping  192.168.1.1			//测试ping 通192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/48 ms


R3配置:
R3#conf t
R3(config)#router rip
R3(config-router)#version 2				//设置版本为2
R3(config-router)#no auto-summary
R3(config-router)#network  7.7.7.0
R3(config-router)#network  8.8.8.0
R3(config-router)#network  192.168.3.0
R3(config-router)#network  192.168.4.0
R3(config-router)#exit
R3(config)#int f0/0
R3(config-if)#ip add 192.168.3.2 255.255.255.0
R3(config-if)#no shut
R3(config-if)#
R3(config-if)#exit
R3(config)#int f1/0
R3(config-if)#ip add 192.168.4.2 255.255.255.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#
R3(config)#int l 1
R3(config-if)#ip add 7.7.7.7 255.255.255.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#int l 2
R3(config-if)#ip add
R3(config-if)#ip add 8.8.8.8 255.255.255.0
R3(config-if)#no shut
R3(config-if)#do ping 1.1.1.1			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/34/64 ms

R3(config)#exit
R3#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/29/68 ms
R3#ping 2.2.2.2					//测试ping 通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/32/48 ms
R3#ping 3.3.3.3				//测试ping 通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/71/124 ms
R3#ping 4.4.4.4			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/75/120 ms
R3#ping 5.5.5.5			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/36/64 ms
R3#ping 6.6.6.6			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/29/48 ms
R3#



R4配置:

R4#conf t
R4(config)#router rip
R4(config-router)#version 2			设置版本为2
R4(config-router)#no auto-summary
R4(config-router)#network 5.5.5.0
R4(config-router)#network 6.6.6.0
R4(config-router)#network 192.168.2.0
R4(config-router)#network 192.168.3.0
R4(config-router)#exit
R4(config)#
R4(config)#int f0/0
R4(config-if)#ip add 192.168.2.2 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#
R4(config)#int f1/0
R4(config-if)#ip add 192.168.3.1 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#  int l 1
R4(config-if)#
R4(config-if)#ip add 5.5.5.5 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#int l 2
R4(config-if)#ip add 6.6.6.6 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#do ping 3.3.3.3			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/32/60 ms
R4(config)#do ping 4.4.4.4			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/44/100 ms
R4(config)#do ping  1.1.1.1			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/64/100 ms


R4(config)#do ping  2.2.2.2			//测试ping通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/50/132 ms
R4(config)#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值