OSPF与RIP路由重发布

合集下载

实验报告10配置RIP与OSPF路由重分发_-_副本

实验报告10配置RIP与OSPF路由重分发_-_副本

实验报告课程名称网络工程综合实践实验日期实验项目名称配置RIP与OSPF路由重分发实验地点实验类型√验证型□设计型□综合型学时 2一、实验目的及要求(本实验所涉及并要求掌握的知识点)配置RIP与OSPF路由重分发,通过路由重分发实验,实现在不同路由协议之间发布路由的要点。

二、实验环境(本实验所使用的硬件设备和相关软件)硬件:微型计算机、网络工程实验机柜软件:RCMS管理平台三、实验内容及步骤拓扑图1、在路由器上配置IP路由选择和IP地址2、配置RIP和OSPF路由协议3、配置重分发4、验证测试四、实验结果(本实验源程序清单及运行结果或实验结论、实验设计图)1、在路由器上配置IP路由选择和IP地址1-RSR20-1>en 14Password:1-RSR20-1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.1-RSR20-1(config)#hostname RouterARouterA(config)#interface fastethernet0/0RouterA(config-if-FastEthernet 0/0)#ip address 172.16.1.5 255.255.255.252 RouterA(config-if-FastEthernet 0/0)#no shutdownRouterA(config-if-FastEthernet 0/0)#exitRouterA(config)#interface loopback 10RouterA(config-if-Loopback 10)#ip address 192.168.2.1 255.255.255.0 RouterA(config-if-Loopback 10)#no shutdownRouterA(config-if-Loopback 10)#exitRouterA(config)#interface fastethernet0/1RouterA(config-if-FastEthernet 0/1)#ip address 192.168.1.1 255.255.255.252 RouterA(config-if-FastEthernet 0/1)#no shutdownRouterA(config-if-FastEthernet 0/1)#exitRouterA(config)#1-RSR20-2>en 14Password:1-RSR20-2#configure terminalEnter configuration commands, one per line. End with CNTL/Z.1-RSR20-2(config)#hostname RouterBRouterB(config)#interface fastethernet0/0RouterB(config-if-FastEthernet 0/0)#ip address 172.16.1.6 255.255.255.252 RouterB(config-if-FastEthernet 0/0)#no shutdownRouterB(config-if-FastEthernet 0/0)#exitRouterB(config)#interface fastethernet0/1RouterB(config-if-FastEthernet 0/1)#ip address 172.16.1.1 255.255.255.252 RouterB(config-if-FastEthernet 0/1)#no shutdownRouterB(config-if-FastEthernet 0/1)#exitRouterB(config)#1-RSR20-3>en 14Password:1-RSR20-3#configure terminalEnter configuration commands, one per line. End with CNTL/Z.1-RSR20-3(config)#hostname RouterCRouterC(config)#interface fastethernet0/0RouterC(config-if-FastEthernet 0/0)#ip address 172.16.1.2 255.255.255.252 RouterC(config-if-FastEthernet 0/0)#no shutdownRouterC(config-if-FastEthernet 0/0)#exitRouterC(config)#interface loopback 30RouterC(config-if-Loopback 30)#ip address 172.16.3.1 255.255.255.0 RouterC(config-if-Loopback 30)#no shutdownRouterC(config-if-Loopback 30)#exitRouterC(config)#interface fastethernet0/1RouterC(config-if-FastEthernet 0/1)#ip address 172.16.1.9 255.255.255.252 RouterC(config-if-FastEthernet 0/1)#no shutdownRouterC(config-if-FastEthernet 0/1)#exitRouterC(config)#1-RSR20-4>en 14Password:1-RSR20-4#configure terminalEnter configuration commands, one per line. End with CNTL/Z.1-RSR20-4(config)#hostname RouterDRouterD(config)#interface fastethernet0/0RouterD(config-if-FastEthernet 0/0)#ip address 172.16.1.10 255.255.255.252 RouterD(config-if-FastEthernet 0/0)#no shutdownRouterD(config-if-FastEthernet 0/0)#exitRouterD(config)#interface loopback 40RouterD(config-if-Loopback 40)#ip address 10.1.1.1 255.255.255.0RouterD(config-if-Loopback 40)#no shutdownRouterD(config-if-Loopback 40)#exitRouterD(config)#interface loopback 50RouterD(config-if-Loopback 50)#ip address 10.1.2.1 255.255.255.0RouterD(config-if-Loopback 50)#no shutdownRouterD(config-if-Loopback 50)#exitRouterD(config)#interface loopback 60RouterD(config-if-Loopback 60)#ip address 20.1.1.1 255.255.255.0RouterD(config-if-Loopback 60)#no shutdownRouterD(config-if-Loopback 60)#exitRouterD(config)#2、配置RIP和OSPF路由协议RouterA(config)#router ripRouterA(config-router)#version 2RouterA(config-router)#network 172.16.1.4 0.0.0.3RouterA(config-router)#network 192.168.1.0 0.0.0.3 RouterA(config-router)#network 192.168.2.0 0.0.0.255 RouterA(config-router)#no auto-summaryRouterA(config-router)#RouterB(config)#router ripRouterB(config-router)#version 2RouterB(config-router)#network 172.16.1.4 0.0.0.3RouterB(config-router)#exitRouterB(config)#router ospf 10RouterB(config-router)#network 172.16.1.0 0.0.0.3 area 0 RouterB(config-router)#RouterC(config)#router ospf 10RouterC(config-router)#network 172.16.1.0 0.0.0.3 area 0 RouterC(config-router)#network 172.16.3.0 0.0.0.255 area 0 RouterC(config-router)#network 172.16.1.8 0.0.0.3 area 1 RouterC(config-router)#RouterD(config)#router ospf 10RouterD(config-router)#network 172.16.1.8 0.0.0.3 area 1 RouterD(config-router)#network 10.1.1.0 0.0.0.255 area 1 RouterD(config-router)#network 10.1.2.0 0.0.0.255 area 1 RouterD(config-router)#network 20.1.1.0 0.0.0.255 area 1 RouterD(config-router)#exitRouterD(config)#3、配置重分发RouterA(config)#router ripRouterA(config-router)#default-information originate RouterA(config-router)#RouterB(config)#router ospf 10RouterB(config-router)#redistribute rip metric 50 subnetsRouterB(config-router)#default-information originateRouterB(config-router)#exitRouterB(config)#router ripRouterB(config-router)#redistribute ospf 10 metric 1RouterB(config-router)#RouterD(config)#router ospf 10RouterD(config-router)#redistribute static subnetsRouterD(config-router)#4、验证测试查看RouterA的路由信息查看RouterB的路由信息查看RouterC的路由信息查看RouterD的路由信息测试RouterA测试RouterD五、实验总结(对本实验结果进行分析,实验心得体会及改进意见)本次试验的内容是配置RIP与OSPF路由重分发,通过路由重分发实验,实现在不同路由协议之间发布路由的要点。

