EIGRP与静态路由重分布

合集下载

基于EIGRP协议与OSPF协议的路由重分别与应用

基于EIGRP协议与OSPF协议的路由重分别与应用

基于EIGRP协议与OSPF协议的路由重分别与应用【摘要】路由重分布为在同一个互联网络中高效地支持多种路由协议提供了可能,执行路由重分布的路由器被称为边界路由器,因为它们位于两个或多个自治系统的边界上。

一般来说一个组织或者一个跨国公司很少只使用一个路由协议,而如果一个公司同时运行了多个路由协议,或者一个公司和另外一个公司合并的时候两个公司用的路由协议并不一样,这个时候必须使用重发布来将一个路由协议的信息发布到另外的一个路由协议里面去。

【关键词】核心路由;重发布;Metric1路由重发布1.1路由重发布介绍一般来说一个组织或者一个跨国公司很少只使用一个路由协议,可能在同一网内使用到多种路由协议,为了实现多种路由协议之间能够相互配合、协同工作,可以在路由器之间使用路由重分发(route redistribution)将其学习到的一种路由协议的路由通过另一种路由协议广播出去,这样网络的所有部分都可以连通了,而如果一个公司同时运行了多个路由协议,或者一个公司和另外一个公司合并的时候两个公司用的路由协议并不一样,这个时候该怎么办呢·所以必须采取一种方式来将一个路由协议的信息发布到另外的一个路由协议里面去,这样,重发布的技术就诞生了。

重发布的概念是将一种路由选择协议获悉的网络告知另一种路由选择协议,以便网络中每台工作站能到达其他的任何一台工作站,这一过程被称为重发布。

为了实现重分发,路由器必须同时运行多种路由协议,这样,每种路由协议才可以取路由表中的所有或部分其他协议的路由来进行广播。

1.2路由重发布需要考虑的问题1.2.1次优路径路由器有可能从一个自治系统学到的路由信息发送回该自治系统,特别是在做双向重分布的时候,这一点体现在管理距离值高的路由协议发布到管理距离值低的路由协议这一情况下,比如RIP协议通过双点重发布进ospf,这样的话在边界路由器上面就会产生次优路径,我们需要通过修改metric值,或者利用route-map,分发列表解决,然而EIGRP不需要考虑这个问题,因为EIGRP设计时就考虑到了这个问题,内部管理距离为100 外部管理距离为170,这也是EIGRP的一大优点。

三种动态路由协议下发默认路由的方式

三种动态路由协议下发默认路由的方式

RIP:(边界路由)
1.重分布静态路由re distribute static
2.default-intformation originate
3.缺省路由ip default-network (宣告主类网络号)
4.在RIP进程中宣告缺省路由network 0.0.0.0
5.在接口下汇总默认路由ip summary-address rip 0.0.0.0 0.0.0.0
EIGRP:(边界路由)
1.重分布静态路由re distribute static
2.缺省路由ip default-network (宣告主类网络号),同时在进程下宣告主类网络号,另外在连接内网的接口下采用手动汇总该外部路由
3.在EIGRP进程中宣告缺省路由network 0.0.0.0
4.全网使用静态路由实现逻辑全互联(不推荐)
OSPF:(边界路由)
使用default-information originate 必须在路由表中手动添加缺省指向NULL 0
default-information originate always----->强制添加缺省路由进入路由表
OSPF来说,它和距离矢量协议是不一样的,它的路径计算是基于SPF算法的,是通过LSA 来泛红路由,如果想在ospf内重分布默认路由的话,那么就需要配合使用default-information originate这个命令,因为ospf是只能重分布非缺省状态的静态路由,如果要是没有配置缺省路由的话,那么就要在default-information originate 后面加个always,就是无论本路由器路由表里有没有默认路由,都会广播出去。

思科认证:eigrp注入默认路由的三种方式

思科认证:eigrp注入默认路由的三种方式

⼀、静态重分布静态重分布是最简单的⼀种⽅式,只需要在路由器上配置两条命令就可以。

