思科路由重发布(rip与ospf)_第1页
思科路由重发布(rip与ospf)_第2页
思科路由重发布(rip与ospf)_第3页
思科路由重发布(rip与ospf)_第4页
思科路由重发布(rip与ospf)_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

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

文档简介

1、试验要求:R1与R2运行RIP,R3与R2之间运行OSPF,要求在R2上配置路由重发布,使R1能够学习到R3的路由,同样R3能够学到R1上的路由。并且配置汇总路由。试验目的:掌握路由重发布的基本配置与在配置路由重发布之前应该注意的地方。试验配置:R1:R1(config)#int s1/0R1(config-if)#ip add 199.99.1.2 255.255.255.0R1(config-if)#no shuR1(config-if)#exitR1(config)#int loop0R1(config-if)#ip add 192.168.1.1 255.255.255.224R1(c

2、onfig-if)#exitR1(config)#int loop1R1(config-if)#ip add 192.168.1.33 255.255.255.224R1(config-if)#exitR1(config)#int loop2R1(config-if)#ip add 192.168.1.65 255.255.255.224R1(config-if)#exitR1(config)#router ripR1(config-router)#version 2R1(config-router)#network 199.99.1.0R1(config-router)#network 19

3、2.168.1.0R1(config-router)#network 192.168.1.32R1(config-router)#network 192.168.1.64R1(config-router)#no auto-summary R1(config-router)#exitR2:R2(config)#int s1/0R2(config-if)#ip add 199.99.1.1 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shuR2(config-if)#exitR2(config)#int s1/1R2(co

4、nfig-if)#ip add 199.99.2.1 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shuR2(config-if)#exitR2(config)#router ripR2(config-router)#network 199.99.1.0R2(config-router)#version 2R2(config-router)#no auto-summary R2(config-router)#exitR2(config)#router ospf 100R2(config-router)#network

5、199.99.2.0 0.0.0.255 a 0R2(config-router)#endR2:R3(config)#int s1/0R3(config-if)#ip add 199.99.2.2 255.255.255.0R3(config-if)#no shuR3(config-if)#exitR3(config)#int loop0R3(config-if)#ip add 172.16.1.1 255.255.255.0R3(config-if)#exit R3(config)#int loop1R3(config-if)#ip add 172.16.2.1 255.255.255.0R

6、3(config-if)#exitR3(config)#int loop2R3(config-if)#ip add 172.16.3.1 255.255.255.0R3(config-if)#exitR3(config)#router ospf 100R3(config-router)#network 199.99.2.0 0.0.0.255 a 0R3(config-router)#network 172.16.1.0 0.0.0.255 a 1R3(config-router)#network 172.16.2.0 0.0.0.255 a 1R3(config-router)#networ

7、k 172.16.3.0 0.0.0.255 a 1R3(config-router)#exit好了,以上为基本的配置,下面我们在每台路由器上查看一下路由表:R1#show ip routeCodes: 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 extern

8、al 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 routeGateway of last resort is not setC 199.99.1.0/24 is directly connected, Seri

9、al1/0 192.168.1.0/27 is subnetted, 3 subnetsC 192.168.1.64 is directly connected, Loopback2C 192.168.1.32 is directly connected, Loopback1C 192.168.1.0 is directly connected, Loopback0R2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - O

10、SPF, 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 - per

11、iodic downloaded static routeGateway of last resort is not set 172.16.0.0/32 is subnetted, 3 subnetsO IA 172.16.1.1 110/65 via 199.99.2.2, 00:00:09, Serial1/1O IA 172.16.3.1 110/65 via 199.99.2.2, 00:00:09, Serial1/1O IA 172.16.2.1 110/65 via 199.99.2.2, 00:00:09, Serial1/1C 199.99.2.0/24 is directl

12、y connected, Serial1/1C 199.99.1.0/24 is directly connected, Serial1/0 192.168.1.0/27 is subnetted, 3 subnetsR 192.168.1.64 120/1 via 199.99.1.2, 00:00:05, Serial1/0R 192.168.1.32 120/1 via 199.99.1.2, 00:00:05, Serial1/0R 192.168.1.0 120/1 via 199.99.1.2, 00:00:05, Serial1/0R3#show ip routeCodes: C

13、 - 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 leve

14、l-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback1C 172.16.3.0 is di

15、rectly connected, Loopback2C 199.99.2.0/24 is directly connected, Serial1/0可以看到R1上只显示了自己直连的路由,R2上显示了通过RIP和OSPF学到的所有路由,R3上也只有自己直连的路由,下面在R2上配之路由重发布,在配置之前需要注意的是在把其他路由协议重发布到RIP,IGRP,EIGRP的时候,是需要手动添加度量,否则度量为无穷,但是重发布直连和静态路由时,度量默认为1, 在把其他路由协议重发布到OSPF时,可以不用手动添加度量值,默认OSPF为重发布的路由分配的度量值为20:R2(config)#router ri