单元任务书23_STUP区域及路由重分发配置

单元任务书23_STUP区域及路由重分发配置

子任务1:配置末梢区域 需求描述:
为了减少区域内路由器的路由条目,特把右侧区域配置为末梢区 域。该Stub区域中仅仅需要域内的路由条目和一条指向区域边界路由器 的默认路由就能实现所有的选路。
现对公司网络路由器设备使用OSPF协议进行配置,并将右侧配置成 末梢区域,实现网络互通。 推荐步骤:
1、 连接网络设备,标识OSPF区域,规划IP地址 2、 R1配置接口地址,启用OSPF协议
配置RIP与OSPF路由重分发,通过路由重分发实验,实现在不同路 由协议之间发布路由的要点。 配置主要步骤: 1、在路由器上配置IP路由选择和IP地址 2、配置RIP和OSPF路由协议 3、配置重分发 4、验证测试
任务二:路由重分发配置 实验环境:
BT公司有两家分公司,分别在上海、杭州,总公司在北京。为了提 高访问的安全性和实时性,避免出现故障,BT公司决定租用数字电路, 将分公司和总公司的网络互通,如下图所示。其中R1为总公司路由器, R2、R5为上海分公司路由器,R3、R4为杭州分公司路由器。按照以下要 求配置网络中的路由器,实现全网互通,并能访问Internet。
单元任务书23_ STUP区域及路由重分发配置
任务目标:
1、会配置STUB区域
2、会把静态路由、RIP路由重发布ห้องสมุดไป่ตู้OSPF区域内
学习形式
小组协作,分别完成
英语词汇:
Stub:残端,末梢 Destination:目的 Redistribute:重新分配,重发布 Internal Router:内部路由器 ABR:Area Border Router,区域边界路由器 ASBR:Autonomous System Boundary Router,自治系统边界路由 器 LSA:Link State Advertisement,链路状态通告 Stub Area:末梢区域 Totally Stubby Area:完全末梢区域

实验08-路由重分发

实验08-路由重分发

RIP与OSPF的路由重分发实验目的:1、掌握RIP与OSPF的重发布配置。

2、理解OSPF的E1与E2类型的路由。

实验拓扑图实验步骤及要求:1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。

2、配置R1与R2的OSPF路由协议和R2与R3的RIP路由协议。

