<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 
为什么要使用路由重分发?

 
在大型的企业中,可能在同一网内使用到多种路由协议,为了实现多种路由协议之间能够相互配合、协同工作,可以在路由器之间使用路由重分发( route redistribution )将其学习到的一种路由协议的路由通过另一种路由协议广播出去,这样网络的所有部分都可以连通了。

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

 

在路由重分发的过程中要注意每个类型的路由协议的 metric 值。

 

一般环境中路由重分发有以下几种情况:
ripeigrp之间路由重分发;
ripospf之间的路由重分发;
ripisis之间的路由重分发;
eigrpospf之间的路由重分发;
eigrpisis之间的路由重分发;
ospfisis之间的路由重分发;
igrpeigrp之间的路由重分发。
今天我们就来配置这几种路由重分发。试验拓扑图都使用如下拓扑:
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />
配置主机名、配置接口IP等基本步骤省略。

 

一. ripeigrp之间路由重分发

 
假设R1上运行的是rip路由协议;R3上运行的是eigrp路由协议

 

ripeigrp之间配置路由重分发时要注意:
rip的度量值为跳数,本例中我们只有两跳。
Eigrp的度量值为带宽、延迟、可靠、负载最大传输单元。

 

r2(config)#router rip                                eigrp重分发到rip
r2(config-router)#redistribute eigrp 100 metric 2
r2(config-router)#exit
r2(config)#router eigrp 100                      rip重分发到eigrp
r2(config-router)#redistribute rip metric 1544 20000 255 1 1500
r2(config-router)#exit

 

二、 ripospf之间的路由重分发

 
假设R1上运行的是rip路由协议;R3上运行的是ospf路由协议

 

ripospf之间配置路由重分发时要注意:
Rip的度量值为跳数
Ospf有缺省的度量值,默认为20,可以不配置。

 

r2(config)#router rip                    ospf重分发到rip
r2(config-router)#redistribute ospf 1 metric 2
r2(config-router)#exit
r2(config)#router ospf 1                 rip重分发到ospf
r2(config-router)#redistribute rip metric 100

 

三、   ripisis之间的路由重分发

 
假设R1上运行的是rip路由协议;R3上运行的是isis路由协议

 

ripisis之间配置路由重分发时要注意:
Rip的度量值为跳数
Isis要注意isis类型,当把其他路由协议重分发到isis中时,必须使用level-2

 

r2(config)#router rip                  isis重分发到rip
r2(config-router)#redistribute <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />isis metric 2
r2(config-router)#exit
r2(config)#router isis                  rip重分发到isis
r2(config-router)#redistribute rip metric 0 metric-type  internal level-2

 

四.eigrpospf之间的路由重分发

 
假设R1上运行的是eigrp路由协议;R3上运行的是ospf路由协议

 

Eigrp的度量值为带宽、延迟、可靠、负载最大传输单元。
Ospf有缺省的度量值,默认为20,可以不配置。

 

r2(config)#router eigrp 100             ospf重分发到eigrp
r2(config-router)#redistribute ospf 1 metric 1544 20000 255 1 1500
r2(config-router)#exit
r2(config)#router ospf 1                eigrp重分发到ospf
r2(config-router)#redistribute eigrp 100 metric 100
% Only classful networks will be redistributed
r2(config-router)#exit

 

五.eigrpisis之间的路由重分发

 
假设R1上运行的是eigrp路由协议;R3上运行的是isis路由协议

 

Eigrp的度量值为带宽、延迟、可靠、负载最大传输单元。
Isis要注意isis类型,当把其他路由协议重分发到isis中时,必须使用level-2

 

r2(config)#router eigrp 100                                    把isis重分发到eigrp中
r2(config-router)#redistribute isis metric 1544 20000 255 1 1500 level-1-2
r2(config-router)#exit
r2(config)#router isis                                              把eigrp重分发到isis中
r2(config-router)#redistribute eigrp 100 metric 0 metric-type internal level-2
r2(config-router)#exit

 

 

六.ospfisis之间的路由重分发

假设R1上运行的是ospf路由协议;R3上运行的是isis路由协议

 

Ospf有缺省的度量值,默认为20,可以不配置。
Isis要注意isis类型,当把其他路由协议重分发到isis中时,必须使用level-2

 

r2(config)#router ospf 1                                   把isis重分发到ospf中
r2(config-router)#redistribute isis metric 2 level-1-2
% Only classful networks will be redistributed
r2(config-router)#exit
r2(config)#router isis                                         把ospf重分发到isis中
r2(config-router)#redistribute ospf 1 metric 0 metric-type internal level-2

 

七.igrpeigrp之间的路由重分发

 
因为Igrpeigrp属于cisco私有的路由协议。所以他们之间的路由重分发是自动配置的。

 

 

要是所有的路由协议之间的路由重分发都像igrpeigrp那样该多好啊……嘿嘿