Static、RIP、EIGRP和OSPF的重分布.doc_第1页
Static、RIP、EIGRP和OSPF的重分布.doc_第2页
Static、RIP、EIGRP和OSPF的重分布.doc_第3页
Static、RIP、EIGRP和OSPF的重分布.doc_第4页
Static、RIP、EIGRP和OSPF的重分布.doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

路由重分布:RIP、EIGRP和OSPF的重分布当许多运行多路由的网络要集成到一起时,必须在这些不同的路由选择协议之间共享路由信息。在路由选择协议之间交换路由信息的过程称为路由重分布(Route Redistribute)路由重分布时,计量单位和管理距离是必须要考虑的因素。每一种路由协议都有自己的度量标准,所以在进行重分布时必须转换度量标准,使得它们兼容。种子度量值(Seed Metric)是定义在路由重分布里的,它是一条从外部重分布进来的路由的初始度量值。路由协议默认的种子度量值如下表:路由协议默认种子度量值RIP无限大EIGRPOSPFBGP为1,其他为20IS-IS0BGPIGP的度量值路由重分布中应该考虑的一些问题:路由环路:路由器有可能从一个自治系统学到的路由信息发送回该自治系统,特别是在做双向重分布的时候路由信息的兼容性问题,每一种路由协议的度量标准metric不同,所以路由器通过重分布所选择的路径可能并非最佳路径;不一致的收敛问题,因为不同的路由协议收敛时间不同 实验 RIP、EIGRP和OSPF的重分布实验拓扑:实验目的:1. 种子度量值的配置2. 路由重分布参数的配置3. 静态路由重分布的配置4. RIP和EIGRP的重分布5. EIGRP和OSPF的重分布6. 重分布路由的查看和调试实验步骤和调试:1、根据拓扑配置路由器R1、R2、R3和R4R1R1(config)#router ripR1(config-router)#version 2R1(config-router)#no autoR1(config-router)#no auto-summaryR1(config-router)#network 12.0.0.0R1(config-router)#network 1.1.1.0R1(config)#ip route 0.0.0.0 0.0.0.0 f0/0R2R2(config)#router ripR2(config-router)#version 2R2(config-router)#no auto-summaryR2(config-router)#network 12.0.0.0R2(config-router)#network 2.2.2.0R2(config-router)#exitR2(config)#router eigrp 100R2(config-router)#no auto-summaryR2(config-router)#network 23.0.0.0 0.0.0.255R3R3(config)#router eigrp 100R3(config-router)#no auto-summaryR3(config-router)#network 23.0.0.0 0.0.0.255R3(config-router)#exitR3(config)#router ospf 100R3(config-router)#network 3.3.3.0 0.0.0.255 area 0R3(config-router)#network 34.0.0.0 0.0.0.255 area 0R4R4(config)#router ospf 100R4(config-router)#network 4.4.4.0 0.0.0.255 area 0R4(config-router)#network 34.0.0.0 0.0.0.255 area 02、在R1上向RIP区域重分布静态路由R1(config)#router ripR1(config-router)#redistribute static metric 3在向RIP区域重分布路由的时候,必须指定度量值,或者通过default-metric设置默认种子度量值,因为RIP默认的种子度量值为无限大,只有重分布静态特殊,可以不指定种子度量值。3、在R2上将RIP重分布进EIGRP中,EIGRP重分布进RIP中R2(config)#router eigrp 100R2(config-router)#redistribute rip metric 1000 100 255 1 1500R2(config)#router ripR2(config-router)#redistribute eigrp 100 metric 4由于EIGRP的度量值相对复杂,所以在重分布时,需要分别设置带宽、延迟、可靠性、负载以及MTU的参数值。在Redistribute命令中用参数metric指定的种子度量值优先于在路由模式下使用default-metric命令设定的默认的种子度量值4、在R3上将EIGRP重分布进OSPF中,OSPF重分布进EIGRP中R3(config)#router eigrp 100R3(config-router)#redistribute ospf 100 metric 1000 100 255 1 1500R3(config-router)#exitR3(config)#router ospf 100R3(config-router)#redistribute eigrp 100 subnets5、在R1上查看路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 0.0.0.0 to network 0.0.0.034.0.0.0/24 is subnetted, 1 subnetsR 34.0.0.0 120/4 via 12.0.0.2, 00:00:26, Serial2/11.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsR 2.2.2.0 120/1 via 12.0.0.2, 00:00:26, Serial2/13.0.0.0/24 is subnetted, 1 subnetsR 3.3.3.0 120/4 via 12.0.0.2, 00:00:26, Serial2/14.0.0.0/32 is subnetted, 1 subnetsR 4.4.4.4 120/4 via 12.0.0.2, 00:00:26, Serial2/123.0.0.0/24 is subnetted, 1 subnetsR 23.0.0.0 120/4 via 12.0.0.2, 00:00:26, Serial2/1172.16.0.0/24 is subnetted, 1 subnetsC 172.16.0.0 is directly connected, FastEthernet0/012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial2/1S* 0.0.0.0/0 is directly connected, FastEthernet0/0R1#以上输出表明R1通过RIPv2学到从R2重分布进RIP的路由。6、在R2上查看路由表R2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 12.0.0.1 to network 0.0.0.034.0.0.0/24 is subnetted, 1 subnetsD EX 34.0.0.0 170/3097600 via 23.0.0.3, 00:11:13, Serial2/11.0.0.0/24 is subnetted, 1 subnetsR 1.1.1.0 120/1 via 12.0.0.1, 00:00:08, Serial2/22.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsD EX 3.3.3.0 170/3097600 via 23.0.0.3, 00:11:13, Serial2/14.0.0.0/32 is subnetted, 1 subnetsD EX 4.4.4.4 170/3097600 via 23.0.0.3, 00:11:13, Serial2/123.0.0.0/24 is subnetted, 1 subnetsC 23.0.0.0 is directly connected, Serial2/112.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial2/2R* 0.0.0.0/0 120/1 via 12.0.0.1, 00:00:09, Serial2/2R2#以上输出表明从路由器R1上重分布进RIP的默认路由被R2学习到了,路由代码为R*;在路由器R3上重分布进来的OSPF路由也被路由器R2学到,且代码为D EX,这也说明EIGRP能够识别内部路由和外部路由,且外部路由管理距离为170,由于默认时,内部路由的管理距离为90,外部的管理距离为1707、在R3上查看路由表R3#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 23.0.0.2 to network 0.0.0.034.0.0.0/24 is subnetted, 1 subnetsC 34.0.0.0 is directly connected, Serial2/11.0.0.0/24 is subnetted, 1 subnetsD EX 1.1.1.0 170/3097600 via 23.0.0.2, 00:35:21, Serial2/22.0.0.0/24 is subnetted, 1 subnetsD EX 2.2.2.0 170/3097600 via 23.0.0.2, 00:35:21, Serial2/23.0.0.0/24 is subnetted, 1 subnetsC 3.3.3.0 is directly connected, Loopback04.0.0.0/32 is subnetted, 1 subnetsO 4.4.4.4 110/65 via 34.0.0.4, 01:00:27, Serial2/123.0.0.0/24 is subnetted, 1 subnetsC 23.0.0.0 is directly connected, Serial2/212.0.0.0/24 is subnetted, 1 subnetsD EX 12.0.0.0 170/3097600 via 23.0.0.2, 00:35:21, Serial2/2D*EX 0.0.0.0/0 170/3097600 via 23.0.0.2, 00:13:16, Serial2/2R3#以上输出表明,从路由器R2上重分布进EIGRP的路由被路由器R3学习到,默认路由代为D*EX,同时EIGRP外部的管理距离为170,我们可以通过distance eigrp来修改管理距离。R3(config)#router eigrp 100R3(config-router)#distance eigrp 90 160*Aug 13 20:03:40.355: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.0.0.2 (Serial2/2) is down: route configuration changed*Aug 13 20:03:41.159: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.0.0.2 (Serial2/2) is up: new adjacency/管理距离修改后,Eigrp邻居关系重新建立成功R3(config-router)#do show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 23.0.0.2 to network 0.0.0.034.0.0.0/24 is subnetted, 1 subnetsC 34.0.0.0 is directly connected, Serial2/11.0.0.0/24 is subnetted, 1 subnetsD EX 1.1.1.0 160/3097600 via 23.0.0.2, 00:00:06, Serial2/22.0.0.0/24 is subnetted, 1 subnetsD EX 2.2.2.0 160/3097600 via 23.0.0.2, 00:00:06, Serial2/23.0.0.0/24 is subnetted, 1 subnetsC 3.3.3.0 is directly connected, Loopback04.0.0.0/32 is subnetted, 1 subnetsO 4.4.4.4 110/65 via 34.0.0.4, 01:07:39, Serial2/123.0.0.0/24 is subnetted, 1 subnetsC 23.0.0.0 is directly connected, Serial2/212.0.0.0/24 is subnetted, 1 subnetsD EX 12.0.0.0 160/3097600 via 23.0.0.2, 00:00:08, Serial2/2D*EX 0.0.0.0/0 160/3097600 via 23.0.0.2, 00:00:09, Serial2/2R3(config-router)#显示修改后的管理距离(外部)为160,修改成功。8、在R4上查看路由表R4#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set34.0.0.0/24 is subnetted, 1 subnetsC 34.0.0.0 is directly connected, Serial2/21.0.0.0/24 is subnetted, 1 subnetsO E2 1.1.1.0 110/20 via 34.0.0.3, 00:04:30, Serial2/22.0.0.0/24 is subnetted, 1 subnetsO E2 2.2.2.0 110/20 via 34.0.0.3, 00:04:30, Serial2/23.0.0.0/32 is subnetted, 1 subnetsO 3.3.3.3 110/65 via 34.0.0.3, 01:12:09, Serial2/24.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback023.0.0.0/24 is subnetted, 1 subnetsO E2 23.0.0.0 110/20 via 34.0.0.3, 00:28:37, Serial2/212.0.0.0/24 is subnetted, 1 subnetsO E2 12.0.0.0 110/20 via 34.0.0.3, 00:04:31, Serial2/2R4#以上输出表明,从路由器R3上重分布进OSPF的路由被路由器R4学到,代码为O E2,并且外部路径成本默认为20,我们通过metric-type设置类型,或者metric参数设置外部路径成本。R3(config)#router ospf 100R3(config-router)#redistribute eigrp 100 subnets metric 30 metric-type 1R4#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set34.0.0.0/24 is subnetted, 1 subnetsC 34.0.0.0 is directly connected, Serial2/21.0.0.0/24 is subnetted, 1 subnetsO E1 1.1.1.0 110/94 via 34.0.0.3, 00:00:53, Serial2/22.0.0.0/24 is subnetted, 1 subnetsO E1 2.2.2.0 110/94 via 34.0.0.3, 00:00:53, Serial2/23.0.0.0/32 is subnetted, 1 subnetsO 3.3.3.3 110/65 via 34.0.0.3, 01:22:14, Serial2/24.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback023.0.0.0/24 is subnetted, 1 subnetsO E1 23.0.0.0 110/94 via 34.0.0.3, 00:00:53, Serial2/212.0.0.0/24 is subnetted, 1 subnetsO E1 12.0.0.0 110/94 via 34.0.0.3, 00:00:54, Serial2/2R4#我们通过修改现在类型为O E1,外部路径为94,但是我们发现没有学到外网引进的默认路由,我们还需要添加向OSPF中注入一条默认路由R3(config)#router ospf 100R3(config-router)#default-information originate alwaysR4#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is 34.0.0.3 to network 0.0.0.034.0.0.0/24 is subnetted, 1 subnetsC 34.0.0.0 is directly connected, Serial2/21.0.0.0/24 is subnetted, 1 subnetsO E1 1.1.1.0 110/94 via 34.0.0.3, 00:06:38, Serial2/22.0.0.0/24 is subnetted, 1 subnetsO E1 2.2.2.0 110/94 via 34.0.0.3, 00:06:38, Serial2/23.0.0.0/32 is subnetted, 1 subnetsO 3.3.3.3 110/65 via 34.0.0.3, 01:27:58, Serial2/24.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback023.0.0.0/24 is subnetted, 1 subnetsO E1 23.0.0.0 110/94 via 34.0.0.3, 00:06:38, Serial2/212.0.0.0/24 is subnetted, 1 subnetsO E1 12.0.0.0 110/94 via 34.0.0.3, 00:06:38, Serial2/2O*E2 0.0.0.0/0 110/1 via 34.0.0.3, 00:00:26, Serial2/2R4#9、最后我们查看一下协议R3#show ip protocolsRouting Protocol is eigrp 100O

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论