R1(config)#router ospf 1R1(config-router)#network 172.16.255.0 0.0.0.3 area 0R1(config-router)#network 172.16.1.0 0.0.0.255 area 0R1(config-router)#network 172.16.2.0 0.0.0.255 area 0R2(config)#router ospf 1R2(config-router)#network 172.16.255.0 0.0.0.3 area 0R2(config-router)#exitR2(config)#router ripR2(config-router)#network 192.168.255.0R3(config)#router ripR3(config-router)#network 192.168.255.0R3(config-router)#network 192.168.1.0R3(config-router)#network 192.168.2.03、查看R1、R2和R3的路由表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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.255.0/30 is directly connected, FastEthernet0/0C 172.16.1.0/24 is directly connected, Loopback0C 172.16.2.0/24 is directly connected, Loopback1R2#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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.255.0/30 is directly connected, FastEthernet0/1O 172.16.1.1/32 [110/2] via 172.16.255.1, 00:03:33, FastEthernet0/1O 172.16.2.1/32 [110/2] via 172.16.255.1, 00:03:33, FastEthernet0/1从R1学习到的OSPF网络路由C 192.168.255.0/24 is directly connected, FastEthernet0/0R 192.168.1.0/24 [120/1] via 192.168.255.1, 00:00:25, FastEthernet0/0R 192.168.2.0/24 [120/1] via 192.168.255.1, 00:00:25, FastEthernet0/0从R3学习到的RIP网络路由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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.255.0/24 is directly connected, FastEthernet0/1C 192.168.1.0/24 is directly connected, Loopback0C 192.168.2.0/24 is directly connected, Loopback14、根据show ip route命令可以看出,只有R2路由才可以学习到整个网络的完整路由。

路由重分发工作原理

路由重分发工作原理

路由重分发工作原理路由重分发工作原理网络协议有很多种,例如isis、rip、ospf、bgp等,在大型公司中经常会出现网络设备之间运行多种网络协议的情况,各种网络协议之间如果不进行一定的配置那么设备之间是不能进行互通信息的,在这种情况下就出现了路由重分发技术,路由重分发的作用就是为了实现多种路由协议之间的协同工作。

路由重分发的工作原理:通过在各种路由协议的配置中添加一定的配置使将路由协议广播到另外的路由协议中,让各个路由协议都能检测到运行其他的路由协议的网段,从而实现数据的传输。

路由重分发技术需要用到redistribute命令rip协议的redistribute命令redistribute protocol 【metric metric-value】【match internal | external nssa-external type】【route-map map-tag】protocol:路由重分发的源路由协议 metric metric-value:设置路由重分发的度量值(1···6),没有将使用default-metric命令设置的metric值 match internal | external nssa-external type:设置重分发路由的条件,只适合重分发的源路由协议是ospf route-map map-tag应用路由图进行重分发ospf协议的redistribute命令 redistribute protocol 【subnets】【metric metric-value】【metric-type{1 | 2}】【tag tag-value】【route-map map-tag】protocol:路由重分发的源路由协议subnets:设置是否重分发子网metric metric-value:设置路由重分发的度量值(1···16777214),没有将使用default-metric命令设置的metric值metric metric-type:设置重分发的路由度量类型,默认值为2 tag tag-value:设置重分发的路由的tag(0···2147483647)默认为0 route-map map-tag应用路由图进行重分发重分发到ospf中的时候,除了直连路由和默认路由外,其他重分发的路由的默认的度量值是20,默认度量值类型是2,且默认不重分发子网。

ospf和EIGRP重发布

ospf和EIGRP重发布

配置Ospf与Eigrp的路由再发布环境:三台路由器串口相连,接口配置如图要求:1.配置EIGRP和关闭自动路由汇总2.在R1上配置LOOP口的EIGRP手工路由汇总3.在R2和R3配置Ospf 接口验证4.在ASBR(R2)上做eigrp和ospf双向再发布5.在R3上将所有loopback 口再发布到ospf中,但loopback2不能被R2,R3学到,不允许使用network命令步骤一:配置三个路由器接口使其连通。

