CCNP实验 OSPF和EIGRP双点双向重分布
基于EIGRP协议与OSPF协议的路由重分别与应用
并可 以应用于公 司 A的 网络整合 , 明了路 由重发布的实用 证
S in e& Te h oo y Vi o ce c c n lg s n i
21 0 2年 9月第 2 7期
科 技 视 界
职校科技
模 , 以选用 RP协议 , 所 I 当公 司成立 分公 司的时候 , 考虑 到 对 于收敛 时间的高要求 , 以公 司决 定采用 c cபைடு நூலகம்所 i o专有协 议 s E G P E G P的快速收敛满足 了需求 ,但 是它需要与 总部 IR ,IR
R uigPo clse r ” ot gPo cl sop 1这 ot r oo i“i p 1R ui rt o i“sf ” n t g n o
两条 输 出表 明路 由器 R 3运 行 E G P和 O P IR S F两 种路 由协
议 , EG P和 O P , 即 IR S F 并且在边界路 由器 R 3上进 行了单点
双 向重发布。到此 , 拓扑图中运行的 3 种协议 已经可以互通 ,
() 2 步骤 2 配置路 由器 R : 2
R (of )ru r i p1 2 n g o t g c i # eer R ( n grue)n uo sm ay 2 o f -o t # oat—u m r e i r R ( n grue)ntok1218 3 2 o f -o t # ew r 9 . . . e i r 620 R ( n g ru r rds i t r tc 10 0 5 2 c f -ot ) e ir ue i me 0 0 1025 1 oi e# tb p r i
R ( ni rue) o t -d444 4e f -otr rue i ..4 o g # r . R ( ni rue # e ok444 .02 5a a 4e f -otr n t r ... 0 .. e o g ) w 0 0 5 r 0 R ( ni rue # e ok12183 . 00 . 5ae 4c f -otr n t r 9 .6 . 0 .02 a o g ) w 4 . 5 r 0
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双点双向重分布
【实验要求】按照拓扑搭建网络,对RIP 和OSPF 做双点双向重分发。
使得全网全互联。
并对重分发带来的故障解决和分析。
【实验步骤】一、 按照拓扑,对各个路由器的基本命令及重分发配置完成,可参考实验《重分发一》和《重分发二》。
R1:interface Loopback0ip address 1.1.1.1 255.255.255.0interface Serial0/0ip address 192.168.13.1 255.255.255.0serial restart-delay 0interface Serial0/1ip address 192.168.14.1 255.255.255.0serial restart-delay 0router ospf 1router-id 1.1.1.1log-adjacency-changesredistribute rip subnetsnetwork 1.1.1.0 0.0.0.255 area 0network 192.168.14.0 0.0.0.255 area 0router ripversion 2redistribute ospf 1 metric 1network 192.168.13.0no auto-summaryRIP OSPFR1R2R3R4S 0/0 192.168.13.0/24 S 0/0S 0/0 192.168.24.0/24 S 0/0S 0/1 192.168.14.0/24 S 0/1S 0/1 192.168.23.0/24 S 0/1lo 0:1.1.1.1/24lo 0:2.2.2.2/24lo 0:3.3.3./24lo 0:3.3.3.3/24IGP 中4种路由协议的重分布三、OSPF 双点双向重分布R2:!interface Loopback0ip address 2.2.2.2 255.255.255.0interface Serial0/0ip address 192.168.24.2 255.255.255.0serial restart-delay 0interface Serial0/1ip address 192.168.23.2 255.255.255.0serial restart-delay 0router ospf 1router-id 2.2.2.2log-adjacency-changesredistribute rip subnetsnetwork 2.2.2.0 0.0.0.255 area 0network 192.168.24.0 0.0.0.255 area 0!router ripversion 2redistribute ospf 1 metric 1network 192.168.23.0no auto-summaryR3:interface Loopback0ip address 3.3.3.3 255.255.255.0interface Serial0/0ip address 192.168.13.3 255.255.255.0serial restart-delay 0interface Serial0/1ip address 192.168.23.3 255.255.255.0serial restart-delay 0router ripversion 2network 3.0.0.0network 192.168.13.0network 192.168.23.0R4:interface Loopback0ip address 4.4.4.4 255.255.255.0interface Serial0/0ip address 192.168.24.4 255.255.255.0serial restart-delay 0interface Serial0/1ip address 192.168.14.4 255.255.255.0serial restart-delay 0router ospf 1router-id 4.4.4.4log-adjacency-changesnetwork 4.4.4.0 0.0.0.255 area 0network 192.168.14.0 0.0.0.255 area 0network 192.168.24.0 0.0.0.255 area 0R1#sh ip rou//查看R1的路由表1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0C 192.168.13.0/24 is directly connected, Serial0/02.0.0.0/8 is variably subnetted, 2 subnets, 2 masksO 2.2.2.2/32 [110/129] via 192.168.14.4, 00:03:05, Serial0/1 R 2.2.2.0/24 [120/2] via 192.168.13.3, 00:00:24, Serial0/0C 192.168.14.0/24 is directly connected, Serial0/13.0.0.0/24 is subnetted, 1 subnetsO E2 3.3.3.0 [110/20] via 192.168.14.4, 00:03:05, Serial0/14.0.0.0/32 is subnetted, 1 subnetsO 4.4.4.4 [110/65] via 192.168.14.4, 00:03:06, Serial0/1O 192.168.24.0/24 [110/128] via 192.168.14.4, 00:03:06, Serial0/1 O E2 192.168.23.0/24 [110/20] via 192.168.14.4, 00:03:06, Serial0/1 R1#R2#sh ip rou//查看R2的路由表1.0.0.0/8 is variably subnetted, 2 subnets, 2 masksO 1.1.1.1/32 [110/129] via 192.168.24.4, 00:02:46, Serial0/0 R 1.1.1.0/24 [120/2] via 192.168.23.3, 00:00:23, Serial0/1O E2 192.168.13.0/24 [110/20] via 192.168.24.4, 00:02:46, Serial0/02.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback0O 192.168.14.0/24 [110/128] via 192.168.24.4, 00:02:46, Serial0/03.0.0.0/24 is subnetted, 1 subnetsR 3.3.3.0 [120/1] via 192.168.23.3, 00:00:23, Serial0/14.0.0.0/32 is subnetted, 1 subnetsO 4.4.4.4 [110/65] via 192.168.24.4, 00:02:46, Serial0/0C 192.168.24.0/24 is directly connected, Serial0/0C 192.168.23.0/24 is directly connected, Serial0/1R1#traceroute 3.3.3.3//R1上跟踪路由3.3.3.3Type escape sequence to abort.Tracing the route to 3.3.3.31 192.168.14.4 116 msec 112 msec 100 msec2 192.168.24.2 136 msec 104 msec 44 msec3 192.168.23.3 152 msec * 244 msecR1#//发现,R1去往3.3.3.0/24的路由,要通过R4,再通过R2,才到达R3,在OSPF区域绕了一圈之后进入RIP,OSPF双点双向重分布会造成环路。
路由重分发(EIGRP、RIP、OSPF间)
EIGRP/RIP/OSPF间的路由重分发一、概述:路由重分发:使两个不同的路由域能够传递路由,从而使位于两个不同路由域的设备能够进行通信。
发生在两个不同路由域的边界上,这种处于边界的路由器叫做自治系统边界路由器。
自治系统边界路由器可以将一个路由域的信息放入另一个路由协议的信息表中。
二、RIP/OSPF间的路由重分发基本配置:1、规划IP地址,配置接口IP,并开启接口;2、在三个路由器上分别配置相应的路由协议(关闭自动汇总NO AU);3、在中间路由(RB)上做路由重分发;4、通过SHOW RUN和SHOW IP ROUTER命令来检查;5、测试(ping命令)RA#configRA(config)#int loopback 1RA(config-if)#ip add 192.168.1.1 255.255.255.0RA(config-if)#no shutdownRB、RC此处省略(接口配置)RA(config)#router ripRA(config-router)#ver 2RA(config-router)#no auRA(config-router)#net 192.168.1.0RA(config-router)#net 192.168.2.0RB、RC此处省略(基本路由协议配置)RB(config)#router ripRB(config-router)#redistribute ospf 110 metric 2RB(config-router)#exitRB(config)#router ospf 110RB(config-router)#redistribute rip subnetsRB(config-router)#endRB#show ip routerRB#show runRB#wrRA#PING 192.168.4.1三、RIP/EIGRP间的路由重分发注意:配置EIGRP协议是,后面所用的进程ID必须一致R2:router eigrp 1re rip metric 100000 100 255 1 1500<10000(带宽)100(延迟)255(可靠性)1(负载)1500(MTU)> router ripre eigrp 1 me 2四、OSPF/EIGRP间的路由重分发CopyR2:router eigrp 1re ospf 110 metric 100000 10 255 1 1500router ospf 110re eigrp 1 subnets五、RIP/OSPF/EIGRP间的路由重分发CopyR2:router eigrp 1redistribute rip metric 100000 10 255 1 1500redistribute ospf 110 metric 100000 10 255 1 1500network 192.16.5.0auto-summaryrouter ospf 110redistribute rip subnetsredistribute eigrp 1 subnetsnetwork 192.168.3.0 0.0.0.255 area 0router ripversion 2redistribute eigrp 1 metric 2redistribute ospf 110 metric 2network 192.168.2.0no auto-summary六、注意注意查看路由表(SHOW IP ROUTER),看路右边里面是否学到了路由协议。
CCNP路由笔记
CCNP路由笔一OSPF篇:OSPF EIGRP都是用4个逻辑分支1 发现邻居(发送hello报文)2建立邻居表(two way)3 建立拓扑表4建立路由表(选择最佳路由)流程为down –init- two way(建立邻居成功DR BDR选举完成)-exstat(交换之前会选出主从关系确定谁先发送数据)-exchange(交换DB过程)loadiing(交换lsu)full(完成整个数据交换ospf真个过程建立完成)。
基础知识1.ABR(至少有一个接口与另外两个OSPF区域相连)骨干路由器(至少有一个接口在AREA 0区域内)内部路由器(所有接口都再这个区域内)指定路由器DR(在交换数据链路LSA时不是每个路由器都相互转发而是通过DR/BDR进行2. DRother向DR,BDR发送DD,LSA request或者LSA UPdate时目标地址是AllDRouter(224.0.0.6);或者理解为:DR侦听224.0.0.6DR,BDR向DRother发送DD,LSA Request或者LSA Update时目标地址是AllSPFRouter(224.0.0.5);或者理解为:DRother侦听224.0.0.5并且所有的DROTHER与DR只会形成TWOWAY邻居关系但是不会形成full只有DR或BDR出现故障才回重新选举,即使加进来的优先级或者RID再打也不会重新选举,如果DR出现故障那么BDR接替,如果BDR出现故障重新选举BDR,DR保持不变3各类LSA1类路由器LSA:每台路由器上都会有1类LSA 他指出了这个路由器的RID和所有的IP地址ABR会有很多1类LSA,每个区域的LSA都会在ABR中列出`。
2类网络LSA:是有DR生成描述中转网络子网及该子网的路由接口这里的10.5.5.0为DR所创建的中转网络,他显示的是DR的接口。
只有DR与BDR会形成FULL状态,DRother与DR之间形成FULL与BDR之间形成FULL所有DROTHER之间形成twoway状态。
网络培训:EIGRP与OSPF双向重分发实验
网络培训:EIGRP与OSPF双向重分发实验实验目的:配置OSPF与EIGRP的重分发要求:1.除开以太网口的路由可以进行network进行EIGRP与OSPF的通告,其他回环口路由不得使用network通告2.在R1上能看到E 172.16.0.0/22的路由。
3.R1上回环口全部使用重分发,但是在R2 R3上只能看到192.168.1.0/24的路由。
有关度量值的计算方式:eigrp 是采用带宽单位kbps和延迟,ospf采用带宽bps 来计算。
EIGRP_Metric : k1 k2 k3 k4 k5 带宽(100M=100000kbps)负载延迟可靠性mtu (1500)任何路由协议的路由在ospf中重分发时,需要带参数subnets。
以下是配置文件:R1: int fa0/0Ip add 12.1.1.1 255.255.255.0No shutInt loop 0Ip add 1.1.1.1 255.255.255.0No shutInt loop 1Ip add 192.168.1.1 255.255.255.0Int loop 2Ip add 192.168.2.1 255.255.255.0Int loop 3Ip add 192.168.3.1 255.255.255.0ExitRouter ospf 110Router-id 1.1.1.1Network 12.1.1.0 0.0.0.255 a 0Redistribute connect subnets metric-type 1 metric 12 route-map TEST ExitAccess-list 100 permit ip 192.168.1.0 0.0.0.255 anyRoute-map TEST permit 10Match ip address 100ExitR2Int fa0/0Ip add 12.1.1.2 255.255.255.0No shutInt fa0/1Ip add 23.1.1.2 255.255.255.0No shutInt loop 0Ip add 2.2.2.2 255.255.255.0ExitRouter ospf 110Router-id 2.2.2.2Network 12.1.1.0 0.0.0.255 a 0ExitRouter eigrp 90No auto-summaryNetwork 23.1.1.0 0.0.0.255Redistribute ospf 110 metric 100000 11 20 255 1500ExitRouter ospf 110Redistribute eigrp 90 subnets metric-type 1 metric 12ExitR3Int fa0/0Ip add 23.1.1.3 255.255.255.0No shutInt loop 0Ip add 3.3.3.3 255.255.255.0Int loop 1Ip add 172.16.1.1 255.255.255.0Int loop 2Ip add 172.16.2.1 255.255.255.0Int loop 3Ip add 172.16.3.1 255.255.255.0Router eigrp 90No auto-summaryNetwork 23.1.1.0 0.0.0.255Redistribute connect metric 100000 20 255 1 1500Exit将172.16.网段汇总,有两种方式,1).在R3 :int fa0/0 ip summary-address eigrp 90 172.16.0.0 255.255.252.02).在R2:router ospf 110Summary-address 172.16.0.0 255.255.252.0在R2上使用show ip route ospf 查看是否有192.168.2.1 192.168.3.1 1.1.1的路由,如果没有这证明实验成功。
OSPF与EIGRP重分布
OSPF与EIGRP重分布一、网络拓扑图二、设备配置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)#exi%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/0R1(config-if)#ip address 192.168.3.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 ospf 1R1(config-router)#network 192.168.1.0 0.0.0.255 ar 0R1(config-router)#network 192.168.3.0 0.0.0.255 ar 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.3.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#exit%LINK-5-CHANGED: Interface Serial2/0, changed state to upR2(config)#int s 3/0%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR2(config-if)#ip address 192.168.4.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 ospf 1R2(config-router)#network 192.168.3.0 0.0.0.255 ar 000:05:59: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on Serial2/0 from LOADING to FULL, Loading DoneR2(config-router)#redistribute eigrp 1 metric-type 1 subnetsR2(config-router)#exiR2(config)#router eigrp 1R2(config-router)#network 192.168.4.0R2(config-router)#redistribute ospf 1 metric 1000 100 1 250 150R2(config-router)#exiR2(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.2.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 upR3(config)#int s 2/0R3(config-if)#ip address 192.168.4.2 255.255.255.0R3(config-if)#no shutdownR3(config-if)#exit%LINK-5-CHANGED: Interface Serial2/0, changed state to upR3(config)#router eigrp 1%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR3(config-router)#network 192.168.4.0%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.4.1 (Serial2/0) is up: new adjacencyR3(config-router)#network 192.168.2.0R3(config-router)#exiR3(config)#do wrBuilding configuration...[OK]测试结果:从PC0 ping PC1:。
2.双点双向重发布
R1 lo0 重发布进EIGRP 10R3 lo0 重发布进OSPF 10本实验最终目的需要看到:路由器R1上看到有两条D EX 3.0.0.0网段的路由分别来自路由器R2、R4 路由器R3上看到有两条O E2 1.0.0.0网段的路由分别来自路由器R2、R4本实验基础配置如下:路由器R3R3(Config)#router ospf 10R3(Config-router)#redistribute Connected subnets路由器R1R1(Config)#router eigrp 10R1(Config-router)#redistribute Connected metric 10000 100 255 1 1500路由器R2R2(Config)#router ospf 10R2(Config-router)#redistribute eigrp 10 subnetsR2(Config-router)#router eigrp 10R2(Config-router)#redistribute ospf 10 metric1000 100 255 1 1500 subnets路由器R4R4(Config)#router ospf 1R4(Config-router)#redistribute eigrp 10 subnetsR4(Config-router)#router eigrp 10R4(Config-router)#redistribute ospf 10 metric1000 100 255 1 1500 subnets此时我们看到:路由器R1上的路由表中D EX 2.0.0.0[170/25588160]的路由分别来自路由器R2、R4(符合要求)路由器R3上的路由表中O E2 1.0.0.0[110/20]却只有一条。
分析原因:路由器R1把外部的路由(1.0.0.0)重发布到EIGRP中,路由器R1、R2、R4认为外部Eigrp的管理距离是170。
OSPF 和 EIGRP 双点重分发
拓扑图:-------------------------R2 EIGRPR1 OSPF |--------------------R4-------------------------R3实验需求:R1的LO 0 1.1.1.1/32口重分布到OSPF中R4的LO 0 4.4.4.4/32口重分布到EIGRP中1.1.1.1负载均衡从R2 R3到R44.4.4.4 负载均衡从R2 R3到R1实验要点:修改EIGRP 、OSPF管理距离实验步骤:基本配置R1:r1#conf tr1(config)#int f0/0r1(config-if)#ip add 192.168.12.1 255.255.255.0r1(config-if)#no shr1(config-if)#int f1/0r1(config-if)#ip add 192.168.13.1 255.255.255.0r1(config-if)#no shr1(config-if)#int lo 0r1(config-if)#ip add 1.1.1.1 255.255.255.255r1(config-if)#^Zr1#conf tr1(config)#router ospf 110r1(config-router)#router-id 1.1.1.1r1(config-router)#net 192.168.12.0 0.0.0.255 area 0 r1(config-router)#net 192.168.12.0 0.0.0.255 area 0 r1(config-router)#redistribute connected subnets r1(config-router)#^ZR2:r2#conf tr2(config)#int f0/0r2(config-if)#ip add 192.168.12.2 255.255.255.0r2(config-if)#no shr2(config-if)#int f1/0r2(config-if)#ip add 192.1.1.2 255.255.255.0r2(config-if)#no shr2(config-if)#zr2#conf tr2(config)#router ospf 110r2(config-router)#router-id 2.2.2.2r2(config-router)#net 192.168.12.0 0.0.0.255 area 0r2(config-router)#redistribute eigrp 100 subnetsr2(config-router)#^Zr2#conf tr2(config)#router eigrp 100r2(config-router)#net 192.1.1.0r2(config-router)#redistribute ospf 110 metric 1000 100 255 1 1500 r2(config-router)#^ZR3:r3#conf tr3(config)#int f0/0r3(config-if)#ip add 192.168.13.3 255.255.255.0r3(config-if)#no shr3(config-if)#int f1/0r3(config-if)#ip add 192.1.1.3 255.255.255.0r3(config-if)#no shr3(config-if)#^Zr3#conf tr3(config)#router ospf 110r3(config-router)#router-id 3.3.3.3r3(config-router)#net 192.168.13.0 0.0.0.255 area 0r3(config-router)#redistribute eigrp 100 subnetsr3(config-router)#^Zr3#conf tr3(config)#router eigrp 100r3(config-router)#net 192.1.1.0r3(config-router)#redistribute ospf 110 metric 1000 100 255 1 1500 r3(config-router)#^ZR4:r4#conf tr4(config)#int f0/0r4(config-if)#ip add 192.1.1.4 255.255.255.0r4(config-if)#no shr4(config-if)#int lo 0r4(config-if)#ip add 4.4.4.4 255.255.255.255r4(config-if)#^Zr4#conf tr4(config)#router eigrp 100r4(config-router)#net 192.1.1.0r4(config-router)#redistribute connected metric 1000 100 255 1 1500 r4(config-router)#^Z解决需求方案:修改OSPF管理距离R2:r2#conf tr2(config)#router ospf 110r2(config-router)#distance 180 3.3.3.3 0.0.0.0r2(config-router)#^ZR3:r3#conf tr3(config)#router ospf 110r3(config-router)#distance 180 2.2.2.2 0.0.0.0r3(config-router)#^Z实验结果测试:r1#show ip routeC192.168.12.0/24 is directly connected, FastEthernet0/01.0.0.0/32 is subnetted, 1 subnetsC1.1.1.1 is directly connected, Loopback0C192.168.13.0/24 is directly connected, FastEthernet1/04.0.0.0/32 is subnetted, 1 subnetsO E24.4.4.4 [110/20] via 192.168.13.3, 00:40:15, FastEthernet1/0[110/20] via 192.168.12.2, 00:40:15, FastEthernet0/0O E2 192.1.1.0/24 [110/20] via 192.168.13.3, 00:41:55, FastEthernet1/0[110/20] via 192.168.12.2, 00:41:55, FastEthernet0/0r2#show ip routeC192.168.12.0/24 is directly connected, FastEthernet0/01.0.0.0/32 is subnetted, 1 subnetsO E21.1.1.1 [110/20] via 192.168.12.1, 00:41:46, FastEthernet0/0O192.168.13.0/24 [110/2] via 192.168.12.1, 00:42:11, FastEthernet0/04.0.0.0/32 is subnetted, 1 subnetsD EX4.4.4.4 [170/2588160] via 192.1.1.4, 00:42:09, FastEthernet1/0C192.1.1.0/24 is directly connected, FastEthernet1/0r3#show ip routeO192.168.12.0/24 [110/2] via 192.168.13.1, 00:42:55, FastEthernet0/01.0.0.0/32 is subnetted, 1 subnetsO E21.1.1.1 [110/20] via 192.168.13.1, 00:42:55, FastEthernet0/0C192.168.13.0/24 is directly connected, FastEthernet0/04.0.0.0/32 is subnetted, 1 subnetsD EX4.4.4.4 [170/2588160] via 192.1.1.4, 00:42:54, FastEthernet1/0C192.1.1.0/24 is directly connected, FastEthernet1/0r4#show ip routeD EX 192.168.12.0/24 [170/2588160] via 192.1.1.3, 00:43:21, FastEthernet0/0[170/2588160] via 192.1.1.2, 00:43:21, FastEthernet0/01.0.0.0/32 is subnetted, 1 subnetsD EX1.1.1.1 [170/2588160] via 192.1.1.3, 00:43:21, FastEthernet0/0[170/2588160] via 192.1.1.2, 00:43:21, FastEthernet0/0D EX 192.168.13.0/24 [170/2588160] via 192.1.1.3, 00:43:21, FastEthernet0/0[170/2588160] via 192.1.1.2, 00:43:21, FastEthernet0/04.0.0.0/32 is subnetted, 1 subnetsC4.4.4.4 is directly connected, Loopback0C192.1.1.0/24 is directly connected, FastEthernet0/0。
EIGRP
D 1.1.2.2/32 [90/156160] via 1.1.123.2, 00:08:44, FastEthernet0/0
ip add 1.1.3.3 255.255.255.255
int f 0/0
ip add 1.1.123.3 255.255.255.0
no shut
int s1/0
ip add 1.1.234.3 255.255.255.0
encap f
frame map ip 1.1.234.2 402 b
frame map ip 1.1.234.3 403 b
no shut
router ospf 1
router-id 1.1.4.4
nei 1.1.234.2
nei 1.1.234.3
conf t
int s1/2
no shut
ip add 192.168.45.4 255.255.255.0
router rip
ver 2
no au
net 192.168.45.0
end
把RIP再分发到EIGRP1中
net 1.1.234.4 0.0.0.0 a 0
net 1.1.4.4 0.0.0.0 a 0
end
到这里,所有的EIGRP和OSPF邻居关系都建立好了。
2,在R2和R3上做双点双向重分发
R2
router eigrp 1
redistribute ospf 1 metric 10000 100 255 1 1500
CCNP实验总结-路由策略
CCNP实验总结(路由策略部分)一.路由重分布1.最佳路由重分布解决方案R1下配置:inter loo 0ip add 1.1.1.1 255.255.255.0inter s0/0ip add 192.168.0.1 255.255.255.0no shurouter ripver 2no aunet 1.1.1.0net 192.168.0.0R2下配置:inter s0/0ip add 192.168.0.2 255.255.255.0no shuinter s0/1ip add 192.168.1.1 255.255.255.0no shuip route 0.0.0.0 0.0.0.0 192.168.1.2router ripver 2no aunet 192.168.0.0redistribute static metric 1router ospf 100net 192.168.1.1 0.0.0.0 a 0redistribute rip subnetsR3下配置:inter s0/1ip add 192.168.1.2 255.255.255.0no shuinter loo 0ip add 3.3.3.3 255.255.255.0ip ospf net point-to-prouter ospf 100net 192.168.1.2 0.0.0.0 a 0net 3.3.3.0 0.0.0.255 a 02.RIP下分布OSPFredistribute ospf 100 metric 1-153.EIGRP下分布OSPFredistribute ospf 100 metric 1544 200 255 1 15004.OSPF下分布RIP/EIGRPreidistribute rip/eigrp 100 subnets5.EIGRP下分布IS-ISredistribute isis level-1/-1-2/-2 metric 1544 200 255 1 15006.IS-IS下分布EIGRPredistribute eigrp 100 level-1/-1-2/-2二.被动接口RIP下只接受更新不发送更新,OSPF/IS-IS/EIGRP下不向外发送hello包,不建立邻居关系router eigrp 100passive-interface s0/0passive-interface default (全部接口)三.控制路由更新1.出向router eigrp 100distribute-list acl out interface/process路由重分布只能用出向列表(能加路由进程)2.入向router eigrp 100distribute-list acl in interface3.prefix-listip prefix-list 1 permit 1.1.1.0/24 ge 25 le 30所有B类地址的子网路由,长度不超过24ip prefix-list 1 permit 128.0.0.0/2 ge 17 le 244.加入网关distribute-list gateway prefix-list…gateway:距离矢量,到达目的网段的下一跳链路状态,通告这条路由的路由器5.基于时间的ACLtime-range aaaabsolute (绝对)/periodicperiodic Monday-Sunday 9:00 to 12:00dailyweekdays (Monday to Friday)weekend (Saturday to Sunday)access-list 100 permit tcp any any eq 80 time-range aaa6.OSPF中的分布列表不允许用出向(同一区域内LSDB要同步),入向数据库中有条目,不加路由表7.双向多点重分布时的路由回馈问题R2先于R3配置好R3会认为1.0-3.0网段是从R4发来的(管理距离问题)解决办法:1.修改R1-R3 RIP的管理距离2.去掉R38.策略路由access-list 1 permit 1.1.1.0 0.0.0.255route-map name permit num(从小往大写)match ip address address/acl num/prefix-list numset (e.g. metric 100)router ospf 100redistribute rip route-map name subnets9.IS-IS的被重分布问题需要重分布直连链路:redistribute connected10.管理距离的修改router eigrp 100distance eigrp num(内部) num(外部)distance 1 1.1.1.0 255.255.255.0/aclrouter ospf 100distance 1 1.1.1.0/acl gateway acl num11.现网不用debug,流量过大,慎用no语句12.DHCP交换信息用broadcast,每到周期的一半,再申请一次,如此循环。
Static,RIP,EIGRP和OSPF的重分布
路由重分布:RIP、EIGRP和OSPF的重分布当许多运行多路由的网络要集成到一起时,必须在这些不同的路由选择协议之间共享路由信息。
在路由选择协议之间交换路由信息的过程称为路由重分布(Route Redistribute)路由重分布时,计量单位和管理距离是必须要考虑的因素。
每一种路由协议都有自己的度量标准,所以在进行重分布时必须转换度量标准,使得它们兼容。
种子度量值(Seed Metric)是定义在路由重分布里的,它是一条从外部重分布进来的路由的初始度量值。
路由协议默认的种子度量值如下表:路由重分布中应该考虑的一些问题:路由环路:路由器有可能从一个自治系统学到的路由信息发送回该自治系统,特别是在做双向重分布的时候路由信息的兼容性问题,每一种路由协议的度量标准metric不同,所以路由器通过重分布所选择的路径可能并非最佳路径;不一致的收敛问题,因为不同的路由协议收敛时间不同•实验•RIP、EIGRP和OSPF的重分布实验拓扑:实验目的:1.种子度量值的配置2.路由重分布参数的配置3.静态路由重分布的配置4.RIP和EIGRP的重分布5.EIGRP和OSPF的重分布6.重分布路由的查看和调试实验步骤和调试:1、根据拓扑配置路由器R1、R2、R3和R42、在R1上向RIP区域重分布静态路由在向RIP区域重分布路由的时候,必须指定度量值,或者通过"default-metric"设置默认种子度量值,因为RIP默认的种子度量值为无限大,只有重分布静态特殊,可以不指定种子度量值。
3、在R2上将RIP重分布进EIGRP中,EIGRP重分布进RIP中由于EIGRP的度量值相对复杂,所以在重分布时,需要分别设置带宽、延迟、可靠性、负载以及MTU的参数值。
在"Redistribute"命令中用参数"metric"指定的种子度量值优先于在路由模式下使用"default-metric命令设定的默认的种子度量值"4、在R3上将EIGRP重分布进OSPF中,OSPF重分布进EIGRP中5、在R1上查看路由表以上输出表明R1通过RIPv2学到从R2重分布进RIP的路由。
OSPF与EIGRP重分布
OSPF与EIGRP重分布一、网络拓扑图二、设备配置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)#exi%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/0R1(config-if)#ip address 192.168.3.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 ospf 1R1(config-router)#network 192.168.1.0 0.0.0.255 ar 0R1(config-router)#network 192.168.3.0 0.0.0.255 ar 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.3.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#exit%LINK-5-CHANGED: Interface Serial2/0, changed state to upR2(config)#int s 3/0%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR2(config-if)#ip address 192.168.4.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 ospf 1R2(config-router)#network 192.168.3.0 0.0.0.255 ar 000:05:59: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on Serial2/0 from LOADING to FULL, Loading DoneR2(config-router)#redistribute eigrp 1 metric-type 1 subnetsR2(config-router)#exiR2(config)#router eigrp 1R2(config-router)#network 192.168.4.0R2(config-router)#redistribute ospf 1 metric 1000 100 1 250 150R2(config-router)#exiR2(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.2.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 upR3(config)#int s 2/0R3(config-if)#ip address 192.168.4.2 255.255.255.0R3(config-if)#no shutdownR3(config-if)#exit%LINK-5-CHANGED: Interface Serial2/0, changed state to upR3(config)#router eigrp 1%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR3(config-router)#network 192.168.4.0%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.4.1 (Serial2/0) is up: new adjacencyR3(config-router)#network 192.168.2.0R3(config-router)#exiR3(config)#do wrBuilding configuration...[OK]测试结果:从PC0 ping PC1:。
OSPF、EIGRP、RIP、静态路由的重分布综合试验
O E2 192.168.1.0/24 [110/20] via 192.168.3.1, 00:37:36, FastEthernet0/0
O 192.168.2.0/24 [110/2] via 192.168.3.1, 00:37:36, FastEthernet0/0
看下r2r4r5的shrun文件和路由表r2的核心配置文件interfacefastethernet00ipaddress192168122552552550duplexautospeedautointerfacefastethernet01ipaddress192168212552552550duplexautospeedautorouterospf100logadjacencychangesredistributeripsubnetsnetwork19216820000255arearouterripredistributeospf100network19216810defaultmetricr4的核心配置interfacefastethernet00ipaddress192168322552552550duplexautospeedautointerfacefastethernet01ipaddress192168412552552550duplexautospeedautoroutereigrp100redistributeospf100network19216840defaultmetric1000102551500autosummaryrouterospf100logadjacencychangesredistributeeigrp100subnetsnetwork19216830000255areadefaultmetric64r5的核心配置interfacefastethernet00ipaddress192168512552552550duplexautospeedautointerfacefastethernet01ipaddress192168422552552550duplexautospeedautoroutereigrp100network66660000network19216840network19216850autosummaryrouterospf100logadjacencychangesipclasslessiproute6666255255255255fastethernet00r2的路由表100081201via1921681100
CISCO中双点双向重发布(EIGRP+OSPF)
批注 [LG6]: 应该走
C 192.168.1.0/24isdirectlyconnected,FastEthernet1/0 O 192.168.2.0/24 [110/2] via 192.168.1.2, 00:00:26, FastEthernet1/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0
R3
1.0.0.0/32 is subnetted, 1 subnets O E2 1.1.1.1 [110/20] via 192.168.2.2, 00:11:06, FastEthernet1/0
2.0.0.0/32 is subnetted, 1 subnets O E2 2.2.2.2 [110/20] via 192.168.2.2, 00:11:06, FastEthernet1/0 O 192.168.1.0/24 [110/2] via 192.168.2.2, 00:11:06, FastEthernet1/0 C 192.168.2.0/24 is directly connected, FastEthernet1/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0
R3
1.0.0.0/32 is subnetted, 1 subnets D EX 1.1.1.1 [170/2588160] via 192.168.3.1, 00:00:20, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets O E2 2.2.2.2 [110/20] via 192.168.2.2, 00:00:20, FastEthernet1/0 O 192.168.1.0/24 [110/2] via 192.168.2.2, 00:00:20, FastEthernet1/0 C 192.168.2.0/24 is directly connected, FastEthernet1/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0
eigrp和ospf的重分布
R1:Router>Router>Router>Router>enRouter#Router#Router#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ho r1r1(config)#int lo 0r1(config-if)#ip add 1.1*Mar 1 00:04:00.175: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up.1.1 255.255.255.0r1(config-if)#int s0/0r1(config-if)#ip add 12.12.12.1 255.255.255.0r1(config-if)#no shur1(config-if)#r1(config-if)#exitr1(config)#*Mar 1 00:04:23.243: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up*Mar 1 00:04:24.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upr1(config)#router eigrp 1r1(config-router)#no aur1(config-router)#no auto-summaryr1(config-router)#net 1.0.0.0r1(config-router)#net 12.0.0.0r1(config-router)#endr1#*Mar 1 00:04:46.259: %SYS-5-CONFIG_I: Configured from console by console*Mar 1 00:05:22.679: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down*Mar 1 00:06:12.663: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up*Mar 1 00:08:17.091: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 12.12.12.2 (Serial0/0) is up: new adjacency*Mar 1 00:08:46.375: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 12.12.12.2 (Serial0/0) is resync: peer graceful-restartr1#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 not set34.0.0.0/24 is subnetted, 1 subnetsD EX 34.34.34.0 [170/3097600] via 12.12.12.2, 00:00:59, Serial0/01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsD 2.2.2.0 [90/2297856] via 12.12.12.2, 00:08:28, Serial0/03.0.0.0/24 is subnetted, 1 subnetsD EX 3.3.3.0 [170/3097600] via 12.12.12.2, 00:02:39, Serial0/04.0.0.0/24 is subnetted, 1 subnetsD EX 4.4.4.0 [170/3097600] via 12.12.12.2, 00:00:11, Serial0/023.0.0.0/24 is subnetted, 1 subnetsD 23.23.23.0 [90/2681856] via 12.12.12.2, 00:04:59, Serial0/012.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial0/0R2:outer>enRouter#Router#Router#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ho r2r2(config)#int lo 0r2(config-if)#ip add*Mar 1 00:05:16.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up2.2.2.2 255.255.255.0r2(config-if)#ip osr2(config-if)#ip ospf ner2(config-if)#ip ospf network por2(config-if)#ip ospf network point-to-pr2(config-if)#ip ospf network point-to-pointr2(config-if)#int s0/0r2(config-if)#ip add 12.12.12.2 255.255.255.0r2(config-if)#no shur2(config-if)#int s0/1r2(config-if)#*Mar 1 00:05:58.363: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up*Mar 1 00:05:59.363: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0,changed state to upip addr2(config-if)#ip add 23.23.23.2 255.255.255.0r2(config-if)#no shur2(config-if)#exitr2(config)#router*Mar 1 00:06:14.819: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up*Mar 1 00:06:15.819: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up eigr2(config)#router eigrp 1r2(config-router)#rer2(config-router)#redistribute or2(config-router)#redistribute osr2(config-router)#redistribute ospf mer2(config-router)#redistribute ospf metr2(config-router)#redistribute ospf metricr2(config-router)#redistribute ospf metric 1000 100 255 1 1500^% Invalid input detected at '^' marker.r2(config-router)#redistribute ospf su metric 1000 100 255 1 1500r2(config-router)#redistribute ospf sur2(config-router)#redistribute ospf sur2(config-router)#redistribute ospf ?<1-65535> Process IDr2(config-router)#redistribute ospf 1 mer2(config-router)#redistribute ospf 1 metric 1000 100 255 1 1500r2(config-router)#net 2.0.0.0r2(config-router)#net 12.0.0.0r2(config-router)#net*Mar 1 00:08:14.203: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 12.12.12.1 (Serial0/0) is up: new adjacency23.0.0.0r2(config-router)#no aur2(config-router)#no auto-summaryr2(config-router)#*Mar 1 00:08:43.443: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 12.12.12.1 (Serial0/0) is resync: summary configuredr2(config-router)#r2(config-router)#exitr2(config)#router ospf 1r2(config-router)#rour2(config-router)#router-id 2.2.2.2r2(config-router)#lor2(config-router)#log-adjacency-changes rer2(config-router)#log-adjacency-changesr2(config-router)#redistribute eigrp 1?<1-65535>r2(config-router)#redistribute eigrp 1 mer2(config-router)#redistribute eigrp 1 metric-r2(config-router)#redistribute eigrp 1 metric-type 1r2(config-router)#redistribute eigrp 1 metric-type 1 sur2(config-router)#redistribute eigrp 1 metric-type 1 subnetsr2(config-router)#net 2.2.2.0 0.0.0.255 area 0r2(config-router)#net 23.23.23.0 0.0.0.255 area 0r2(config-router)#endr2#*Mar 1 00:10:25.891: %SYS-5-CONFIG_I: Configured from console by console*Mar 1 00:11:12.707: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down*Mar 1 00:12:12.707: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to upr2#r2#conf tEnter configuration commands, one per line. End with CNTL/Z.r2(config)#int s0/0r2(config-if)#clor2(config-if)#clock rar2(config-if)#clock rate 128000r2(config-if)#int s0/1r2(config-if)#clor2(config-if)#clock rr2(config-if)#clock rate 128000r2(config-if)#endr2#*Mar 1 00:13:03.907: %SYS-5-CONFIG_I: Configured from console by console*Mar 1 00:14:27.807: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/1 from LOADING to FULL, Loading Doner2#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 not set34.0.0.0/24 is subnetted, 1 subnetsO IA34.34.34.0 [110/128] via 23.23.23.3, 00:03:25, Serial0/11.0.0.0/24 is subnetted, 1 subnetsD 1.1.1.0 [90/2297856] via 12.12.12.1, 00:11:23, Serial0/02.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsO 3.3.3.0 [110/65] via 23.23.23.3, 00:03:25, Serial0/14.0.0.0/24 is subnetted, 1 subnetsO IA 4.4.4.0 [110/129] via 23.23.23.3, 00:02:37, Serial0/123.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial0/112.0.0.0/24 is subnetted, 1 subnetsC 12.12.12.0 is directly connected, Serial0/0r2#r2#R3:outer#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#ho r3r3(config)#int lo 0r3(config-if)#ip add*Mar 1 00:10:56.843: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up3.3.3.3 255.255.255.0r3(config-if)#ip ospfr3(config-if)#ip ospf ner3(config-if)#ip ospf network por3(config-if)#ip ospf network point-to-pr3(config-if)#ip ospf network point-to-pointr3(config-if)#int s0/0r3(config-if)#ip add 23.23.23.3 255.255.255.0r3(config-if)#no shur3(config-if)#*Mar 1 00:11:54.395: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up*Mar 1 00:11:55.395: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upr3(config-if)#r3(config-if)#r3(config-if)#int s0/1r3(config-if)#ip add 34.34.34.3 255.255.255.0r3(config-if)#no shur3(config-if)#r3(config-if)#exitr3(config)#*Mar 1 00:13:24.203: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up*Mar 1 00:13:25.203: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to upr3(config)#r3(config)#router ospf 1r3(config-router)#rour3(config-router)#router-id 3.3.3.3r3(config-router)#lor3(config-router)#log-adjacency-changesr3(config-router)#net 3.3.3.0 0.0.0.255 area0^% Invalid input detected at '^' marker.r3(config-router)#net 3.3.3.0 0.0.0.255 area 0r3(config-router)#net 23.23.23.0 0.0.0.255 area0^% Invalid input detected at '^' marker.r3(config-router)#net 23.23.23.0 0.0.0.255 area 0r3(config-router)#net*Mar 1 00:14:23.463: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0 from LOADING to FULL, Loading Doner3(config-router)#net 34.34.34.0 0.0.0.255 area 1r3(config-router)#endr3#r3#r3#*Mar 1 00:14:40.911: %SYS-5-CONFIG_I: Configured from console by console*Mar 1 00:15:13.035: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down*Mar 1 00:16:03.019: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up*Mar 1 00:16:51.543: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/1 from LOADING to FULL, Loading Doner3#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 not set34.0.0.0/24 is subnetted, 1 subnetsC 34.34.34.0 is directly connected, Serial0/11.0.0.0/24 is subnetted, 1 subnetsO E1 1.1.1.0 [110/84] via 23.23.23.2, 00:02:56, Serial0/02.0.0.0/24 is subnetted, 1 subnetsO 2.2.2.0 [110/65] via 23.23.23.2, 00:03:44, Serial0/03.0.0.0/24 is subnetted, 1 subnetsC 3.3.3.0 is directly connected, Loopback04.0.0.0/24 is subnetted, 1 subnetsO 4.4.4.0 [110/65] via 34.34.34.4, 00:02:56, Serial0/123.0.0.0/24 is subnetted, 1 subnetsC 23.23.23.0 is directly connected, Serial0/012.0.0.0/24 is subnetted, 1 subnetsO E1 12.12.12.0 [110/84] via 23.23.23.2, 00:02:56, Serial0/0r3#R4:Router>Router>enRouter#Router#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#Router(config)#Router(config)#Router(config)#Router(config)#Router(config)#Router(config)#ho r4r4(config)#r4(config)#r4(config)#r4(config)#r4(config)#int lo 0r4(config-if)#ip add*Mar 1 00:11:40.803: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up4.4.4.4 255.255.255.0r4(config-if)#ip ospfr4(config-if)#ip ospf ner4(config-if)#ip ospf network por4(config-if)#ip ospf network point-to-pr4(config-if)#ip ospf network point-to-pointr4(config-if)#int s0/0r4(config-if)#ip add 34.34.34.4 255.255.255.0r4(config-if)#no shur4(config-if)#*Mar 1 00:12:23.775: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up*Mar 1 00:12:24.775: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upr4(config-if)#clocr4(config-if)#clock rr4(config-if)#clock rate 128000r4(config-if)#exitr4(config)#r4(config)#r4(config)#router ospf 1r4(config-router)#rour4(config-router)#router-id 4.4.4.4r4(config-router)#lor4(config-router)#log-adjacency-changesr4(config-router)#net 4.4.4.0 0.0.0.255 area 1r4(config-router)#net 34.34.34.0 0.0.0.255 area 1r4(config-router)#*Mar 1 00:13:24.507: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/0 from LOADING to FULL, Loading Doner4(config-router)#r4(config-router)#endr4#r4#r4#r4#r4#*Mar 1 00:13:29.471: %SYS-5-CONFIG_I: Configured from console by consoler4#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.34.34.0 is directly connected, Serial0/01.0.0.0/24 is subnetted, 1 subnetsO E1 1.1.1.0 [110/148] via 34.34.34.3, 00:04:49, Serial0/02.0.0.0/24 is subnetted, 1 subnetsO IA 2.2.2.0 [110/129] via 34.34.34.3, 00:04:49, Serial0/03.0.0.0/24 is subnetted, 1 subnetsO IA 3.3.3.0 [110/65] via 34.34.34.3, 00:04:49, Serial0/04.0.0.0/24 is subnetted, 1 subnetsC 4.4.4.0 is directly connected, Loopback023.0.0.0/24 is subnetted, 1 subnetsO IA23.23.23.0 [110/128] via 34.34.34.3, 00:04:49, Serial0/012.0.0.0/24 is subnetted, 1 subnetsO E1 12.12.12.0 [110/148] via 34.34.34.3, 00:04:50, Serial0/0 r4#。
基于EIGRP协议与OSPF协议的路由重分别与应用
基于EIGRP协议与OSPF协议的路由重分别与应用【摘要】路由重分布为在同一个互联网络中高效地支持多种路由协议提供了可能,执行路由重分布的路由器被称为边界路由器,因为它们位于两个或多个自治系统的边界上。
一般来说一个组织或者一个跨国公司很少只使用一个路由协议,而如果一个公司同时运行了多个路由协议,或者一个公司和另外一个公司合并的时候两个公司用的路由协议并不一样,这个时候必须使用重发布来将一个路由协议的信息发布到另外的一个路由协议里面去。
【关键词】核心路由;重发布;Metric1路由重发布1.1路由重发布介绍一般来说一个组织或者一个跨国公司很少只使用一个路由协议,可能在同一网内使用到多种路由协议,为了实现多种路由协议之间能够相互配合、协同工作,可以在路由器之间使用路由重分发(route redistribution)将其学习到的一种路由协议的路由通过另一种路由协议广播出去,这样网络的所有部分都可以连通了,而如果一个公司同时运行了多个路由协议,或者一个公司和另外一个公司合并的时候两个公司用的路由协议并不一样,这个时候该怎么办呢·所以必须采取一种方式来将一个路由协议的信息发布到另外的一个路由协议里面去,这样,重发布的技术就诞生了。
重发布的概念是将一种路由选择协议获悉的网络告知另一种路由选择协议,以便网络中每台工作站能到达其他的任何一台工作站,这一过程被称为重发布。
为了实现重分发,路由器必须同时运行多种路由协议,这样,每种路由协议才可以取路由表中的所有或部分其他协议的路由来进行广播。
1.2路由重发布需要考虑的问题1.2.1次优路径路由器有可能从一个自治系统学到的路由信息发送回该自治系统,特别是在做双向重分布的时候,这一点体现在管理距离值高的路由协议发布到管理距离值低的路由协议这一情况下,比如RIP协议通过双点重发布进ospf,这样的话在边界路由器上面就会产生次优路径,我们需要通过修改metric值,或者利用route-map,分发列表解决,然而EIGRP不需要考虑这个问题,因为EIGRP设计时就考虑到了这个问题,内部管理距离为100 外部管理距离为170,这也是EIGRP的一大优点。
CCNP 测试常见问题
CCNP测试以往出现的问题汇总
1.子接口的要求,常有同学忘记使用子接口。
2.所有设备的loopback0的地址,明确要求是172.1.x.x,X是设备号,可就是有人给配置成172.1.x.1 。
原因可能是没有好好看题,或是没有理解题目意思。
3.AREA 0采用MD5验证,有人会在路由模式中启用验证,却在接口忘记配置密钥。
4.对于OSPF的接口类型,有很多人没能理解。
5.EIGRP里的路由汇总,大家很少有人做到精确的汇总。
6.EIGRP、OSPF双向重分布时,在EIGRP 中有人忘记度量值,在OSPF中人有忘记subnets。
这点请大家要注意,很多同学就不理解为什么要加这些参数。
7.RIP当中不理解V2中的no auto-summary的含义。
还有人没有认真看题,少宣告了部分接口。
8.OSPF当中的虚链的使用,很多人没有理解虚链路也是AREA 0 的一部分,(也需要做验证);还有就是虚链路使用基本没有人考虑到冗余,只做一条。
9.没有人考虑到AREA 0 被分割冗余,使用虚链路现实。
10.有人对虚链路的配置不知道要配置在非骨干区域。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
CCNP实验:OSPF和EIGRP双点双向重分布
实验需求:R1的LO 0 1.1.1.1/32口重分布到OSPF中
R4的LO 0 4.4.4.4/32口重分布到EIGRP中
1.1.1.1负载均衡从R2 R3到R4
4.4.4.4 负载均衡从R2 R3到R1
实验要点:修改EIGRP 、OSPF管理距离
基本配置
R1:
r1#conf t
r1(config)#int f0/0
r1(config-if)#ip add 192.168.12.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#int f1/0
r1(config-if)#ip add 192.168.13.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#int lo 0
r1(config-if)#ip add 1.1.1.1 255.255.255.255
r1(config-if)#^Z
r1#conf t
r1(config)#router ospf 110
r1(config-router)#router-id 1.1.1.1
r1(config-router)#net 192.168.12.0 0.0.0.255 area 0
r1(config-router)#net 192.168.13.0 0.0.0.255 area 0
r1(config-router)#redistribute connected subnets
r1(config-router)#^Z
R2:
r2#conf t
r2(config-if)#ip add 192.168.12.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#int f1/0
r2(config-if)#ip add 192.1.1.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#z
^
r2#conf t
r2(config)#router ospf 110
r2(config-router)#router-id 2.2.2.2
r2(config-router)#net 192.168.12.0 0.0.0.255 area 0
r2(config-router)#redistribute eigrp 100 subnets
r2(config-router)#^Z
r2#conf t
r2(config)#router eigrp 100
r2(config-router)#net 192.1.1.0
r2(config-router)#redistribute ospf 110 metric 1000 100 255 1 1500 r2(config-router)#^Z
R3:
r3#conf t
r3(config)#int f0/0
r3(config-if)#ip add 192.168.13.3 255.255.255.0
r3(config-if)#no sh
r3(config-if)#int f1/0
r3(config-if)#ip add 192.1.1.3 255.255.255.0
r3(config-if)#no sh
r3(config-if)#^Z
r3#conf t
r3(config)#router ospf 110
r3(config-router)#router-id 3.3.3.3
r3(config-router)#net 192.168.13.0 0.0.0.255 area 0
r3(config-router)#redistribute eigrp 100 subnets
r3(config-router)#^Z
r3#conf t
r3(config)#router eigrp 100
r3(config-router)#net 192.1.1.0
r3(config-router)#redistribute ospf 110 metric 1000 100 255 1 1500 r3(config-router)#^Z
R4:
r4#conf t
r4(config)#int f0/0
r4(config-if)#ip add 192.1.1.4 255.255.255.0
r4(config-if)#no sh
r4(config-if)#ip add 4.4.4.4 255.255.255.255
r4(config-if)#^Z
r4#conf t
r4(config)#router eigrp 100
r4(config-router)#net 192.1.1.0
r4(config-router)#redistribute connected metric 1000 100 255 1 1500
r4(config-router)#^Z
解决需求方案:修改OSPF管理距离
R2:
r2#conf t
r2(config)#router ospf 110
r2(config-router)#distance 180 3.3.3.3 0.0.0.0
r2(config-router)#^Z
R3:
r3#conf t
r3(config)#router ospf 110
r3(config-router)#distance 180 2.2.2.2 0.0.0.0
r3(config-router)#^Z
实验结果测试:
r1#show ip route
C 192.168.12.0/24 is directly connected, FastEthernet0/0
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
C 192.168.13.0/24 is directly connected, FastEthernet1/0
4.0.0.0/32 is subnetted, 1 subnets
O E2 4.4.4.4 [110/20] via 192.168.13.3, 00:40:15, FastEthernet1/0
[110/20] via 192.168.12.2, 00:40:15, FastEthernet0/0
O E2 192.1.1.0/24 [110/20] via 192.168.13.3, 00:41:55, FastEthernet1/0
[110/20] via 192.168.12.2, 00:41:55, FastEthernet0/0
r2# r3# r4#show ip route
实验结论:
通过修改OSPF通过指定路由器的管理距离,解决负载均衡双点双向重分布。
r2(config-router)#distance 180 3.3.3.3 0.0.0.0
r3(config-router)#distance 180 2.2.2.2 0.0.0.0。