《项目三 距离向量路由协议RIP和.doc》由会员分享,可在线阅读,更多相关《项目三 距离向量路由协议RIP和.doc(14页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、项目三距离向量路由协议RIP和EIGRP项目内容任务一:如图3.1所示的网络拓扑,实现计算机A和B的数据传输。R1、R2与R3分别通过Serial端口相连。要求:(1) 采用路由协议RIPv2,使整个网络可以通信;(2) 将R2的S1/0设置成被动接口,查看路由器的路由表;图3.1 网络拓扑任务二:如图3.1所示的网络拓扑,实现计算机A和B的数据传输。R1、R2与R3分别通过Serial端口相连。要求:(1)采用路由协议EIGRP,使整个网络可以通信;(2)在图3.1中的R1与R2之间增加一条串行链路,查看等价链路的负载均衡;(3)在(2)的基础上,修改R1与R2之间的一条串行链路的带宽,查看
2、非等价链路的负载均衡。(4)如图3.2所示,在R1设置4个环回口地址,然后在R1的S1/0接口进行汇总,观察R2、R3的路由表。图3. EIGRP手工路由汇总操作步骤一RIPv2的配置1搭建网络环境绘制如图3.1所示的网络拓扑并配置好路由器和计算机的端口及IP地址。2RIPv2的基本配置2.1 基本配置(1)配置R1R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 10.0.0.0R1(config-router)#network 12.0.0.0(2)配置R2R2(config)#router
3、ripR2(config-router)#version 2R2(config-router)#network 12.0.0.0R2(config-router)#network 23.0.0.0(3)配置R3R3(config)#router ripR3(config-router)#version 2R3(config-router)#network 23.0.0.0R3(config-router)#network 192.168.1.02.2 认证(1)show ip routeR1#show ip routeGateway of last resort is not set 10.0
4、.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, FastEthernet0/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0R 23.0.0.0/8 120/1 via 12.12.12.2, 00:00:03, Serial1/0 /自动汇总R 192.168.1.0/24 120/2 via 12.12.12.2, 00:00:03, Serial1/0关闭自动汇总:R1(config)#rou
5、ter ripR1(config-router)#no auto-summaryR2(config)#router ripR2(config-router)#no auto-summaryR3(config)#router ripR3(config-router)#no auto-summary重新认证:R1#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, FastEthernet0/0 12.0.0.0/24
6、is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnetsR 23.23.23.0 120/1 via 12.12.12.2, 00:00:08, Serial1/0R 192.168.1.0/24 120/2 via 12.12.12.2, 00:00:08, Serial1/0R2#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnet
7、sR 10.1.1.0 120/1 via 12.12.12.1, 00:00:06, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/1R 192.168.1.0/24 120/1 via 23.23.23.3, 00:00:01, Serial1/1R3#show ip routeGateway of
8、last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsR 10.1.1.0 120/2 via 23.23.23.2, 00:00:23, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsR 12.12.12.0 120/1 via 23.23.23.2, 00:00:23, Serial1/0 23.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/0C 192.168.1.0/24 is
9、 directly connected, FastEthernet0/0(2)show ip protocolR1#show ip protocolRouting Protocol is ripSending updates every 30 seconds, next due in 19 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for
10、 all interfaces is not setRedistributing: ripDefault version control: send version 2, receive 2 Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 2 2 Serial1/0 2 2 Automatic network summarization is not in effectMaximum path: 4Routing for Networks:10.0.0.012.0.0.0Passive Interface(s):Routi
11、ng Information Sources:Gateway Distance Last Update12.12.12.2 120 00:00:01Distance: (default is 120)(3)show ip databaseR1#show ip rip database10.1.1.0/24 directly connected, FastEthernet0/012.12.12.0/24 directly connected, Serial1/023.23.23.0/24 1 via 12.12.12.2, 00:00:10, Serial1/0192.168.1.0/24 2
12、via 12.12.12.2, 00:00:10, Serial1/0(4)debug ip ripR1#debug ip ripR1#clear ip route *R1#RIP: received v2 update from 12.12.12.2 on Serial1/0 23.23.23.0/24 via 0.0.0.0 in 1 hops 192.168.1.0/24 via 0.0.0.0 in 2 hopsRIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (10.1.1.1)RIP: build update entr
13、ies 12.12.12.0/24 via 0.0.0.0, metric 1, tag 0 23.23.23.0/24 via 0.0.0.0, metric 2, tag 0 192.168.1.0/24 via 0.0.0.0, metric 3, tag 0RIP: sending v2 update to 224.0.0.9 via Serial1/0 (12.12.12.1)RIP: build update entries 10.1.1.0/24 via 0.0.0.0, metric 1, tag 0RIP: received v2 update from 12.12.12.2
14、 on Serial1/0 23.23.23.0/24 via 0.0.0.0 in 1 hops 192.168.1.0/24 via 0.0.0.0 in 2 hopsRIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (10.1.1.1)RIP: build update entries 12.12.12.0/24 via 0.0.0.0, metric 1, tag 0 23.23.23.0/24 via 0.0.0.0, metric 2, tag 0 192.168.1.0/24 via 0.0.0.0, metric 3
15、, tag 0RIP: sending v2 update to 224.0.0.9 via Serial1/0 (12.12.12.1)RIP: build update entries 10.1.1.0/24 via 0.0.0.0, metric 1, tag 0RIP: received v2 update from 12.12.12.2 on Serial1/0 23.23.23.0/24 via 0.0.0.0 in 1 hops 192.168.1.0/24 via 0.0.0.0 in 2 hops3. 设置被动接口R2(config)#router ripR2(config-
16、router)#passive-interface s1/0等待几分钟后:R1#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, FastEthernet0/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0二、EIGRP的配置1搭建网络环境将如图3.1所示的拓扑图另存为新文件或重新建立一个拓扑图。在此
17、采用另存为新文件的方法,然后修改相关的配置。R1(config)#no router ripR2(config)#no router ripR3(config)#no router rip此时,R1的路由表如下:R1#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, FastEthernet0/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly
18、 connected, Serial1/0R2、R3的路由表内容类似R1。2EIGRP的配置2.1 基本配置(1)配置R1R1(config)#router eigrp 100R1(config-router)#no auto-summaryR1(config-router)#network 10.1.1.0 0.0.0.255R1(config-router)#network 12.12.12.0 0.0.0.255(2)配置R2R2(config)#router eigrp 100R2(config-router)#no auto-summaryR2(config-router)#netw
19、ork 12.12.12.0 0.0.0.255R2(config-router)#network 23.23.23.0 0.0.0.255(3)配置R2R3(config)#router eigrp 100R3(config-router)#no auto-summaryR3(config-router)#network 23.23.23.0 0.0.0.255R3(config-router)#network 192.168.1.0 0.0.0.2552.2 认证(1)show ip routeR1#show ip routeGateway of last resort is not se
20、t 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, FastEthernet0/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnetsD 23.23.23.0 90/ via 12.12.12.2, 00:03:47, Serial1/0D 192.168.1.0/24 90/ via 12.12.12.2, 00:01:24
21、, Serial1/0R2#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 90/ via 12.12.12.1, 00:06:42, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, S
22、erial1/1D 192.168.1.0/24 90/ via 23.23.23.3, 00:03:40, Serial1/1R3#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 90/ via 23.23.23.2, 00:04:54, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsD 12.12.12.0 90/ via 23.23.23.2, 00:04:54, Serial1/0 23.0.0.0/24
23、is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/0C 192.168.1.0/24 is directly connected, FastEthernet0/0(2)show ip protocolR1#show ip protocolRouting Protocol is eigrp 100 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is n
24、ot set Default networks flagged in outgoing updates Default networks accepted from incoming updates EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 EIGRP maximum hopcount 100 EIGRP maximum metric variance 1Redistributing: eigrp 100 Automatic network summarization is not in effect Maximum path: 4 Ro
25、uting for Networks: 10.1.1.0/24 12.12.12.0/24 Routing Information Sources: Gateway Distance Last Update 12.12.12.2 90 Distance: internal 90 external 170(3)show ip eigrp neighborsR2#show ip eigrp neighborsIP-EIGRP neighbors for process 100H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt
26、Num0 23.23.23.3 Ser1/1 13 00:01:57 40 1000 0 51 12.12.12.1 Ser1/0 11 00:01:57 40 1000 0 5(4)show ip eigrp topologyR2#show ip eigrp topologyIP-EIGRP Topology Table for AS 100Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - Reply statusP 23.23.23.0/24, 1 successors, FD is via Conn
27、ected, Serial1/1P 12.12.12.0/24, 1 successors, FD is via Connected, Serial1/0P 10.1.1.0/24, 1 successors, FD is via 12.12.12.1 (/28160), Serial1/0P 192.168.1.0/24, 1 successors, FD is via 23.23.23.3 (/28160), Serial1/1图3.3 EIGRP等价负载均衡3等价链路的负载均衡(1)如图3-3所示,在图3-1中R1、R2之间增加一条串行链路,配置好相应接口。(2)配置EIGRP协议。配置
28、R1:R1(config)#router eigrp 100R1(config-router)#network 21.21.21.0 0.0.0.255配置R2:R2(config)#router eigrp 100R2(config-router)#network 21.21.21.0 0.0.0.255(3)认证。R1#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, FastEthernet0/0 12.0.
29、0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 21.0.0.0/24 is subnetted, 1 subnetsC 21.21.21.0 is directly connected, Serial1/1 23.0.0.0/24 is subnetted, 1 subnetsD 23.23.23.0 90/ via 12.12.12.2, 00:27:02, Serial1/0 90/ via 21.21.21.2, 00:01:37, Serial1/1D 192.168.1.0/24
30、 90/ via 12.12.12.2, 00:27:00, Serial1/0 90/ via 21.21.21.2, 00:01:37, Serial1/1R2#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 90/ via 12.12.12.1, 00:26:42, Serial1/0 90/ via 21.21.21.1, 00:01:13, Serial1/2 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.1
31、2.0 is directly connected, Serial1/0 21.0.0.0/24 is subnetted, 1 subnetsC 21.21.21.0 is directly connected, Serial1/2 23.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/1D 192.168.1.0/24 90/ via 23.23.23.3, 00:26:37, Serial1/14非等价链路的负载均衡(packet tracer 5.1不支持此功能)图3.4 EIGRP
32、非等价负载均衡(1)如图3.4所示,设置好R1、R2的之间的链路带宽。R2(config)#int s1/0R2(config-if)#bandwidth 64(2)修改variance值来实现非等价负载均衡。R2(config)#router eigrp 100R2(config-router)#variance 2(3)认证。R2#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 90/ via 21.21.21.1, 00:00:13, Serial1/
33、2 90/ via 12.12.12.1, 00:00:15, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 21.0.0.0/24 is subnetted, 1 subnetsC 21.21.21.0 is directly connected, Serial1/2 23.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/1D 192.168.1.0/24
34、 90/ via 23.23.23.3, 00:00:15, Serial1/15手工路由汇总(1)修改图3.4,R1、R2之间保留一条链路,带宽为128kbps,并在R1设置4个环回口地址,如图3.5所示。图3.5 EIGRP手工路由汇总修改带宽:R2(config)#int s1/0R2(config-if)#bandwidth 128设置环回口地址:R1(config)#int loopback0R1(config-if)#ip add 172.16.0.1 255.255.255.0R1(config-if)#int loopback1R1(config-if)#ip add 172.
35、16.1.1 255.255.255.0R1(config-if)#int loopback2R1(config-if)#ip add 172.16.2.1 255.255.255.0R1(config-if)#int loopback3R1(config-if)#ip add 172.16.3.1 255.255.255.0(2)EIGRP的配置R1(config)#router eigrp 100R1(config-router)#network 172.16.0.0 0.0.3.255查看R2路由表的明细路由:R2#show ip routeGateway of last resort
36、is not set 10.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 90/ via 12.12.12.1, 00:17:06, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 23.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/1 172.16.0.0/24 is subnetted, 4 subnetsD 17
37、2.16.0.0 90/ via 12.12.12.1, 00:04:47, Serial1/0D 172.16.1.0 90/ via 12.12.12.1, 00:04:47, Serial1/0D 172.16.2.0 90/ via 12.12.12.1, 00:04:47, Serial1/0D 172.16.3.0 90/ via 12.12.12.1, 00:04:47, Serial1/0D 192.168.1.0/24 90/ via 23.23.23.3, 00:22:33, Serial1/1(3)手工路由汇总。R1(config)#int s1/0R1(config-i
38、f)#ip summary-address eigrp 100 172.16.0.0 255.255.252.0查看R2路由表,结果4条明细路由变成了1条汇总路由。R2#show ip routeGateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsD 10.1.1.0 90/ via 12.12.12.1, 00:00:27, Serial1/0 12.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial1/0 2
39、3.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial1/1 172.16.0.0/22 is subnetted, 1 subnetsD 172.16.0.0 90/ via 12.12.12.1, 00:00:27, Serial1/0D 192.168.1.0/24 90/ via 23.23.23.3, 00:28:40, Serial1/1知识链接一RIPv1和RIPv2的区别(1) RIPv1是有类路由协议,RIPv2是无类路由协议。(2) RIPv1不能支持VLSM,RIPv2可以支
40、持VLSM。(3) RIPv1没有认证的功能,RIPv2可以支持认证,并且有明文和MD5两种认证。(4) RIPv1没有手工汇总的功能,RIPv2可以在关闭自动汇总的前提下,进行手工汇总。(5) RIPv1是广播更新,RIPv2是组播更新。(6) RIPv1对路由没有标记的功能,RIPv2可以对路由打标记(tag),用于过滤和做策略路由。(7) RIPv1发送的updata最多可以携带25条路由条目,RIPv2在有认证的情况下最多只能携带24条路由(8) RIPv1发送的updata包里面没有next-hop属性,RIPv2有next-hop属性,可以用与路由更新的重定向。二被动接口与单播更新
41、被动接口被动接口指在路由器的某个接口上只接受路由更新,却不发送路由更新。有些情况下不需要向外通告某些路由,比如局域网内的路由,这时可以考虑将路由器的该接口设置为被动接口。单播更新单播更新是向指定的路由器发送路由更新信息。图3.6 RIP单播更新R1(config)#router ripR1(config-router)#network 10.0.0.0R1(config-router)#passive-interface f0/0R1(config-router)#neighbor 10.1.1.3三. EIGRP协议1EIGRP简介EIGRP是一个平衡混合型路由协议,是Cisco公司开发的距
42、离向量路由协议,既有传统的距离矢量协议的特点:路由信息依靠邻居路由器通告,遵守路由水平分割和反向毒化规则,路由自动归纳,配置简单,又有传统的链路状态路由协议的特点:没有路由跳数的限制,当路由信息发生变化时,采用增量更新的方式,保留对所有可能路由(网络的拓扑结构)的了解、支持变长子网掩码、路由手动汇总。该协议同时又具有自己独特的特点:支持非等成本路由上的负载均衡,采用差分更新算法(DUAL)在确保无路由环路的前提下,收敛迅速。因而适用于中大型网络。2几个术语(1)通告距离(Advertise Distance,AD):相邻路由器所通告的相邻路由器自己到达某个目的地的最短路由的度量值。;(2)可行距离(Feasible Distance,FD):到达一个目的地的最短路由的度量值。;(3)后继 ( Successor):后继是一个直接连接的邻居路由器,通过它具有到达目的地的最短路由。通过后继路由器将包转发到目的地。(4)可行后继 (Feasible Successor,FS):可行后继是一个邻居路由器,通过它可以到达目的地,不使用这个路由器是因为通过它到达目的地的路由的度量值比其他路由器高,但它的通告距离小于可行距离,因而被保存在拓扑表中,用做备选路由。