R1的配置R1(config)# interface Loopback0R1(config-if)#ip address 172.168.1.1 255.255.255.0R1(config)# interface Loopback1R1(config-if)#ip address 172.168.2.1 255.255.255.0R1(config)#interface Loopback2R1(config-if)#ip address 172.168.3.1 255.255.255.0R1(config)# interface s0R1(config-if)# ip address 10.1.1.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutdownR2的配置R2(config)#interface s0R2(config-if)#ip address 20.1.1.1 255.255.255.0R2(config-if)#no shutdownR2(config)#interface s1R2(config-if)# ip address 10.1.1.1 255.255.255.0R2(config-if)#no shutdownR3的配置R3(config)# interface Loopback0R3(config-if)#ip address 192.168.1.1 255.255.255.0R3(config)# interface Loopback1R3(config-if)#ip address 192.168.2.1 255.255.255.0R3(config)#interface Loopback2R3(config-if)#ip address 192.168.3.1 255.255.255.0R3(config)# interface s1R3(config-if)# ip address 20.1.1.2 255.255.255.0R3(config-if)#clock rate 64000R3(config-if)#no shutdown步骤二:配置Eigrp ,OspfR1的配置R1(config)# router eigrp 100 →启用EIGRPR1(config-router)# network 10.1.1.0 0.0.0.255 →发布相应接口R1(config-router)#network 172.168.1.0 0.0.0.255R1(config-router)#network 172.168.2.0 0.0.0.255R1(config-router)#network 172.168.3.0 0.0.0.255R1(config-router)# no auto-summary →关闭自动汇总R2的配置R2(config)# router eigrp 100R2(config-router)# network 10.1.1.0 0.0.0.255R2(config-router)# no auto-summaryR2(config)# router ospf 10 →在R2上即启用EIGRP并且启用OSPFR2(config-router)# network 20.1.1.0 0.0.0.255 area 0R3的配置R3(config)# router ospf 10R3(config-router)# network 20.1.1.0 0.0.0.255 area 0步骤三:配置EIGRP手工路由汇总和Ospf接口验证R1的配置R1(config)# interface s0R1(config-if)# ip summary-address eigrp 100 172.168.0.0 255.255.252.0 →手工汇总R2的配置R2(config)# interface s0R2(config-if)# ip ospf authentication message-digest →启用接口验证R2(config-if)# ip ospf message-digest-key 1 md5 ciscoR3的配置R3(config)# interface s1R3(config-if)# ip ospf authentication message-digest →启用接口认证R3(config-if)# ip ospf message-digest-key 1 md5 cisco步骤四:在R2,R3上做路由再发布并控制loopback2不能被R1,R2学到R2的配置R2(config)# router eigrp 100R2(config-router)# redistribute ospf 10 metric 10000 100 255 1 1500→将ospf重分发进eigrp R2(config)# router ospf 10R2(config-router)# redistribute eigrp 100 subnets →将eigrp路由重分发到ospfR3的配置R3(config)# access-list 1 permit 192.168.1.0 0.0.0.255 →定义分发条件列表R3(config)# access-list 1 permit 192.168.2.0 0.0.0.255R3(config)# access-list 2 permit 192.168.3.0 0.0.0.255R3(config)# route-map o-e permit 10 →做映射列表允许相应条目R3 (config-route-map)# match ip address 1 →将列表加载R3(config)# route-map o-e deny 20 →拒绝相应条目的映射列表R3 (config-route-map)# match ip address 2 →将列表加载R3(config)# route-map o-e permit 25 →最后允许其它所有R3(config)# router ospf 10R3(config-router)# redistribute connected subnets route-map o-e步骤五:查看路由表R1#sh ip routeCodes: C - connected, S - static, I - IGRP, 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 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set20.0.0.0/24 is subnetted, 1 subnetsD EX 20.1.1.0 [170/2195456] via 10.1.1.2, 00:03:50, Serial0 →外部路由条目172.168.0.0/16 is variably subnetted, 4 subnets, 2 masksD 172.168.0.0/22 is a summary, 00:03:56, Null0C 172.168.1.0/24 is directly connected, Loopback0C 172.168.2.0/24 is directly connected, Loopback1C 172.168.3.0/24 is directly connected, Loopback210.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Serial0D EX 192.168.1.0/24 [170/2195456] via 10.1.1.2, 00:01:53, Serial0D EX 192.168.2.0/24 [170/2195456] via 10.1.1.2, 00:01:53, Serial0R2#sh ip routeCodes: C - connected, S - static, I - IGRP, 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 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set20.0.0.0/24 is subnetted, 1 subnetsC 20.1.1.0 is directly connected, Serial0172.168.0.0/22 is subnetted, 1 subnetsD 172.168.0.0 [90/2297856] via 10.1.1.1, 00:05:39, Serial110.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Serial1O E2 192.168.1.0/24 [110/20] via 20.1.1.2, 00:03:42, Serial0 →ospf外部路由条目类型2 O E2 192.168.2.0/24 [110/20] via 20.1.1.2, 00:03:42, Serial0R3#sh ip routeCodes: C - connected, S - static, I - IGRP, 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 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set20.0.0.0/24 is subnetted, 1 subnetsC 20.1.1.0 is directly connected, Serial1172.168.0.0/22 is subnetted, 1 subnetsO E2 172.168.0.0 [110/20] via 20.1.1.1, 00:04:48, Serial110.0.0.0/24 is subnetted, 1 subnetsO E2 10.1.1.0 [110/20] via 20.1.1.1, 00:04:48, Serial1C 192.168.1.0/24 is directly connected, Loopback0C 192.168.2.0/24 is directly connected, Loopback1C 192.168.3.0/24 is directly connected, Loopback2步骤六:用ping命令测试连通性R1#ping 192.168.2.1!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/64 msR3#ping 172.168.1.1!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms 步骤七:查看配置R1#sh runhostname R1!interface Loopback0ip address 172.168.1.1 255.255.255.0!interface Loopback1ip address 172.168.2.1 255.255.255.0!interface Loopback2ip address 172.168.3.1 255.255.255.0!interface Serial0ip address 10.1.1.1 255.255.255.0ip summary-address eigrp 100 172.168.0.0 255.255.252.0 5 clockrate 64000!router eigrp 100network 10.1.1.0 0.0.0.255network 172.168.1.0 0.0.0.255network 172.168.2.0 0.0.0.255network 172.168.3.0 0.0.0.255no auto-summary!endR2#sh runhostname R2!interface Serial0ip address 20.1.1.1 255.255.255.0ip ospf authentication message-digestip ospf message-digest-key 1 md5 cisco!interface Serial1ip address 10.1.1.2 255.255.255.0!router eigrp 100redistribute ospf 10 metric 10000 100 255 1 1500network 10.1.1.0 0.0.0.255no auto-summary!router ospf 10redistribute eigrp 100 subnetsnetwork 20.1.1.0 0.0.0.255 area 0!endR3#sh runhostname R3!interface Loopback0ip address 192.168.1.1 255.255.255.0ip ospf network point-to-point!interface Loopback1ip address 192.168.2.1 255.255.255.0ip ospf network point-to-point!interface Loopback2ip address 192.168.3.1 255.255.255.0ip ospf network point-to-point 定义网络类型,否则为主机路由32位!interface Serial1ip address 20.1.1.2 255.255.255.0ip ospf authentication message-digestip ospf message-digest-key 1 md5 cisco clockrate 64000!router ospf 10redistribute connected subnets route-map o-e network 20.1.1.0 0.0.0.255 area 0!access-list 1 permit 192.168.1.0 0.0.0.255 access-list 1 permit 192.168.2.0 0.0.0.255 access-list 2 permit 192.168.3.0 0.0.0.255 route-map o-e permit 10match ip address 1!route-map o-e deny 20match ip address 2!route-map o-e permit 25!end。