16、pR2(config-router)#redistribute ospf 100 metric 3这样配置完成后就把OSPF 100的路由重发布到RIP路由协议中,并且定义度量值为3跳,然后在R1上查看路由表:R1#show 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 exter

17、nal 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 routeGateway of last resort is not set 172.16.0.0/32 i

18、s subnetted, 3 subnetsR 172.16.1.1 120/3 via 199.99.1.1, 00:00:05, Serial1/0R 172.16.3.1 120/3 via 199.99.1.1, 00:00:05, Serial1/0R 172.16.2.1 120/3 via 199.99.1.1, 00:00:05, Serial1/0R 199.99.2.0/24 120/3 via 199.99.1.1, 00:00:05, Serial1/0C 199.99.1.0/24 is directly connected, Serial1/0 192.168.1.

19、0/27 is subnetted, 3 subnetsC 192.168.1.64 is directly connected, Loopback2C 192.168.1.32 is directly connected, Loopback1C 192.168.1.0 is directly connected, Loopback0OK,学到了到R3上的路由,然后我们在R2上配置,把RIP重发布到OSPF中:R2(config)#router ospf 100R2(config-router)#redistribute rip subnets在重发布到OSPF中时,需要带subnets参数,

20、然后我们在R3上查看路由表:R3#show ip routeCodes: 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 summar

21、y, 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 routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly

22、connected, Loopback1C 172.16.3.0 is directly connected, Loopback2C 199.99.2.0/24 is directly connected, Serial1/0O E2 199.99.1.0/24 110/20 via 199.99.2.1, 00:00:09, Serial1/0 192.168.1.0/27 is subnetted, 3 subnetsO E2 192.168.1.64 110/20 via 199.99.2.1, 00:00:04, Serial1/0O E2 192.168.1.32 110/20 vi

23、a 199.99.2.1, 00:00:03, Serial1/0O E2 192.168.1.0 110/20 via 199.99.2.1, 00:00:03, Serial1/0好的,可以看到有O E2的路由了,表示OSPF自治系统外部路由,是从RIP重发布过来的。是类型2的外部路由,我们可以手动修改:R2(config-router)#redistribute rip metric 40 metric-type 1 subnets然后再到R3上查看路由表:R3#show ip route Codes: C - connected, S - static, R - RIP, M - mo

24、bile, 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

25、default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback1C 172.16.3.0 is directly connected, Loopback2C 199.99.2.0/2

26、4 is directly connected, Serial1/0O E1 199.99.1.0/24 110/104 via 199.99.2.1, 00:00:00, Serial1/0 192.168.1.0/27 is subnetted, 3 subnetsO E1 192.168.1.64 110/104 via 199.99.2.1, 00:00:00, Serial1/0O E1 192.168.1.32 110/104 via 199.99.2.1, 00:00:00, Serial1/0O E1 192.168.1.0 110/104 via 199.99.2.1, 00

27、:00:00, Serial1/0类型变成1类外部路由,度量值也变大了。下面我们开始路由汇总的配置,首先在R1上汇总RIP路由:R1(config)#int s1/0R1(config-if)#ip summary-address rip 192.168.1.0 255.255.255.0然后在R2和R3上验证:R2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

28、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 ro

29、uteGateway of last resort is not set 172.16.0.0/32 is subnetted, 3 subnetsO IA 172.16.1.1 110/65 via 199.99.2.2, 00:00:09, Serial1/1O IA 172.16.3.1 110/65 via 199.99.2.2, 00:00:09, Serial1/1O IA 172.16.2.1 110/65 via 199.99.2.2, 00:00:09, Serial1/1C 199.99.2.0/24 is directly connected, Serial1/1C 19

30、9.99.1.0/24 is directly connected, Serial1/0R 192.168.1.0/24 120/1 via 199.99.1.2, 00:00:09, Serial1/0R3#show ip routeCodes: 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

31、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 routeGateway of last resort is not set 172.16.0.0/24 is su

32、bnetted, 3 subnetsC 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback1C 172.16.3.0 is directly connected, Loopback2C 199.99.2.0/24 is directly connected, Serial1/0O E1 199.99.1.0/24 110/104 via 199.99.2.1, 00:00:48, Serial1/0O E1 192.168.1.0/24 110/104 via 199.9

33、9.2.1, 00:00:33, Serial1/0现在从RIP学到的路由变成了一条汇总的路由,注意在汇总路由时应注意,子网掩码应该大于或者等于默认主网络掩码。然后我们在R3上做汇总:R3(config)#router ospf 100R3(config-router)#area 1 rang 172.16.0.0 255.255.0.0然后我们在R1和R2上验证:R2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O -

34、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 routeGatew

温馨提示

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

评论

0/150

提交评论