您好,欢迎来到99网。
搜索
您的当前位置:首页实验七、RIP路由配置

实验七、RIP路由配置

来源:99网
实验七:RIP路由配置

实验目的:理解动态路由得工作原理,掌握如何配置动态路由 实验设备:两台路由器(带串口),一根v.35 DEC /DTE 电缆 理论:

R1(config)#router rip 启动rip

R1(config-router)#version 2 使用版本2 R1(config-router)#network ? 宣告网段 A.B.C.D Network number

R1(config-router)#no auto-summary 关闭自动汇总

利用UDP520 端口向与它直连的网络邻居广播(RIPv1)或组播224.0.0.9(RIPv2) 路由更新。

为了避免路由环路,RIP 采用水平分割、毒性逆转、定义最大跳数、闪式更新和抵制计时5个机制来避免路由环路。

实验步骤: 1. 拓扑图

2. 基本配置 router>en router#conf t

Enter configuration commands, one per line. End with CNTL/Z. router(config)#host R1 R1(config)#int loop0

R1(config-if)#ip add 172.16.1.1 255.255.255.0 R1(config-if)#int loo1

R1(config-if)#ip add 172.16.2.1 255.255.255.0 R1(config-if)#int s0/0

R1(config-if)#ip add 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit

R2>en

R2#conf t

R2(config)#int loo0

R2(config-if)#ip add 10.1.1.1 255.255.255.0 R2(config-if)#int loop1

R2(config-if)#ip add 10.2.2.1 255.255.255.0 R2(config-if)#int s0/0

R2(config-if)#ip add 192.168.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit

2.rip基本配置

R1(config)#router rip R1(config-router)#ver 2

R1(config-router)#network 192.168.1.0 R1(config-router)#network 172.16.0.0 R1(config-router)#end

R2(config)#router rip R2(config-router)#ver 2

R2(config-router)#network 192.168.1.0 R2(config-router)#network 10.0.0.0 R2(config-router)#end

3. 查看路由表,rip信息 R2#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

R 172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:15, Serial0/0 10.0.0.0/24 is subnetted, 2 subnets

C 10.2.2.0 is directly connected, Loopback1 C 10.1.1.0 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Serial0/0

R2#sh ip protocols Routing Protocol is \"rip\"

Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set

Sending updates every 30 seconds, next due in 21 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Redistributing: rip

Default version control: send version 1, receive any version

Interface Send Recv Triggered RIP Key-chain

Serial0/0 1 1 2 Loopback0 1 1 2 Loopback1 1 1 2 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: 10.0.0.0 192.168.1.0

Routing Information Sources:

Gateway Distance Last Update 192.168.1.1 120 00:00:20 Distance: (default is 120)

R2#sh ip rip database

10.0.0.0/8 auto-summary

10.1.1.0/24 directly connected, Loopback0 10.2.2.0/24 directly connected, Loopback1 172.16.0.0/16 auto-summary 172.16.0.0/16

[1] via 192.168.1.1, 00:00:17, Serial0/0 192.168.1.0/24 auto-summary

192.168.1.0/24 directly connected, Serial0/0

4. 测试网络连通性 R2#p 172.16.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/42/ ms R2#ping 172.16.2.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 60/61/ ms

R1#p 10.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 20/47/76 ms R1#p 10.2.2.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.2.2.1, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/58/76 ms R1#

RIP由于受到跳数,且是根据跳数决定路由,不能很好地反映当前路由的是否是合理的,很可能出现跳数较小,但是路径带宽小,延迟大;而那条跳数大,但是带宽大的路径会更合理。所以RIP不适应大型复杂的网络。

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 99spj.com 版权所有 湘ICP备2022005869号-5

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务