OSPF多进程之间的路由重发布

OSPF多进程之间的路由重发布

OSPF多进程之间的路由重发布1、实验拓扑如下图:R1R4R3 R2Area 00spf 10Area 0Ospf 1002、实验目的:1、实现R2与R3之间互相访问时的数据分流。

R2访问R3的3.3.3.3/32时走R1,R2访问R3的30.30.30.30/32时走R4。

R3访问R2的2.2.2.2/32时走R1,R3访问R2的20.20.20.20/32时走R1。

2、实现线路的冗余备份。

当R1链路故障时数据可以走R4,当R4链路故障时数据可以走R1。

实现链路的冗余备份。

3、理解并掌握route-map在控制路由方面的应用。

3、实验配置文档R1配置:config terint f0/0ip add 10.0.0.1 255.255.255.252no shutint f1/0ip add 10.0.0.5 255.255.255.252no shutint lo 0ip add 1.1.1.1 255.255.255.255endwriteconfig terrouter ospf 10router-id 1.1.1.1network 10.0.0.0 0.0.0.3 area 0redistribute ospf 100 metric-type 1 subnets route-map ospf100_to_ospf10 distribute-list deny_ospf100 inendconfig terrouter ospf 100router-id 1.1.1.1network 10.0.0.4 0.0.0.3 area 0redistribute ospf 10 metric-type 1 subnets route-map ospf10_to_ospf100 distribute-list deny_ospf10 inendwriteip access-list standard deny_ospf10deny 2.2.2.2 0.0.0.0deny 20.20.20.20 0.0.0.0permit anyip access-list standard deny_ospf100deny 3.3.3.3 0.0.0.0deny 30.30.30.30 0.0.0.0permit anyaccess-list 10 permit 2.2.2.2 0.0.0.0access-list 11 permit 3.3.3.3 0.0.0.0access-list 20 permit 20.20.20.20 0.0.0.0access-list 21 permit 30.30.30.30 0.0.0.0route-map ospf100_to_ospf10 permit 10match ip address 11set metric 100route-map ospf100_to_ospf10 permit 20match ip address 21set metric 200route-map ospf10_to_ospf100 permit 10match ip address 10set metric 100route-map ospf10_to_ospf100 permit 20match ip address 20set metric 200R4配置:config terint f0/0ip add 172.16.0.1 255.255.255.252no shutint f1/0ip add 172.16.0.5 255.255.255.252no shutint lo 0ip add 4.4.4.4 255.255.255.255endwriteconfig terrouter ospf 10router-id 4.4.4.4network 172.16.0.4 0.0.0.3 area 0redistribute ospf 100 metric-type 1 subnets route-map ospf100_to_ospf10 distribute-list deny_ospf100 inendconfig terrouter ospf 100router-id 4.4.4.4network 172.16.0.0 0.0.0.3 area 0redistribute ospf 10 metric-type 1 subnets route-map ospf10_to_ospf100 distribute-list deny_ospf10 inendwriteip access-list standard deny_ospf10deny 2.2.2.2 0.0.0.0deny 20.20.20.20 0.0.0.0permit anyip access-list standard deny_ospf100deny 3.3.3.3 0.0.0.0deny 30.30.30.30 0.0.0.0permit anyaccess-list 10 permit 2.2.2.2 0.0.0.0access-list 11 permit 3.3.3.3 0.0.0.0access-list 20 permit 20.20.20.20 0.0.0.0access-list 21 permit 30.30.30.30 0.0.0.0route-map ospf100_to_ospf10 permit 10 match ip address 11set metric 200route-map ospf100_to_ospf10 permit 20 match ip address 21set metric 100route-map ospf10_to_ospf100 permit 10 match ip address 10set metric 200route-map ospf10_to_ospf100 permit 20 match ip address 20set metric 100R2的配置:config terint f0/0ip add 10.0.0.2 255.255.255.252no shutint f1/0ip add 172.16.0.6 255.255.255.252no shutint lo 0ip add 2.2.2.2 255.255.255.255int lo 1ip add 20.20.20.20 255.255.255.255 endwriteconfig terrouter ospf 10router-id 2.2.2.2network 172.16.0.4 0.0.0.3 area 0 network 10.0.0.0 0.0.0.3 area 0 network 2.2.2.2 0.0.0.0 area 0network 20.20.20.20 0.0.0.0 area 0endwriteR3的配置:config terint f0/0ip add 10.0.0.6 255.255.255.252no shutint f1/0ip add 172.16.0.2 255.255.255.252no shutint lo 0ip add 3.3.3.3 255.255.255.255int lo 1ip add 30.30.30.30 255.255.255.255endwriteconfig termrouter ospf 100router-id 3.3.3.3network 172.16.0.0 0.0.0.3 area 0network 10.0.0.4 0.0.0.3 area 0network 3.3.3.3 0.0.0.0 area 0network 30.30.30.30 0.0.0.0 area 0endwrite4、实验测试1、在R2上show ip route查看结果,可以看出实现了数据分流。