⾸先在R1上添加默认路由,然后在eigrp中使⽤redistribute命令。

R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0 //添加默认路由R1(config)#router eigrp 90R1(config-router)#redistribute static //静态重分布⼆、通告默认路由这⼀种⽅式相对也⽐较简单。

通告默认路由就是把默认路由像普通段那样宣告到eigrp进程中去。

既然是通告默认路由,那⾸先得有⼀条默认路由。

R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0 //添加默认路由R1(config)#router eigrp 90R1(config-router)#network 0.0.0.0 // 宣告默认路由三、ip default-networkip default-network 命令只⽀持有类IP,所以,在使⽤这种⽅式的时候,应该讲使⽤该段对应的主类络号。

⽐如本拓扑中应该使⽤12.0.0.0配置脚本如下:R1(config)#ip default-network 12.0.0.0 //使⽤ip default-network 声明默认路由R1(config)#router eigrp 90R1(config-router)#network 12.0.0.0 //声明该段R1(config-router)#exitR1(config)#ip route 12.0.0.0 255.0.0.0 null 0最后⼀条就需要注意了,在使⽤这种⽅法的时候,需要保证本机路由表中有对应的表项。

但是我们的12段是24位掩码,⽽ip default-network 声明的是主类络号,8位的掩码。

51CTO下载-静态、rip、eigrp、ospf路由重分布综合实验

51CTO下载-静态、rip、eigrp、ospf路由重分布综合实验

路由重分布综合实验一、实验名称:静态、rip、eigrp、ospf路由重分布综合实验三、实验拓扑图:三、实验拓扑图:四、实验步骤:四、实验步骤:上配置:R1上配置:Router>enableRouter#configure terminalRouter(config)#interface FastEthernet0/0Router(config-if)#ip address 192.168.20.1 255.255.255.0 Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface Serial0/0/0Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdownRouter(config-if)#clock rate 64000Router(config-if)#int loop1Router(config-if)#ip add 192.168.0.1 255.255.255.0 Router(config-if)#exitRouter(config)#route ospf 10Router(config-router)#net 192.168.1.0 0.0.0.255 area 1 Router(config-router)#redis rip subnetsRouter(config-router)#exitRouter(config)#route ripRouter(config-router)#version 2Router(config-router)#net 192.168.20.0Router(config-router)#exitRouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2R2上配置:上配置:Router>enableRouter#configure terminalRouter(config)#interface Serial0/0/0Router(config-if)#ip address 192.168.1.2 255.255.255.0Router(config-if)#exitRouter(config)#interface Serial0/0/1Router(config-if)#clock rate 64000Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface FastEthernet0/0Router(config-if)#ip address 192.168.4.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#ip route 192.168.0.0 255.255.255.0 192.168.1.1 Router(config)#route ospf 20Router(config-router)#net 192.168.1.0 0.0.0.255 area 1Router(config-router)#net 192.168.2.0 0.0.0.255 area 0Router(config-router)#net 192.168.4.0 0.0.0.255 area 0 上配置:R3上配置:Router>enableRouter#configure terminalRouter(config)#interface Serial0/0/0Router(config-if)#ip address 192.168.3.1 255.255.255.0Router(config-if)#clock rate 64000Router(config-if)#no shutdownRouter(config)#interface Serial0/0/1Router(config-if)#ip address 192.168.2.2 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface FastEthernet0/1Router(config-if)#ip address 192.168.5.2 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#route ospf 30Router(config-router)#net 192.168.2.0 0.0.0.255 area 0Router(config-router)#net 192.168.5.0 0.0.0.255 area 0Router(config-router)#redis eigrp 100 subnetsRouter(config-router)#exitRouter(config)#route eigrp 100Router(config-router)#net 192.168.3.0Router(config-router)#redis ospf 30 metric 10000 100 255 1 100R4上配置:上配置:Router>enableRouter#configure terminalRouter(config)#interface Serial0/0/0Router(config-if)#ip address 192.168.3.2 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#int loop1Router(config-if)#ip add 192.168.100.100 255.255.255.0Router(config-if)#int loop2Router(config-if)#ip add 192.168.200.200 255.255.255.0Router(config-if)#exitRouter(config)#route eigrp 100Router(config-router)#net 192.168.3.0Router(config-router)#net 192.168.100.0Router(config-router)#net 192.168.200.0R5上配置:上配置:Router>enableRouter#configure terminalRouter(config)#interface FastEthernet0/0Router(config-if)#ip address 192.168.4.2 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface FastEthernet0/1Router(config-if)#ip address 192.168.5.2 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#route ospf 40Router(config-router)#net 192.168.4.0 0.0.0.255 area 0Router(config-router)#net 192.168.5.0 0.0.0.255 area 0五、实验检验:五、实验检验:Pc1Pc1::PC>ping 192.168.100.100Pinging 192.168.100.100 with 32 bytes of data:Reply from 192.168.100.100: bytes=32 time=156ms TTL=252Reply from 192.168.100.100: bytes=32 time=140ms TTL=252Reply from 192.168.100.100: bytes=32 time=141ms TTL=252Reply from 192.168.100.100: bytes=32 time=110ms TTL=252Ping statistics for 192.168.100.100:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 110ms, Maximum = 156ms, Average = 136msPC>ping 192.168.200.200Pinging 192.168.200.200 with 32 bytes of data:Reply from 192.168.200.200: bytes=32 time=141ms TTL=252Reply from 192.168.200.200: bytes=32 time=140ms TTL=252Reply from 192.168.200.200: bytes=32 time=94ms TTL=252Reply from 192.168.200.200: bytes=32 time=157ms TTL=252Ping statistics for 192.168.200.200:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 94ms, Maximum = 157ms, Average = 133ms实验总结:通过综合实验,考察了所有路由器上的协议的配置及彼此之间的重分布,主要需要注意的是顺序及其关键点的配置,步步都不能马虎。

