新浪博客

路由重分发 redistribute 命令

2011-04-01 16:53阅读:
Redistribution
Routes learned by some other means are selectively redistributed into a routing
protocol from one of three sources:
-Another routing protocol 另外的一种路由协议
-Static routes 静态路由
-Directly connected routes 直连的路由

Routing loop prevention:
-Only routes used by the router itself are redistributed
-Double redistribution inside the same router is not allowed

Using Seed Metrics
The initial,or seed,metric for a route is derived from the directly connected
router interface.
Once a compatible metric is established,the metric will increase in increments
just like any other route.

看个例子
将RIP 重分发进入 EIGRP
R1#
router eigrp 110
net 10.0.0.0
redistribute rip
default-metric 1000 100 250 100 1500

注: Use the “default-metric” command to establish the seed metric for the route or specify the metric when redistributing.
关于 Default Seed Metrics
Protocol Default Seed Metric
RIP Inifinity

EIGRP Infinity
OSPF 20 for all except BGP,which is 1
BGP BGP metric is set to IGP metric value
One-Point Redistribution
One-point redistribution
-One-way;default route or static routes needed
单点单向:默认路由或者静态路由可能需要
-Two-way
单点双向:一个路由器运行两种不同的协议。比如ASBR路由器。
需要将rip 重分发进 ospf
需要将ospf 重分发进 rip

Multipoint redistribution 多点
-One-way 单向
-Two-way 双向

可能出现一些次优路径 或者 路由环路的问题。

重分发可能产生的问题
问题:
Routing loop 路由环路
Suboptimal path selection 次优路径
Incompatible routing information 不兼容得路由信息
Inconsistent convergence time 不一致的收敛时间

Solutions:解决方案
1.Administrative distance 手动修改管理距离
2.Route maps 路由映射
3.Distribution lists 分发列表
4.Manipulation of metrics 手动地修改metric值。

Steps to Configure Redistribution to RIP
重分发RIP的步骤:
1.Enter router RIP configuration mode 进入 RIP路由模式
R#conf t
router rip
R(config-router)#
redistribute ospf 1

R(config-router)# redistribute ospf 1 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
route-map Route map reference

注意:metric值的设置。设置一个合适的度量值。
These optional parameters influence redistribution into the RIP routing protocol.

看个实际例子
R#
conf t
router rip
redistribute ospf 1 metric 3

重分发 OSPF的步骤:
R(config-router)#
redistribute eigrp 100 metric 100 subnets

R(config-router)# redistribute eigrp 100 ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
tag set tag for routes redistributed into OSPF
注意: subnets 参数,通告子网, 如果没有这个参数的话,那么子网将无法通告。

再看个相对重要参数 metric-type 的例子吧
R#
conf t
router ospf 1
redistribute eigrp 100 subnets metric-type 1
说明:
Redistribute from EIGRP AS 100 into OSPF and change the metric type from type 2
to type 1.

关于EIGRP的重分发
R(config-router)#
redistribute ospf 1

R(config-router)# redistribute ospf 1 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
route-map Route map reference

default-mertic 10000 100 255 1 15000
注:
1. The default metric is set to :Bandwidth in kilobits =10000, Delay in tens of microseconds =100, Reliability=255(maximum),Load =1(minimum),MTU=1500bytes
2.You need to use this command when redistributing from another peotocol with incompatible metric into EIGRP
3.You do not need this command when redistributing :
-static routes to interface or connected networks
-between EIGRP processes

汇总之后重分发:
R1#
interface s0
ip summary-address rip 10.0.0.0 255.250.0.0
如果是 rip 或者是 eigrp 汇总网络重分发的时候, 近接口写。
R3#
router ospf 1
area 1 range 10.8.0.0 255.250.0.0
然后将汇总 完得网络 重分发。
当然如果是ASBR,则使用命令summary address



我的更多文章

下载客户端阅读体验更佳

APP专享