路由重分发(引入)技术

路由重分发(引入)技术

路由重分发技术一、路由重分发介绍1、两个协议之间相互学习路由条目2、可以省掉不必要的麻烦二、路由重分发之间相互采用用的什么1、OSPF:开销2、EIGRP:度量3、RIP:跳数4、Static(静态):直接重分发三、重分发配置命令1、将OSPF重分发进RIP①router rip :进入RIP进程②redistribute ospf 100(进程号) metric 1(跳数) :为OSPF路由指定跳数2、将RIP重分发到OSPF①router ospf 100 :进入OSPF进程②redistribute rip metric 100(开销) subnets :为RIP路由指定开销3、将OSPF重分发到EIGRP①router eigrp 100 :进入EIGRP进程②redistribute ospf 100 metric 10000 1000 255 1 1500 :为OSPF路由指定度量(带) (延) (可) (负) (M)4、将静态重分发进OSPF①router ospf 100 :进入OSPF进程②redistribute static subnets :将静态重分发到OSPF在OSPF中重分发不加Subnets重分到OSPF里的路由都是主类网络。

5、将直连重分发进RIP①router rip :进入RIP进程②redistribute connected :将直连重分发进RIP6、另一种重分发路由方式①router ospf 100 :进入OSPF进程②redistribute eigrp 100 :将EIGRP重分发进OSPF(OSPF默认cost:20)③default-metric 100(开销) :指定重分发的metric(度量)四、查看重分发配置命令1、show runnning-config |section router eigrp :查看EIGRP的重分发配置2、show runnning-config |section router ospf :查看OSPF的重分发配置3、show runnning-config |section router rip :查看RIP的重分发配置。

RIP与静态路由重分布

RIP与静态路由重分布

RIP与静态路由重分布RIP与静态路由重分布⼀、⽹络拓扑图⼆、设备配置R1:Router>enaRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hos R1R1(config)#int f 0/0R1(config-if)#ip address 192.168.1.254 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exit%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R1(config)#int s 2/0 R1(config-if)#ip address 192.168.2.1 255.255.255.0R1(config-if)#clo ra 64000R1(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial2/0, changed state to downR1(config-if)#exiR1(config)#router ripR1(config-router)#ve 2R1(config-router)#network 192.168.1.0R1(config-router)#network 192.168.2.0R1(config-router)#exiR1(config)#do wrBuilding configuration...[OK]R2:Router>Router>enaRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hos R2R2(config)#int s 2/0R2(config-if)#ip address 192.168.2.2 255.255.255.0R2(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial2/0, changed state to upR2(config-if)#exiR2(config)#int s 3/0%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up R2(config-if)#ip address 192.168.3.1 255.255.255.0R2(config-if)#clo ra 64000R2(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial3/0, changed state to downR2(config-if)#exiR2(config)#router ripR2(config-router)#ve 2R2(config-router)#network 192.168.2.0R2(config-router)#default-information originateR2(config-router)#redistribute static metric 3R2(config-router)#exiR2(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.2R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2R2(config)#do wrBuilding configuration...[OK]R3:Router>Router>enaRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hos R3R3(config)#int f 0/0R3(config-if)#ip address 192.168.4.254 255.255.255.0R3(config-if)#no shutdownR3(config-if)#exit%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R3(config)#int s 2/0 R3(config-if)#ip address 192.168.3.2 255.255.255.0R3(config-if)#no shutdownR3(config-if)#exit%LINK-5-CHANGED: Interface Serial2/0, changed state to upR3(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1Building configuration...[OK]测试结果:从PC0 ping PC1:。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