路由重分发工作原理

路由重分发工作原理

路由重分发工作原理路由重分发工作原理网络协议有很多种,例如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,且默认不重分发子网。

重分布

重分布

Rip1,将直连路由重分布到RIP v1中router ripnetwork 10.0.0.0redistribute connected2、将静态路由重分布到RIP V1中r1上:ip route 10.1.1.0 255.255.255.0 1.1.1.2router ripredistribute static //可以不指定度量值,把其当作是直连网络来通告3、将EIGRP路由重分布到RIP V1中需要指定度量值重分布,否则路由重分布不能成功。

router ripredistribute eigrp 1 metric 1 //R2接收的度量值为1,不增加1注意:EIGRP是无类路由,路由携带掩码,但RIP V1是有类路由,不携带掩码通告。

另:IGRP时,是将加入IGRP进程的接口也会重分布出去4、将OSPF路由重分布到RIP V1中router ripredistribute ospf 10 metric 1--------------------------------------------------------------------------- IGRP/EIGRP1、将直连接口重分布到IGRP或EIGRP //可以不指定度量值redistribute connected2、将静态路由重分布到IGRP或EIGRP //可以不指定度量值redistribute static3、将RIP路由重分布到IGRP或EIGRP //需要指定度量值Rip- eigrp#router eigrp 1#redistribute rip metric 1544 2000 255 1 1500##4、将OSPF路由重分布到IGRP或EIGRP //需要指定度量值Ospf -> eigrpRouter eigrp 1Redistridute ospf 1Default-metric 1000 10 1 255 15005、将ISIS路由重分布到IGRP或EIGRP //需要指定度量值,且需要指定路由类型(L1,L2,L1-2)6、将默认路由重分布到IGRP或EIGRP //可以不指定度量值(1)使用重分布静态路由(2)使用ip default-network命令,要求真实网络,需要通告进进程。

一个路由器上两种路由协议怎样重分布

一个路由器上两种路由协议怎样重分布