实验十五OSPF与RIP路由重发布实验题目:OSPF与RIP路由重发布实验目的:在本次实验中,你将重分布RIPv2到OSPF协议,并且在RIPv2路由器提供缺省路由。

在完成本次实验之后,你需要完成下列任务:在不同的路由协议之间重分布路由信息。

实验学时: 2实验设备及环境:路由器RSR10、路由器以太网接口、 PC机实验基本配置:1.RIP 协议⑴全局设置指定使用RIP协议 router rip(2)路由设置指定与该路由器相连的网络 network network2.OSPF 协议⑴全局设置指定使用OSPF协议 router ospf process-id (2)路由设置指定与该路由器相连的网络 network address wildcard-mask area area-id 指定与该路由器相邻的节点地址 neighbor ip-address启用路由重发布命令 default-information originate 指定与该路由器相邻的节点地址 neighbor ip-address实验拓扑图图19 OSPF与RIP路由重发布实验拓扑图实验步骤1.在路由器上配置IP路由选择和IP地址。

RA#config tRA(config)# interface FastEthernet 0/0 //进入以太网接口RA(config-if)#ip address 172.16.1.5 255.255.255.252 //配置ip地址RA(config)# interface Loopback 0 //进入回环接口RA(config-if)#ip address 192.168.1.1 255.255.255.252 //配置ip地址RA(config)#interface Loopback 1 //进入回环接口RA(config-if)#ip address 192.168.2.1 255.255.255.0 //配置ip地址RB(config)#interface FastEthernet 0/0 //进入以太网接口RB(config-if)#ip address 172.16.1.6 255.255.255.252 //配置ip地址RB(config)#interface FastEthernet 0/1 //进入以太网接口RB(config-if)#ip address 172.16.1.1 255.255.255.252 //配置ip地址RC(config)# interface FastEthernet 0/0 //进入以太网接口RC(config-if)# ip address 172.16.1.2 255.255.255.252 //配置ip地址RC(config)# interface FastEthernet 0/1 //进入以太网接口RC(config-if)#ip address 172.16.1.9 255.255.255.252 //配置ip地址RC(config)#interface Loopback 0 //进入回环接口RC(config-if)#ip address 172.16.3.1 255.255.255.0 //配置ip地址RD(config)#interface FastEthernet 0/0 //进入以太网接口RD(config-if)#ip address 172.16.1.10 255.255.255.252 //配置ip地址RD(config)#interface Loopback 0 //进入回环接口RD(config-if)#i p address 10.1.1.1 255.255.255.0 //配置ip地址RD(config)#interface Loopback 1 //进入回环接口RD(config-if)#ip address 10.1.2.1 255.255.255.0 //配置ip地址RD(config)#interface Loopback 2 //进入回环接口RD(config-if)#ip address 200.1.1.1 255.255.255.0 //配置ip地址2.配置RIP和OSPF。

RA(config)# router ospf 10 //配置ospfRA(config-router)#network 10.1.1.0 0.0.0.255 area 1 //配置直连网段在区域1RA(config-router)#network 10.1.2.0 0.0.0.255 area 1 //配置直连网段在区域1RA(config-router)#network 172.16.1.8 0.0.0.3 area 1 //配置直连网段在区域1RA(config)#router rip //配置RIP协议RA(config-router)#version 2 //版本二RA(config-router)#network 172.16.0.0 //直连网段RA(config-router)#no auto-summary //关闭ip地址聚合RA(config)# ip route 0.0.0.0 0.0.0.0 Loopback 0 //配置静态路由RB(config)#router ospf 10 //配置OSPFRB(config-router)#network 172.16.1.0 0.0.0.3 area 0 //直连网段声明再主区域RB(config)#router rip //配置RIPRB(config-router)#version 2 //版本二RB(config-router)#network 172.16.0.0 //直连网段RB(config-router)#no auto-summary //关闭ip地址聚合RC(config)#router ospf 10 //配置OSPFRC(config-router)#network 172.16.1.0 0.0.0.3 area 0 //直连网段声明再主区域RC(config-router)#network 172.16.1.8 0.0.0.3 area 1 //配置直连网段在区域1RC(config-router)#network 172.16.3.0 0.0.0.255 area 0//直连网段声明再主区域RD(config)#router ospf 10 //配置OSPFRD(config-router)#network 10.1.1.0 0.0.0.255 area 1 //配置直连网段在区域1RD(config-router)#network 10.1.2.0 0.0.0.255 area 1 //配置直连网段在区域1RD(config-router)#network 172.16.1.8 0.0.0.3 area 1 //配置直连网段在区域1RD(config)# ip route 20.1.1.0 0.0.0.0 Loopback 03.配置重发布。

RA(config)# router rip //启动一个RIP进程RA(config-router)# default-information originate//向其他区域发送一条缺省路由RB(config)# router ospf 10 //启动了一个进程,进程号为10RB(config-router)#redistribute rip metric 50 subnets//将ospf引入RIP协议发现路由作为外部路由信息,路由的花费50RB(config-router)#default-information originate //向其他区域发送一条缺省路由RB(config)# router rip //启动一个RIP进程RB(config-router)#redistribute ospf10 metric 1//将RIP引入到OSPF,路由的花费为1RD(config)#router ospf 10 //启动了一个进程,进程号为10RD(config-router)#redistribute static subnets //重发布静态路由4.验证测试用show ip route 命令测试。

查看路由器A的路由表信息RA#showip routeCodes: C - connected, S - static, R - RIP, B - BGPO - 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 defaultGateway of last resort is 0.0.0.0 to network 0.0.0.0S* 0.0.0.0/0 is directly connected, Loopback 0R 10.1.1.1/32 [120/1] via 172.16.1.6, 00:06:20, FastEthernet 0/0R 10.1.2.1/32 [120/1] via 172.16.1.6, 00:06:09, FastEthernet 0/0R 172.16.1.0/30 [120/1] via 172.16.1.6, 00:13:27, FastEthernet 0/0C 172.16.1.4/30 is directly connected, FastEthernet 0/0C 172.16.1.5/32 is local host.R 172.16.1.8/30 [120/1] via 172.16.1.6, 00:13:27, FastEthernet 0/0R 172.16.3.1/32 [120/1] via 172.16.1.6, 00:09:05, FastEthernet 0/0C 192.168.1.0/30 is directly connected, Loopback 0C 192.168.1.1/32 is local host.C 192.168.2.0/24 is directly connected, Loopback 1C 192.168.2.1/32 is local host.R 200.1.1.0/24 [120/1] via 172.16.1.6, 00:00:04, FastEthernet 0/0(2)查看路由器D的路由表信息RD#showip routeCodes: C - connected, S - static, R - RIP, B - BGPO - 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 defaultGateway of last resort is 172.16.1.9 to network 0.0.0.0O*E2 0.0.0.0/0 [110/1] via 172.16.1.9, 00:13:47, FastEthernet 0/0C 10.1.1.0/24 is directly connected, Loopback 0C 10.1.1.1/32 is local host.C 10.1.2.0/24 is directly connected, Loopback 1C 10.1.2.1/32 is local host.C 20.1.1.0/24 is directly connected, Loopback 2C 20.1.1.1/32 is local host.O IA 172.16.1.0/30 [110/2] via 172.16.1.9, 00:19:38, FastEthernet 0/0O E2 172.16.1.4/30 [110/50] via 172.16.1.9, 00:18:23, FastEthernet 0/0C 172.16.1.8/30 is directly connected, FastEthernet 0/0C 172.16.1.10/32 is local host.O IA 172.16.3.1/32 [110/1] via 172.16.1.9, 00:10:25, FastEthernet 0/0S 200.1.1.0/24 is directly connected, Loopback 2(3)查看路由器B的路由表信息RB#showip routeCodes: C - connected, S - static, R - RIP, B - BGPO - 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 defaultGateway of last resort is 172.16.1.5 to network 0.0.0.0R* 0.0.0.0/0 [120/1] via 172.16.1.5, 00:14:42, FastEthernet 0/0 O IA 10.1.1.1/32 [110/2] via 172.16.1.2, 00:08:30, FastEthernet 0/1 O IA 10.1.2.1/32 [110/2] via 172.16.1.2, 00:08:18, FastEthernet 0/1C 172.16.1.0/30 is directly connected, FastEthernet 0/1C 172.16.1.1/32 is local host.C 172.16.1.4/30 is directly connected, FastEthernet 0/0C 172.16.1.6/32 is local host.O IA 172.16.1.8/30 [110/2] via 172.16.1.2, 00:22:09, FastEthernet 0/1O 172.16.3.1/32 [110/1] via 172.16.1.2, 00:11:15, FastEthernet 0/1O E2 200.1.1.0/24 [110/20] via 172.16.1.2, 00:02:13, FastEthernet 0/1。

相关文档
最新文档