一个路由器上两种路由协议怎样重分布竭诚为您提供优质文档/双击可除一个路由器上两种路由协议怎样重分布篇一:路由协议的重分布路由协议的重分布一、定义:重分布是指连接到不同路由选择域的边界路由器在不同自主系统之间交换和通告路由选择信息的能力。

二、重分布原则:路由必须位于路由选择表中才能被重分发showiproute看到的三、在重分发时设定种子metric协议seedmetricRip必须手工指定eigRp必须手工指定ospF20如果重分布进来的是bgp的话,metric是1,这是个特例is-is0bgp携带原来的metric值R1(config-router)#default-metric1使用此命令来设定种子metric值四、重分布分两种:1、单向重分布2、双向重分布1)ospF->Rip:将其它路由协议重分布进Rip,要注意加metric值R1(config)#routerripR1(config-router)#redistributeospf110metric1(优于default-metric命令)也可用以下方法指定metric值R1(config-router)#default-metric3(默认seedmetric=infinity无限大,修改seedmetric =3)R1(config-router)#redistributeconnected(可不加metric,默认=1)重分布直连R1(config-router)#redistributestatic(可不加metric,默认=1)重分布静态,路由前会打上R 2)Rip->ospF:将其它路由协议重分布进ospF,要注意加subnets参数R1(config)#routerospf110R1(config-router)#redistributeripsubnets(如不加subnets,默认只有主类地址能被重分布)默认的metric值为20,也可用以下命令指定:R1(config-router)#default-metric8R1(config-router)#redistributeripsubnetsmetric10 (默认seedcost=20,如果将bgp->ospF,默认=1)R1(config-router)#redistributeripsubnetsmetric10met ric-type1(加上路径cost,默认为e2)R1(config-router)#redistributeconnectedsubnets R1(config-router)#redistributestaticsubnets还可在后面加router-map来过滤路由3)isis->eigRp:将其它路由协议重分布进eigRp时也要指定metric值R1(config)#routereigrp90R1(config-router)#default-metric150010025511500R1(config-router)#redistributeisislevel-1-2metric15 4410025511500默认为level-2bwdlyRlomtu(不加metric,默认seedmetric=infinity)带宽延迟可靠性负载mtuR1(config-router)#redistributeconnected(不加metric也可)(根据直连接口的不同计算metric)R1(config-router)#redistributestatic(不加metric 也可)(根据下一跳接口计算metric)·注意:当把isis重分布进其他路由协议时,运行isis 的直连接口不能重分布进去,这是isis本身的bug。

路由重分发(EIGRP、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),看路右边里面是否学到了路由协议。

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

EIGRP与静态路由重分布
一、网络拓扑图
二、设备配置
R1:
Router>
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos R1
R1(config)#INT F 0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown
R1(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)#
R1(config)#int s 2/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#clo ra 64000
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
R1(config-if)#exi
R1(config)#router eigrp 1
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0
R1(config-router)#exi
R1(config)#do wr
Building configuration...
[OK]
R2:
Router>
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos R2
R2(config)#int s 2/0
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
R2(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.0
R2(config-if)#clo ra 64000
R2(config-if)#no shu
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial3/0, changed state to down
R2(config-if)#exi
R2(config)#router eigrp 1
R2(config-router)#network 192.168.2.0
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.2.1 (Serial2/0) is up: new adjacency
R2(config-router)#redistribute static metric 1000 100 1 250 150
R2(config-router)#exi
R2(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.2
R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2
R2(config)#do wr
Building configuration...
[OK]
R3:
Router>
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos R3
R3(config)#int f 0/0
R3(config-if)#ip address 192.168.4.254 255.255.255.0
R3(config-if)#no shutdown
%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-if)#exi
R3(config)#int s 2/0
R3(config-if)#ip address 192.168.3.2 255.255.255.0
R3(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
R3(config-if)#exi
R3(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 up
R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1
R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
R3(config)#do wr
Building configuration...
[OK]
测试结果:
从PC0 ping PC1:。

相关文档
最新文档